/* The checkout at /pay and /en/pay. Shares site.css's tokens; only what a
   form needs lives here. One card is shown at a time, picked by the
   `data-state` that pay.js sets on .checkout. */

.checkout { padding: 8px 0 72px; }
.checkout > .card { display: none; }
.checkout[data-state="form"] .step-form,
.checkout[data-state="checking"] .step-checking,
.checkout[data-state="pending"] .step-pending,
.checkout[data-state="offline"] .step-offline,
.checkout[data-state="done"] .step-done,
.checkout[data-state="review"] .step-review,
.checkout[data-state="failed"] .step-failed { display: block; animation: card-in .35s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 24px;
  padding: 28px 28px 26px; box-shadow: var(--shadow);
}
.card h1 { font-size: 28px; line-height: 1.3; margin: 0 0 6px; }
.card .lede { color: var(--sub); margin: 0 0 22px; }
.card > p { color: var(--sub); }
.card > .btn { margin-top: 6px; }

/* ─── progress ─── */
.progress { display: flex; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; font-weight: 600; color: var(--faint); }
.progress li { display: flex; align-items: center; gap: 8px; }
.progress li + li::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--line); }
.checkout[data-state="form"] [data-step="0"],
.checkout:is([data-state="checking"], [data-state="pending"], [data-state="offline"]) [data-step="1"],
.checkout:is([data-state="done"], [data-state="review"]) [data-step="2"] { color: var(--brand); }
.checkout:not([data-state="form"]) [data-step="0"],
.checkout:is([data-state="done"], [data-state="review"]) [data-step="1"] { color: var(--sub); }

/* The store chips (site.css .phones) sit at the top of the form card. */
.step-form .phones { margin: 0 0 14px; }

/* ─── form ─── */
fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend, .f-label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; padding: 0; }

.plans-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plans-pick legend { grid-column: 1 / -1; }
.plan-opt {
  position: relative; display: grid; gap: 0; padding: 14px 16px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--ground); transition: border-color .2s ease, box-shadow .2s ease;
}
.plan-opt:hover { border-color: var(--brand); }
.plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1.5px var(--brand) inset; background: var(--paper); }
.plan-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Someone who chose yearly on the home page sees only yearly: it is the top
   plan, so there is nothing to step up to (pay.js sets .one). From 6 months,
   both show, so they can still move up. */
.plans-pick.one { grid-template-columns: 1fr; }
.plans-pick.one .plan-opt:not(:has(input:checked)) { display: none; }
.po-name { font-size: 15px; color: var(--sub); font-weight: 600; }
.po-price { font-size: 24px; font-weight: 700; line-height: 1.3; }
.po-sub { font-size: 13.5px; color: var(--brand); font-weight: 600; }

.field { display: block; margin: 0 0 18px; }
.field input {
  display: block; width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--ground);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder { color: var(--faint); opacity: .7; }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-sk); background: var(--paper); }
.field input[aria-invalid="true"] { border-color: var(--over); }
.f-hint { display: block; font-size: 13.5px; color: var(--faint); margin-top: 6px; line-height: 1.5; }

/* The wallets UddoktaPay's page will offer. White tiles in both themes — the
   way payment logos are always shown — with bKash's white logo on its own
   pink, as on the home page. */
.pay-with { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 20px; }
.pay-with > span { font-size: 15px; font-weight: 600; color: var(--ink); }
.pay-with ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pay-with li { display: grid; place-items: center; height: 30px; padding: 0 9px; border-radius: 8px; background: #fff; border: 1px solid rgba(16, 26, 21, .12); }
.pay-with img { display: block; height: 16px; width: auto; }
.pay-with .bkash { background: #E2136E; border-color: #E2136E; }
.pay-with .bkash img { height: 18px; }
.pay-with .rocket img { height: 20px; }

.form-error { color: var(--over); font-size: 15px; font-weight: 500; margin: 0 0 12px; }
.form-error:empty { display: none; }
.btn-wide { width: 100%; padding-top: 14px; padding-bottom: 14px; font-size: 17px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.next-note { text-align: center; margin-top: 10px; }

/* ─── checking / pending ─── */
.waiting {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--brand-sk); color: var(--ink); font-weight: 600;
}
.step-pending .waiting { margin-top: 18px; }
.w-text { flex: 1; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--brand-sk); border-top-color: var(--brand); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* "Taking a while? Send us your TrxID": collects the TrxID and the number
   it was sent from, and hands them to WhatsApp as a prefilled message, so a
   stuck payment can be matched by hand in the panel. */
.trx { margin: 16px 0 0; }
.trx summary { cursor: pointer; color: var(--brand); font-weight: 600; list-style: none; display: inline-flex; align-items: center; min-height: 44px; }
.trx summary::-webkit-details-marker { display: none; }
.trx summary::before { content: "+"; display: inline-block; width: 1.2em; font-weight: 700; transition: transform .2s ease; }
.trx[open] summary::before { transform: rotate(45deg); }
.trx-lede { color: var(--sub); font-size: 15.5px; margin: 2px 0 14px; }
.trx-form input[name="trx"] { text-transform: uppercase; letter-spacing: .04em; }
.trx-form input[name="trx"]::placeholder { text-transform: none; letter-spacing: 0; }
.trx-or { text-align: center; margin-top: 10px; }
.trx-sent { color: var(--brand); font-size: 15.5px; font-weight: 600; margin: 12px 0 0; }
.trx-sent:empty { display: none; }
.btn-wa svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.btn-ghost.btn-wa svg { fill: #25D366; }
.step-review .btn-wa { margin-top: 6px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.order-meta { margin: 20px 0 0; font-size: 14px; color: var(--faint); line-height: 1.7; }
.order-meta b { color: var(--sub); font-weight: 600; letter-spacing: .02em; }
.order-meta:has(b:empty) { display: none; }

/* ─── done ─── */
.step-done { text-align: center; }
.done-mark svg { width: 72px; height: 72px; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin: 6px auto 10px; display: block; }
.done-mark circle { fill: var(--brand-sk); stroke: none; }
.done-mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: tick .5s .2s ease forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.done-email { font-size: 19px; font-weight: 700; color: var(--ink); word-break: break-all; margin: 4px 0 20px; }
.step-done .play-badge { display: inline-flex; border-radius: 9px; }
.step-done .play-badge img { height: 48px; width: auto; }
.done-help { margin: 16px 0 0; font-size: 15.5px; font-weight: 600; }

@media (max-width: 600px) {
  .checkout { padding-bottom: 48px; }
  .card { padding: 20px 16px 20px; border-radius: 20px; }
  .card h1 { font-size: 23px; }
  .po-price { font-size: 21px; }
  .plan-opt { padding: 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .checkout > .card { animation: none !important; }
  .spin { animation-duration: 2.4s; }
  .done-mark path { animation: none; stroke-dashoffset: 0; }
}
