/* =========================================================================
 * Pricing and checkout — page-pricing.php, page-checkout.php and
 * template-parts/checkout-*.php, and the card-to-card instructions
 * (Trellis_Gateway_Card::render_instructions): the plan comparison, the order
 * summary, gateway choice and wallet top-up.
 *
 * Enqueued only on is_page( 'pricing' ) and is_page( 'checkout' ), after
 * app.css (inc/assets.php). A rule belongs here only when every selector in
 * it names a class only these two pages print.
 * ====================================================================== */

/* pricing */
.p-compare-wrap { overflow-x: auto; }
.p-compare { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.p-compare th, .p-compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; }
.p-compare thead th { font-weight: var(--fw-black); }
.p-compare tbody th { font-weight: var(--fw-semibold); color: var(--text-soft); }
.p-compare td { text-align: center; }
.p-compare .p-yes { color: var(--verified); font-weight: var(--fw-bold); }
.p-compare .p-no { color: var(--line-strong); }
.p-compare-current { display: block; font-size: 11.5px; font-weight: var(--fw-semibold); color: var(--muted); }

/* pricing — the plans band (template-parts/home/plans.php): a paid plan's
   durations with their whole amounts, and the rows a plan lacks */
.home-plan-periods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.home-plan-periods li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-control); background: color-mix(in srgb, var(--white) 6%, transparent); color: var(--on-dark-muted); }
.home-plan-periods b { margin-inline-start: auto; color: var(--on-dark); font-weight: var(--fw-black); white-space: nowrap; }
.home-plan-periods em { font-style: normal; font-size: 11.5px; font-weight: var(--fw-bold); padding: 0 7px; border-radius: var(--r-chip); background: color-mix(in srgb, var(--verified) 30%, transparent); color: var(--on-dark); }
.home-plan-features li.is-off { opacity: .55; text-decoration: line-through; }
.home-plan-features li.is-off::before { content: "×"; color: var(--on-dark-muted); }
.p-honesty { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-control); font-size: 13.5px; color: var(--text-soft); line-height: 1.9; }
.p-honesty svg { flex-shrink: 0; color: var(--navy-700); margin-top: 2px; }

