/*
 * Online store: the public pages' styles (slice C, plan #213 section 7)
 * Checkout, order status, reserve confirm, account link and printable terms.
 * No inline styles are allowed on these pages (their CSP forbids them), so
 * every look lives here. Scrolling rules (.claude/rules/scrolling.md): the
 * body is the one scroller; the terms window is a fixed overlay that scrolls
 * by itself with overscroll-behavior: contain; a closed overlay is [hidden]
 * (display: none), never opacity alone; no compositor layers on any item.
 */
/* One look, the website's dark one, whatever the device is set to (Warren,
   2026-11-21): these pages sit on the site's night sky under its logo menu
   (assets/store/site_shell.css), so they no longer follow the device's light
   setting. The card colour is solid, so the stars never show through the words.
   On paper everything goes back to black on white (the print rules below). */
:root {
  --sc-bg: #0a0a15;
  --sc-card: #151827;
  --sc-text: #f0f0f0;
  --sc-muted: #a4abba;
  --sc-line: #2e3346;
  --sc-accent: #2eb6e9;
  --sc-accent-text: #04202b;
  --sc-warn-bg: #3a3014;
  --sc-warn-line: #b99a2e;
  --sc-err-bg: #3b1d1a;
  --sc-err-line: #d9685c;
  --sc-ok-bg: #16301f;
  --sc-ok-line: #3aa35c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sc-bg);
  color: var(--sc-text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--sc-accent); }

.sc-wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.sc-main { padding-top: 16px; padding-bottom: 48px; }
/* The slim line under the site's menu: back to the unit, and "Secure checkout". */
.sc-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.sc-back-link { text-decoration: none; font-weight: 600; }
.sc-secure { color: var(--sc-muted); font-size: 14px; }

.sc-card {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 12px;
  padding: 18px 16px;
  margin: 0 0 16px;
}
.sc-card h1 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.sc-card h2 { font-size: 18px; line-height: 1.3; margin: 0 0 12px; }
/* A step's heading takes focus when the step appears (checkout.js moveTo); it is not a control, so no ring. */
.sc-card h1[tabindex="-1"]:focus, .sc-card h2[tabindex="-1"]:focus, .sc-3ds[tabindex="-1"]:focus { outline: none; }
.sc-card h1, .sc-card h2, .sc-3ds { scroll-margin-top: 12px; }
.sc-price { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.sc-grade, .sc-serial { margin: 0 0 6px; color: var(--sc-muted); }
.sc-fine { color: var(--sc-muted); font-size: 13px; margin: 12px 0 0; }
.sc-pickup-note { color: var(--sc-muted); font-size: 14px; }

.sc-note, .sc-msg {
  border: 1px solid var(--sc-err-line);
  background: var(--sc-err-bg);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.sc-note-warn { border-color: var(--sc-warn-line); background: var(--sc-warn-bg); }
.sc-msg-ok { border-color: var(--sc-ok-line); background: var(--sc-ok-bg); }

.sc-dl { margin: 0 0 12px; }
.sc-dl-row { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--sc-line); }
.sc-dl-row:last-child { border-bottom: 0; }
.sc-dl dt { flex: 0 0 34%; max-width: 170px; color: var(--sc-muted); font-size: 14px; }
.sc-dl dd { margin: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sc-quote .sc-dl-row:last-child { font-weight: 700; }
/* The heading between the money lines and the summary the buyer signs (which repeats the price). */
.sc-sub { font-size: 15px; line-height: 1.3; margin: 16px 0 4px; }
.sc-sub:has(+ .sc-dl:empty) { display: none; } /* no heading over an empty list (the agreement did not load) */
/* A link drawn as a button (the staff preview's Back) reads as a button, not as underlined text. */
a.sc-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.sc-fs { border: 1px solid var(--sc-line); border-radius: 10px; padding: 12px 14px 4px; margin: 0 0 14px; min-width: 0; }
.sc-fs legend { padding: 0 6px; font-weight: 600; }
.sc-field { display: block; margin: 0 0 12px; min-width: 0; flex: 1 1 0; }
.sc-field > span { display: block; font-size: 14px; color: var(--sc-muted); margin: 0 0 4px; }
.sc-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-row .sc-field { flex: 1 1 140px; }
.sc-row .sc-narrow { flex: 0 1 120px; }

/* 16px text in the fields keeps iOS from zooming the page when a field is focused. */
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--sc-text);
  background: var(--sc-bg);
  border: 1px solid var(--sc-line);
  border-radius: 8px;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--sc-accent);
  outline-offset: 2px;
}

