/* checkout.css — Body Bridge embedded checkout page.
   Scoped under .checkout-page so it never touches site-wide styles.css.
   Dark is the default theme; light overrides (especially sage) are intentional
   per DECISIONS.md #11: light sage = #6E8257, distinct from site #3CC027.
*/
/* ---------- Page root (inserted inline or via <link>) ---------- */
.checkout-page {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6; color: var(--text); background: var(--page-bg);
}

/* ---------- Theme (dark default) ---------- */
.checkout-page [data-theme="dark"] {
  --stage: #060505; --page: #0A0908; --r1: #1C1C1C; --r2: #2B2B2B;
  --border: #3E3E3E; --text: #FFFFFF; --text2: #9A9A9A;
  --copper: #D9A184; --copper-soft: rgba(217,161,132,.16);
  --brass: #B98F72; --sage: #8FA377; --shadow: 0 10px 28px rgba(0,0,0,.35);
}

/* ---------- Light theme — sage override per DECISIONS.md #11 ---------- */
.checkout-page [data-theme="light"] {
  --stage: #F1E9DA; --page-bg: #FFFDF9; --raised-1: #FFFFFF; --raised-2: #F4E7D8;
  --border: #E9DECB; --text: #1A1713; --text-2: #5F574F;
  --olive: #3B4835; --accent: #9E4E27; --accent-soft: rgba(158,78,39,.12);
  --brass: #8A6B41; --sage: #6E8257;  /* checkout light sage — not site #3CC027 */
  --shadow: 0 10px 28px rgba(59,72,53,.08);
}

/* ---------- Page chrome (traffic-light dots + url pill) are presentation-only, never shipped ---------- */
.checkout-page .browser-frame, .checkout-page .dots, .checkout-page .urlpill,
.checkout-page .urlpill .lock { display: none; }

/* ---------- Masthead / head block (left-aligned) ---------- */
.checkout-page .masthead {
  margin: 40px 0 30px; display: flex; align-items: center; justify-content: space-between;
}
.checkout-page .kicker {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--copper);
}
.checkout-page h1 { margin: 10px 0 0; font-size: 31px; font-weight: 800; color: var(--text); }
.checkout-page .lede { margin: 12px 0 0; max-width: 600px; font-size: 15px; line-height: 1.6; font-weight: 600; color: var(--text2); }

/* ---------- Grid: two-column desktop, stacked mobile ---------- */
.checkout-page .grid { display: grid; gap: 36px; }
/* Desktop: pay left 1.2fr, summary right 0.9fr */
@media (min-width: 768px) {
  .checkout-page .grid { grid-template-columns: 1.2fr 0.9fr; }
}
/* Mobile: stack summary above pay */
@media (max-width: 767px) {
  .checkout-page .grid { grid-template-columns: 1fr; }
  .checkout-page .summary-col { order: 1; }
  .checkout-page .pay-col { order: 2; }
  }

/* ---------- Summary card (mirrors mockup anatomy) ---------- */
.checkout-page .summary-card {
  background: var(--r1); border: 1px solid var(--border); border-radius: 20px; padding: 26px; box-shadow: var(--shadow);
}
.checkout-page .sum-kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--copper); margin-bottom: 12px; }
.checkout-page .plan-row { margin-top: 14px; display: flex; align-items: baseline; justify-content: space-between; }
.checkout-page .plan-name { font-size: 18px; font-weight: 800; }
.checkout-page .plan-price { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.checkout-page .plan-price .per { margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--text2); }
.checkout-page .billing-line { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--text2); }

/* ---------- Monthly/Annual toggle ---------- */
.checkout-page .toggle { margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--r2); border-radius: 999px; padding: 4px; }
.checkout-page .seg { height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 800; color: var(--text2); border-radius: 999px; }
.checkout-page .seg.active { background: #FFFFFF; color: var(--ink); } /* light olive bg + white text; dark: white bg + ink via [data-theme="dark"] */
.checkout-page .seg .chip { font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: var(--copper-soft); color: var(--brass); white-space: nowrap; }

/* ---------- Savings line ---------- */
.checkout-page .savings { margin: 14px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--sage); }
.checkout-page .savings svg { flex: 0 0 auto; margin-top: 1px; }

