/* پرداخت ترکیبی (inc/split-pay.php) */

/* ---------- صفحه‌ی پرداخت: انتخاب روش‌ها ---------- */
.sp-box { display: grid; gap: 12px; margin-top: 6px; }
.sp-h { margin: 0; font-weight: 700; font-size: 14px; color: var(--ink); }
.sp-h small { font-weight: 400; color: var(--muted); }
.sp-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-preset { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff; cursor: pointer; font-size: 14px; }
.sp-preset.is-on { border-color: var(--red); background: var(--red-tint); color: var(--red-dark); }
.sp-preset input { accent-color: var(--red); margin: 0; }

.sp-gws { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.sp-gw { border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; padding: 10px 12px; }
.sp-gw.is-on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.sp-gw-pick { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.sp-gw-pick input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; flex: none; }
.sp-gw-pick img { width: 24px; height: 24px; object-fit: contain; border-radius: 6px; }
.sp-gw-pick b { font-size: 14px; }
.sp-feehint { margin-inline-start: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sp-slide { display: none; align-items: center; gap: 10px; margin-top: 10px; }
.sp-gw.is-on .sp-slide { display: flex; }
.sp-slide input[type=range] { flex: 1; min-width: 0; accent-color: var(--red); height: 28px; }
.sp-slide input[type=range]:disabled { opacity: .45; }
.sp-pct { min-width: 46px; text-align: center; font-weight: 700; color: var(--red-dark); background: var(--red-tint); border-radius: var(--r-pill); padding: 2px 8px; font-size: 14px; }
.sp-gw.is-last .sp-slide::after { content: "باقی‌مانده"; font-size: 11px; color: var(--muted); }

.sp-sum:empty { display: none; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--bg); border-radius: var(--r-ctl); overflow: hidden; margin: 0; }
.sp-table th, .sp-table td { padding: 7px 10px; text-align: start; border: 0; border-bottom: 1px solid var(--line); }
.sp-table thead th { color: var(--muted); font-weight: 400; }
.sp-table tfoot th { font-weight: 400; }
.sp-table tfoot td { font-weight: 700; }
.sp-table .sp-grand th, .sp-table .sp-grand td { border-bottom: 0; font-weight: 700; color: var(--ink); }
.sp-hint { margin: 0; color: var(--muted); font-size: 13px; }
.sp-hint.is-bad, .sp-errs { color: var(--red); }
.sp-errs { margin: 8px 0 0; padding-inline-start: 18px; font-size: 13px; }
.sp-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.8; }

/* ---------- صفحه‌ی پرداخت یک سهم ---------- */
.sp-paynote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; margin-bottom: 16px; background: var(--amber-tint); color: var(--amber-ink); border-radius: var(--r-ctl); font-size: 14px; }
.sp-paynote a { margin-inline-start: auto; font-weight: 700; color: var(--red); }

/* ---------- کادر سهم‌ها (صفحه‌ی ثبت سفارش، جزئیات سفارش) ---------- */
.sp-panel { background: #fff; border-radius: var(--r-card); padding: 20px 22px; margin-bottom: 16px; border: 1px solid var(--line); }
.sp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sp-kicker { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.sp-title { margin: 0; font-size: 19px; }
.sp-total { margin: 0; display: grid; text-align: end; font-size: 12px; color: var(--muted); }
.sp-total b { font-size: 17px; color: var(--ink); }
.sp-bar { height: 8px; background: var(--bg); border-radius: var(--r-pill); overflow: hidden; margin: 14px 0 10px; }
.sp-bar span { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .4s var(--ease); }
.sp-deadline { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 12px; font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.sp-deadline .cm-icon { flex: none; margin-top: 4px; }
.sp-deadline.is-late { color: var(--red); }
.sp-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-ctl); font-size: 14px; }
.sp-msg.is-ok { background: var(--green-tint); color: #12643A; }
.sp-msg.is-bad { background: var(--red-tint); color: var(--red-dark); }

.sp-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sp-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.sp-row.is-paid { background: var(--green-tint); border-color: transparent; }
.sp-row.is-failed { border-color: var(--red); }
.sp-row-gw { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sp-row-gw img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #fff; }
.sp-row-gw span { display: grid; }
.sp-row-gw small { color: var(--muted); font-size: 12px; }
.sp-row-amt { font-weight: 700; white-space: nowrap; }
.sp-row-state { font-size: 12px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.sp-row.is-paid .sp-row-state { background: var(--green); color: #fff; }
.sp-row.is-review .sp-row-state { background: var(--amber-tint); color: var(--amber-ink); }
.sp-row.is-failed .sp-row-state { background: var(--red-tint); color: var(--red-dark); }
.sp-row-act:empty { display: none; }
.sp-row-act .btn { min-height: 40px; padding: 6px 16px; }
.sp-switch { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sp-switch label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.sp-switch select { min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; font: inherit; }
.sp-foot { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.sp-cancel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sp-cancel small { color: var(--muted); font-size: 12px; }
.sp-why { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.sp-why input { min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 4px 10px; font: inherit; }
.sp-cancel-btn { color: var(--red); }
.sp-req { margin: 0; color: var(--amber-ink); background: var(--amber-tint); padding: 10px 12px; border-radius: var(--r-ctl); font-size: 14px; }

.ty .sp-panel { margin-bottom: 20px; }
.od .sp-panel { margin: 14px 18px; }

@media (max-width: 640px) {
	.sp-panel { padding: 16px; }
	.sp-head { flex-direction: column; }
	.sp-total { text-align: start; }
	.sp-row { grid-template-columns: 1fr auto; }
	.sp-row-state { justify-self: start; }
	.sp-row-act { grid-column: 1 / -1; }
	.sp-row-act .btn { width: 100%; justify-content: center; }
	.sp-feehint { display: none; }
}
