/* Checkout + payment result. Each site maps these tokens to its brand in its own stylesheet:
   --pay-accent, --pay-accent-ink, --pay-ink, --pay-muted, --pay-line, --pay-soft, --pay-radius */
.pay-shell { max-width: 1040px; margin: 0 auto; padding: 16px 0 72px; }
.pay-form input, .pay-form .pay-check { scroll-margin-top: 140px; }
.pay-shell > h1 { color: var(--pay-ink); margin: 0 0 6px; }
.pay-shell > .pay-lead { color: var(--pay-muted); margin: 0 0 22px; }
.pay-card { background: #fff; border: 1px solid var(--pay-line); border-radius: var(--pay-radius, 16px); padding: 24px; box-shadow: 0 18px 50px -36px rgba(20, 17, 42, .35); }
.pay-card h2 { font-size: 1.15rem; color: var(--pay-ink); margin: 0 0 4px; }
.pay-muted, .pay-hint { color: var(--pay-muted); font-size: .88rem; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .pay-grid { grid-template-columns: 1fr; } .pay-summary { order: -1; } }
.pay-form { display: grid; gap: 14px; }
.pay-field { display: grid; gap: 6px; font-weight: 600; color: var(--pay-ink); font-size: .95rem; }
.pay-field input { font: inherit; font-weight: 400; padding: 12px 14px; border: 1.5px solid var(--pay-line); border-radius: 12px; background: #fff; color: var(--pay-ink); min-height: 48px; }
.pay-field input[dir="ltr"] { text-align: right; }
.pay-field input:focus { outline: none; border-color: var(--pay-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pay-accent) 22%, transparent); }
.pay-field input[aria-invalid="true"] { border-color: #D92D20; }
.pay-err { color: #B42318; font-size: .85rem; font-weight: 500; }
.pay-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--pay-ink); }
.pay-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--pay-accent); flex: none; }
.pay-check a { color: var(--pay-accent); text-decoration: underline; }
.pay-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--pay-accent); background: var(--pay-accent); color: var(--pay-accent-ink, #fff); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.pay-btn svg { width: 18px; height: 18px; }
.pay-btn.ghost { background: transparent; color: var(--pay-accent); }
.pay-btn:disabled { opacity: .75; cursor: progress; }
.pay-btn.busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: pay-spin .8s linear infinite; }
.pay-submit { width: 100%; font-size: 1.05rem; }
.pay-secure { display: flex; gap: 8px; align-items: flex-start; color: var(--pay-muted); font-size: .82rem; margin: 0; }
.pay-secure svg { width: 14px; height: 14px; flex: none; margin-top: 4px; color: var(--pay-accent); }
.pay-alert { background: #FEF3F2; border: 1px solid #FECDCA; color: #912018; padding: 12px 14px; border-radius: 12px; font-size: .92rem; }
.pay-summary { position: sticky; top: 100px; display: grid; gap: 14px; }
.pay-item { display: grid; gap: 2px; margin: 0; padding-bottom: 14px; border-bottom: 1px dashed var(--pay-line); }
.pay-item b { color: var(--pay-ink); font-size: 1.05rem; }
.pay-item span { color: var(--pay-muted); font-size: .88rem; }
.pay-lines { margin: 0; display: grid; gap: 8px; }
.pay-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.pay-lines dt { color: var(--pay-muted); }
.pay-lines dd { margin: 0; color: var(--pay-ink); font-variant-numeric: tabular-nums; }
.pay-total { padding-top: 10px; border-top: 1px solid var(--pay-line); font-weight: 700; font-size: 1.15rem; }
.pay-total dt, .pay-total dd { color: var(--pay-ink); }
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-methods span { font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 8px; background: var(--pay-soft); color: var(--pay-ink); }
.pay-link { color: var(--pay-accent); font-size: .9rem; text-decoration: underline; }
.pay-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 18px; counter-reset: s; flex-wrap: wrap; }
.pay-steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; color: var(--pay-muted); font-size: .9rem; }
.pay-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--pay-line); font-size: .8rem; font-weight: 700; }
.pay-steps li + li::after { content: none; }
.pay-steps li:not(:last-child)::after { content: ""; width: 28px; height: 1.5px; background: var(--pay-line); }
.pay-steps li.on { color: var(--pay-ink); font-weight: 700; }
.pay-steps li.on::before { background: var(--pay-accent); border-color: var(--pay-accent); color: var(--pay-accent-ink, #fff); }
.pay-sandbox { background: #FFFAEB; border: 1px solid #FEDF89; color: #7A2E0E; border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin: 0 0 16px; }
.pay-sandbox b { margin-inline-end: 6px; }
.pay-loading, .pay-wait { display: flex; gap: 12px; align-items: center; color: var(--pay-muted); }
.pay-wait { flex-direction: column; text-align: center; padding: 48px 24px; }
.pay-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--pay-line); border-top-color: var(--pay-accent); animation: pay-spin .8s linear infinite; display: inline-block; }
.pay-spin.big { width: 44px; height: 44px; border-width: 4px; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay-done { max-width: 620px; margin: 0 auto; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 36px 28px; }
.pay-done h1 { color: var(--pay-ink); font-size: 1.6rem; margin: 0; }
.pay-done h1:focus { outline: none; }
.pay-done > p { color: var(--pay-muted); margin: 0; max-width: 48ch; }
.pay-done .pay-receipt { width: 100%; text-align: start; background: var(--pay-soft); border-radius: 12px; padding: 16px; }
.pay-why { font-size: .9rem; color: #912018 !important; }
.pay-badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff; }
.pay-badge.ok { background: #12B76A; box-shadow: 0 0 0 10px #D1FADF; }
.pay-badge.fail { background: #D92D20; box-shadow: 0 0 0 10px #FEE4E2; }
.pay-badge.wait { background: #F79009; box-shadow: 0 0 0 10px #FEF0C7; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pay-empty { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 40px 24px; }
@media (prefers-reduced-motion: reduce) { .pay-spin, .pay-btn.busy::after { animation: none; } }
@media print { header, footer, .top, .pay-actions, .pay-sandbox { display: none !important; } .pay-card { box-shadow: none; border: 0; } }

/* Two-step checkout with the payment form embedded in the page */
.pay-main { display: grid; gap: 0; padding: 0; overflow: hidden; }
.pay-step { padding: 22px 24px; display: grid; gap: 14px; }
.pay-step + .pay-step { border-top: 1px solid var(--pay-line); }
.pay-step header { display: flex; align-items: center; gap: 12px; }
.pay-step header h2 { margin: 0; flex: 1; }
.pay-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--pay-accent); color: var(--pay-accent-ink, #fff); flex: none; }
.pay-step.done .pay-num { background: #12B76A; font-size: 0; }
.pay-step.done .pay-num::after { content: "✓"; font-size: .95rem; }
.pay-step[aria-disabled="true"] .pay-num { background: var(--pay-soft); color: var(--pay-muted); }
.pay-step[aria-disabled="true"] h2 { color: var(--pay-muted); }
.pay-edit { background: none; border: 0; color: var(--pay-accent); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 4px; }
.pay-recap { margin: 0; color: var(--pay-ink); font-size: .92rem; overflow-wrap: anywhere; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .pay-row { grid-template-columns: 1fr; } }
.pay-next, .pay-submit { width: 100%; font-size: 1.05rem; }
.pay-embed { display: grid; gap: 14px; }
#mf-embed { min-height: 0; }
#mf-embed iframe { max-width: 100%; }
.pay-skeleton { display: grid; gap: 10px; }
.pay-skeleton[hidden] { display: none; }
.pay-skeleton i { display: block; height: 48px; border-radius: 12px; background: linear-gradient(90deg, var(--pay-soft) 25%, #fff 50%, var(--pay-soft) 75%); background-size: 200% 100%; animation: pay-shimmer 1.2s linear infinite; }
.pay-skeleton i:nth-child(3) { height: 150px; }
@keyframes pay-shimmer { to { background-position: -200% 0; } }
.pay-3ds { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--pay-soft); color: var(--pay-ink); font-size: .9rem; }
.pay-main > .pay-secure { padding: 14px 24px; margin: 0; border-top: 1px solid var(--pay-line); background: var(--pay-soft); }
.pay-alert .pay-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .pay-skeleton i { animation: none; } }
.pay-shell [hidden] { display: none !important; }
.pay-grid > *, .pay-step, .pay-embed, #mf-embed { min-width: 0; }
#mf-embed { overflow: hidden; }
@media (max-width: 820px) { .pay-summary { position: static; } .pay-step { padding: 18px 16px; } .pay-main > .pay-secure { padding: 12px 16px; } }
#mf-embed { overflow: visible; }
