@import './base.css';

/* Checkout: the landing's orange pace panel on the left, a fixed payment card on the right. */
.topbar { border-bottom: 2px solid var(--ink); }
.topbar-back { display: flex; gap: 24px; margin-left: auto; font-weight: 700; font-size: 15px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); grid-template-areas: "pace card" "plan card" "how card"; align-items: start; gap: 28px clamp(24px, 4vw, 56px); padding: clamp(28px, 4vw, 56px) 0 clamp(60px, 7vw, 100px); }
.checkout h2 { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.1; }

.pace-panel { grid-area: pace; display: grid; gap: 18px; padding: clamp(24px, 3.4vw, 48px); border-radius: 30px; background: var(--orange); }
.pace-panel h1 { font: 700 clamp(34px, 4.8vw, 70px)/.95 var(--display); letter-spacing: -.05em; text-wrap: balance; }
.pace-lead { max-width: 46ch; font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; }
.pace-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; }
.pace-amount strong { font: 700 clamp(48px, 6.4vw, 104px)/.9 var(--display); letter-spacing: -.06em; }
.pace-amount span { font: 600 clamp(17px, 1.6vw, 22px)/1 var(--display); }
.pace-day { font-weight: 700; }

.checkout-card { grid-area: card; position: sticky; top: 24px; display: grid; gap: 18px; padding: clamp(22px, 2.4vw, 32px); border: 2px solid var(--ink); border-radius: 30px; background: var(--paper); }
.checkout-card h2 { font-size: 20px; }
.checkout-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.checkout-price strong { font: 700 clamp(38px, 3.6vw, 52px)/1 var(--display); letter-spacing: -.05em; }
.checkout-price span { color: var(--mute); font-weight: 700; }
.checkout-terms { display: grid; margin: 0; border-top: 1px solid var(--line); }
.checkout-terms div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.checkout-terms dt { color: var(--mute); font-weight: 600; }
.checkout-terms dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.conversion { color: var(--mute); font-size: 13px; }
.account-note { padding: 12px 14px; border-radius: 14px; background: var(--fog); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.account-note.is-warn { background: #FFE1DA; color: #7A1D0C; }
.account-note:empty { display: none; }
#subscription-form { display: grid; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; font-weight: 600; line-height: 1.45; cursor: pointer; }
.check input { flex-shrink: 0; width: 22px; height: 22px; margin: 0; accent-color: var(--orange); cursor: pointer; }
.check a { font-weight: 800; }
.check.is-missing span { color: var(--orange-ink); }
.form-error { color: var(--orange-ink); font-size: 14px; font-weight: 800; }
.form-error:empty { display: none; }
#subscription-form .btn { width: 100%; }
#subscription-form .btn:disabled { cursor: not-allowed; opacity: .45; }
.legal-small { color: var(--mute); font-size: 12px; line-height: 1.45; }

.plan-panel { grid-area: plan; display: grid; gap: 10px; }
.plan-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; }
.plan-panel-head .link { font-weight: 800; font-size: 15px; }
.plan-source, .plan-next { color: var(--mute); font-size: 15px; font-weight: 600; }
.mini-plan { display: grid; margin-top: 8px; }
.mini-plan li { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 8px 0; border-top: 1px solid var(--line); }
.mini-plan li:last-child { border-bottom: 1px solid var(--line); }
.mini-plan .month { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--fog); font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.mini-plan .is-public .month { background: var(--orange); }
.mini-plan .title { display: grid; gap: 2px; min-width: 0; font-weight: 800; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.mini-plan .title small { color: var(--mute); font-size: 13px; font-weight: 600; }
.mini-plan .price { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-plan .empty { display: block; padding: 16px; border-radius: 14px; background: var(--fog); font-weight: 600; }

.how { grid-area: how; display: grid; gap: 16px; padding-top: 26px; border-top: 2px solid var(--ink); }
.how-steps { display: grid; gap: 0; counter-reset: step; }
.how-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; counter-increment: step; }
.how-steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 14px/1 var(--display); }

@media (max-width: 960px) {
  .checkout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pace" "card" "plan" "how"; }
  .checkout-card { position: static; }
}
@media (max-width: 640px) {
  .topbar-back { gap: 16px; font-size: 14px; }
  .topbar-back #back-link { display: none; }
  .pace-panel, .checkout-card { border-radius: 24px; }
  .mini-plan li { grid-template-columns: 46px minmax(0, 1fr); }
  .mini-plan .price { grid-column: 2; }
  .mini-plan .month { width: 40px; height: 40px; font-size: 13px; }
}