.sc-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; }
.sc-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; }
.sc-check span { flex: 1 1 auto; min-width: 0; }
.sc-agree { padding: 10px 12px; border: 1px solid var(--sc-line); border-radius: 10px; }

.sc-ts { min-height: 0; margin: 0 0 14px; }

.sc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.sc-btn {
  appearance: none;
  min-height: 48px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--sc-line);
  background: var(--sc-card);
  color: var(--sc-text);
  cursor: pointer;
}
.sc-btn-primary { background: var(--sc-accent); border-color: var(--sc-accent); color: var(--sc-accent-text); flex: 1 1 200px; }
.sc-btn-quiet { background: transparent; }
.sc-btn:disabled { opacity: 0.55; cursor: not-allowed; }
#sc-continue { width: 100%; }

.sc-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  color: var(--sc-accent);
  text-decoration: underline;
  cursor: pointer;
}
.sc-links { margin: 0 0 12px; }
.sc-hold { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--sc-warn-bg); }
.sc-3ds { margin: 0 0 14px; }

/* The terms window: a fixed overlay that is its own scroll container. */
.sc-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(10, 14, 20, 0.6);
  padding: 16px;
}
.sc-modal-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--sc-card);
  color: var(--sc-text);
  border-radius: 12px;
  border: 1px solid var(--sc-line);
}
.sc-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--sc-line); }
.sc-modal-head h2 { margin: 0; font-size: 18px; }
.sc-modal-body { padding: 14px 16px; }
.sc-modal-foot { padding: 12px 16px 16px; border-top: 1px solid var(--sc-line); }

/* Terms text (the modal, store/terms.php and the status pages). */
.sc-terms-text h2, .sc-modal-body h2, .sc-modal-body h3 { font-size: 16px; margin: 18px 0 6px; }
.sc-terms-text p, .sc-modal-body p { margin: 0 0 10px; }
.sc-terms-text ul, .sc-modal-body ul { margin: 0 0 10px; padding-left: 22px; }
.sc-terms-meta { color: var(--sc-muted); font-size: 13px; overflow-wrap: anywhere; }

/* The membership terms on "Review and sign" (#226): printed in full, part of the page.
   No height limit and no inner scroll box (scrolling rule 1: the body is the one scroller). */
.sc-member { margin: 0 0 14px; padding: 12px 14px 4px; border: 1px solid var(--sc-line); border-radius: 10px; }
.sc-member-h { font-size: 17px; margin: 0 0 8px; }
.sc-member-intro { margin: 0 0 10px; }
.sc-member-terms { font-size: 15px; overflow-wrap: anywhere; }
.sc-member-terms h3 { font-size: 16px; margin: 14px 0 6px; }
.sc-member-terms p { margin: 0 0 10px; }
.sc-member-terms ul, .sc-member-terms ol { margin: 0 0 10px; padding-left: 22px; }

.sc-status-label { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.sc-landing { text-align: left; }

@media (max-width: 480px) {
  .sc-card { padding: 16px 14px; border-radius: 10px; }
  .sc-dl dt { flex-basis: 38%; }
}

/* On paper: black on white, whatever the screen shows (the agreement must print clean). */
@media print {
  :root {
    --sc-bg: #ffffff;
    --sc-card: #ffffff;
    --sc-text: #000000;
    --sc-muted: #444444;
    --sc-line: #bbbbbb;
    --sc-accent: #000000;
    --sc-accent-text: #ffffff;
    --sc-warn-bg: #fff4d6;
    --sc-warn-line: #e2b93b;
    --sc-err-bg: #fde8e6;
    --sc-err-line: #d94b3d;
    --sc-ok-bg: #e4f6ea;
    --sc-ok-line: #3aa35c;
    color-scheme: light;
  }
  .sc-top, .sc-actions, [data-print], .sc-noprint { display: none !important; }
  body { background: #ffffff; color: #000000; }
  .sc-card { border: 0; padding: 0; }
}