/* checkout — layout: the steps, and the order summary beside them */
.p-checkout { max-width: 1080px; }
.p-checkout .card { padding: 20px 22px; margin-bottom: 16px; }
.p-checkout [hidden] { display: none !important; }
.p-checkout-gate { max-width: 620px; }
.p-co { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.p-co-side { position: sticky; top: calc(var(--header-h) + 16px); }
.p-co-step-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: var(--fw-black); margin: 0 0 14px; }
.p-co-step-title > span { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--navy-900); color: var(--on-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.p-co-step-title small { font-weight: var(--fw-regular); font-size: 13px; }
.p-co-lead { margin: -6px 0 14px; font-size: var(--fs-sm); line-height: 1.9; }
.p-co-note { font-size: 12.5px; margin: 10px 0 0; }

/* radio cards: plan, gateway */
.p-co-options { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.p-co-opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.p-co-opt:hover { border-color: var(--navy-700); }
.p-co-opt:has(input:checked) { border-color: var(--navy-900); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy-900) 8%, transparent); }
.p-co-opt input { accent-color: var(--navy-900); width: 18px; height: 18px; flex-shrink: 0; }
.p-co-opt-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--fill); color: var(--navy-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p-co-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-co-opt-body strong { font-size: 15px; }
.p-co-opt-body small { color: var(--muted); font-size: 12.5px; line-height: 1.8; }

/* durations */
.p-co-durs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.p-co-dur { position: relative; cursor: pointer; }
.p-co-dur input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.p-co-dur-body { display: flex; flex-direction: column; gap: 3px; height: 100%; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 16px 14px 14px; transition: border-color .15s, background .15s, box-shadow .15s; }
.p-co-dur:hover .p-co-dur-body { border-color: var(--navy-700); }
.p-co-dur input:checked + .p-co-dur-body { border-color: var(--navy-900); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy-900) 8%, transparent); }
.p-co-dur input:focus-visible + .p-co-dur-body { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-co-dur-badge { position: absolute; top: -10px; inset-inline-start: 12px; background: var(--accent); color: var(--on-accent, var(--navy-900)); font-size: 11px; font-weight: var(--fw-bold); padding: 1px 10px; border-radius: 999px; }
.p-co-dur-name { font-weight: var(--fw-bold); font-size: 14px; }
.p-co-dur-price { font-size: 18px; font-weight: var(--fw-black); color: var(--text); margin-top: 4px; }
.p-co-dur-save { font-size: 12px; font-weight: var(--fw-bold); color: var(--verified); }
.p-co-dur-gift { font-size: 12px; color: var(--accent-ink, var(--warn)); background: var(--accent-soft, var(--warn-soft)); border-radius: 6px; padding: 2px 8px; margin-top: 4px; width: fit-content; }

/* the optional top-up on a plan order */
.p-co-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.p-co-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-co-toggle-ui { flex: 0 0 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; margin-top: 2px; }
.p-co-toggle-ui::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: inset-inline-start .15s; }
.p-co-toggle input:checked + .p-co-toggle-ui { background: var(--verified); }
.p-co-toggle input:checked + .p-co-toggle-ui::after { inset-inline-start: 21px; }
.p-co-toggle input:focus-visible + .p-co-toggle-ui { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-co-toggle > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.p-co-toggle small { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.p-co-topup { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }

/* top-up amounts */
.p-co-amounts { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.p-co-amount { position: relative; cursor: pointer; }
.p-co-amount input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.p-co-amount span { display: block; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 8px 16px; font-weight: var(--fw-semibold); font-size: 14px; transition: border-color .15s, background .15s; }
.p-co-amount input:checked + span { border-color: var(--navy-900); background: var(--navy-900); color: var(--on-dark); }
.p-co-amount input:focus-visible + span { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-co-custom { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-width: 280px; }
.p-co-custom label { font-size: 13px; font-weight: var(--fw-semibold); color: var(--text-soft); }
.p-co-custom input { min-height: var(--tap); padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-control); font: inherit; font-size: 16px; }

/* summary */
.p-co-summary h2 { font-size: 17px; font-weight: var(--fw-black); margin: 0 0 12px; }
.p-co-lines { margin: 0; }
.p-co-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.p-co-lines dt { display: flex; flex-direction: column; color: var(--text-soft); }
.p-co-lines dt small { color: var(--muted); font-size: 12px; }
.p-co-lines dd { margin: 0; font-weight: var(--fw-bold); white-space: nowrap; }
.p-co-lines .is-gift dd, .p-co-lines .is-gift dt { color: var(--verified); }
.p-co-lines .is-total { border-bottom: 0; padding-top: 14px; }
.p-co-lines .is-total dt { color: var(--text); font-weight: var(--fw-bold); }
.p-co-lines .is-total dd { font-size: 20px; font-weight: var(--fw-black); }
.p-co-submit { margin-top: 14px; min-height: 48px; font-size: 16px; }
.p-co-submit.is-busy { opacity: .7; cursor: progress; }
.p-co-trust { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.p-co-trust li { position: relative; padding-inline-start: 18px; }
.p-co-trust li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--verified); font-weight: var(--fw-bold); }
.p-co-upsell { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft, var(--fill)); border: 1px solid var(--accent-soft-border, var(--line)); color: var(--text); text-decoration: none; font-size: 13px; }
.p-co-upsell span { color: var(--accent-ink, var(--navy-700)); font-weight: var(--fw-semibold); }
.p-co-status { margin: 12px 0 0; }
.p-co-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: var(--fw-bold); background: var(--fill); color: var(--text-soft); }
.p-co-chip.is-pending { background: var(--warn-soft); color: var(--warn); }
.p-co-chip.is-awaiting_confirmation { background: color-mix(in srgb, var(--navy-700) 10%, transparent); color: var(--navy-700); }
.p-co-chip.is-paid { background: var(--verified-soft); color: var(--verified); }
.p-co-gift { margin: 10px 0 0; font-size: 12.5px; color: var(--verified); }