/* ---------- Due today / renewal line ---------- */
.checkout-page .due-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 700; }
.checkout-page .due-amt { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.checkout-page .renew-line { margin: 8px 0 0; font-size: 12px; line-height: 1.55; font-weight: 600; color: var(--text2); }

/* ---------- App note ---------- */
.checkout-page .app-note { margin-top: 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--text2); }
.checkout-page .app-ico { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; background: var(--r2); border: 1px solid var(--border); border-radius: 10px; }

/* ---------- Switch link ---------- */
.checkout-page .switch-hint { display: block; margin: 18px 0 0; font-size: 12px; font-weight: 700; color: var(--text2); }
.checkout-page .switch-link { display: block; margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--copper); text-decoration: none; white-space: nowrap; }
.checkout-page .switch-link:hover { text-decoration: underline; }

/* ---------- Trust footer ---------- */
.checkout-page .trust { margin-top: 46px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 10px; row-gap: 6px; }
.checkout-page .t-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text2); text-decoration: none; }
.checkout-page .t-item .lock { color: var(--brass); }
.checkout-page .dot { color: var(--text2); opacity: .55; }

/* ---------- Pay column ---------- */
.checkout-page .section-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text2); margin-bottom: 12px; }

/* ---------- Card information block (Stripe mount container) ---------- */
.checkout-page .card-block { background: var(--r1); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.checkout-page .ci-title { padding: 14px 16px 0; font-size: 13px; font-weight: 700; color: var(--text2); }
.checkout-page .ci-row { display: flex; align-items: center; height: 48px; padding: 0 16px; gap: 12px; }
.checkout-page .ci-ph { font-size: 15px; font-weight: 700; color: var(--text2); opacity: .85; }
.checkout-page .ci-row .brand { margin-left: auto; display: flex; align-items: center; color: var(--text2); }
.checkout-page .ci-div { height: 1px; background: var(--border); }
.checkout-page .ci-split { display: flex; }
.checkout-page .ci-half { flex: 1; display: flex; align-items: center; height: 48px; padding: 0 16px; }
.checkout-page .ci-vdiv { width: 1px; background: var(--border); }
.checkout-page .pay-btn {
  display: block; width: 100%; height: 52px; margin-top: 22px; border: 0; border-radius: 999px;
  background: #FFFFFF; color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 800;
  letter-spacing: .01em; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: var(--shadow);
}
.checkout-page .pay-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Accepted cards chips ---------- */
.checkout-page .cards-row { margin: 16px 0 0; display: flex; gap: 8px; }
.checkout-page .card-chip { display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--text2); }

/* ---------- Reassurance rows ---------- */
.checkout-page .reassure { margin: 14px 0 0; display: grid; gap: 9px; }
.checkout-page .r-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--text2); }
.checkout-page .r-row .check { flex: 0 0 auto; margin-top: 2px; color: var(--sage); }

/* ---------- Processing dim / spinner ---------- */
.checkout-page .dim { opacity: .55; pointer-events: none; }
.checkout-page .spin { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(10,10,10,.22); border-top-color: #0A0A0A; animation: odspin .8s linear infinite; }
@keyframes odspin { to { transform: rotate(360deg); } }

/* ---------- Declined state ---------- */
.checkout-page .danger-banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 13px 16px; background: rgba(229,103,76,.14); border: 1px solid #E5674C; border-radius: 12px; }
.checkout-page .danger-banner .warn { flex: 0 0 auto; margin-top: 2px; color: #E5674C; }
.checkout-page .danger-banner .d-strong { display: block; font-size: 14px; font-weight: 800; line-height: 1.35; color: #E5674C; }
.checkout-page .danger-banner .d-sub { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--text2); }
.checkout-page .card-block.error { border-color: #E5674C; box-shadow: 0 0 0 3px rgba(229,103,76,.14); }
.checkout-page .field-error { margin: 8px 0 0; font-size: 12px; font-weight: 700; line-height: 1.4; color: #E5674C; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 767px) {
  .checkout-page .summary-card { padding: 15px; }
  .checkout-page .toggle { grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; }
  .checkout-page .seg { height: 32px; font-size: 12.5px; }
  .checkout-page .seg .chip { padding: 2px 6px; font-size: 8.5px; }
  .checkout-page .pay-btn { height: 44px; margin-top: 13px; font-size: 14.5px; }
  .checkout-page .cards-row { margin: 11px 0 0; }
  .checkout-page .acc-chip { font-size: 10.5px; padding: 4px 10px; }
}