/* order: progress */
.p-co-progress { list-style: none; display: flex; gap: 8px; margin: 0 0 16px; padding: 0; counter-reset: none; }
.p-co-progress li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: var(--fw-semibold); }
.p-co-progress li > span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--line); color: var(--text-soft); font-size: 12px; }
.p-co-progress li.is-done { color: var(--verified); }
.p-co-progress li.is-done > span { background: var(--verified); color: var(--white); }
.p-co-progress li.is-now { background: color-mix(in srgb, var(--navy-900) 6%, transparent); color: var(--text); }
.p-co-progress li.is-now > span { background: var(--navy-900); color: var(--on-dark); }
.p-co-done { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.p-co-done > div { flex: 1; min-width: 200px; }
.p-co-done h2 { margin: 0 0 4px; font-size: 18px; }
.p-co-done-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--verified-soft); color: var(--verified); display: flex; align-items: center; justify-content: center; }

/* order: card-to-card instructions (Trellis_Gateway_Card::render_instructions) */
.p-card-steps { list-style: none; margin: 0; padding: 0; counter-reset: pcs; }
.p-card-steps > li { position: relative; counter-increment: pcs; padding: 0 0 22px; padding-inline-start: 44px; }
.p-card-steps > li::before { content: counter(pcs); position: absolute; inset-inline-start: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-900); color: var(--on-dark); display: flex; align-items: center; justify-content: center; font-weight: var(--fw-bold); font-size: 14px; }
.p-card-steps > li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.p-card-steps h3 { font-size: 15px; font-weight: var(--fw-bold); margin: 4px 0 10px; }
.p-card-amount { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.p-card-amount > span { font-size: 22px; font-weight: var(--fw-black); color: var(--text); }
.p-card-visual { display: flex; flex-direction: column; gap: 10px; border-radius: 16px; padding: 18px 20px; color: var(--on-dark); background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); box-shadow: var(--shadow-card); max-width: 460px; }
.p-card-bank { font-weight: var(--fw-bold); font-size: 14px; opacity: .95; }
.p-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.p-card-pan { direction: ltr; font-size: 21px; letter-spacing: .1em; font-variant-numeric: tabular-nums; font-family: var(--font-latin); font-weight: var(--fw-bold); }
.p-card-row.is-sheba bdi { direction: ltr; font-size: 12.5px; opacity: .85; font-family: var(--font-latin); word-break: break-all; }
.p-card-holder { font-size: 14px; opacity: .92; }
.p-card-hint { font-size: 12.5px; margin: 8px 0 0; }
.p-copy { border: 1px solid var(--line-strong); background: var(--white); color: var(--navy-900); border-radius: 999px; padding: 4px 14px; font: inherit; font-size: 12.5px; font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; }
.p-copy:hover { border-color: var(--navy-700); }
.p-copy.is-light { background: color-mix(in srgb, var(--white) 14%, transparent); border-color: color-mix(in srgb, var(--white) 35%, transparent); color: var(--on-dark); }
.p-copy.is-done { background: var(--verified); border-color: var(--verified); color: var(--white); }
.p-card-form { gap: 10px; margin-top: 0; }
.p-card-form label[for] { font-size: 13px; font-weight: var(--fw-semibold); color: var(--text-soft); }
.p-card-file { position: relative; display: block; cursor: pointer; }
.p-card-file input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.p-card-file-ui { display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 14px 16px; color: var(--navy-700); transition: border-color .15s, background .15s; }
.p-card-file:hover .p-card-file-ui, .p-card-file input:focus-visible + .p-card-file-ui { border-color: var(--navy-700); background: var(--surface); }
.p-card-file.has-file .p-card-file-ui { border-style: solid; border-color: var(--verified); background: var(--verified-soft); color: var(--verified); }
.p-card-file-ui > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-card-file-ui strong { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-card-file-ui small { color: var(--muted); font-size: 12px; }
.p-card-wait { display: flex; gap: 14px; align-items: flex-start; }
.p-card-wait h2 { font-size: 17px; margin: 0 0 6px; }
.p-card-wait-icon { flex: 0 0 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--navy-700) 10%, transparent); color: var(--navy-700); display: flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
	.p-co { grid-template-columns: 1fr; }
	.p-co-side { position: static; order: 2; }
}
@media (max-width: 520px) {
	.p-checkout .card { padding: 16px; }
	.p-co-durs { grid-template-columns: 1fr 1fr; }
	.p-co-dur-price { font-size: 16px; }
	.p-card-steps > li { padding-inline-start: 38px; }
	.p-card-pan { font-size: 17px; }
	.p-co-progress li { font-size: 12px; padding: 8px; flex-direction: column; text-align: center; }
}
