/* Another Booth — guest booking flow (phone-first, scanned via QR).
 * Builds on styles.css (design tokens, .btn, gradient background).
 * UI-only scaffold: OTP / PayNow / queue are simulated in book.js.
 */

/* The booking flow scrolls (the room-tablet UI is fixed-height); re-enable it. */
.book-body { overflow-y: auto; height: auto; min-height: 100dvh; }

.book { min-height: 100dvh; display: flex; flex-direction: column; }

/* slim brand bar — hidden by default, shown only on the screens in BAR_SCREENS (book.js) */
.brand-bar {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.4vh, 20px) 16px clamp(2px, 0.8vh, 8px);
}
body.show-brand-bar .brand-bar { display: flex; }
/* horizontal wordmark (~7.4:1) — size by height so it stays slim */
.brand-logo { height: clamp(20px, 4.5vw, 30px); width: auto; display: block; }

/* one screen visible at a time (book.js toggles .hidden); the visible screen
   fills the viewport below the brand bar, then grows + scrolls if content is tall */
.screen { flex: 1 0 auto; min-height: 0; display: flex; flex-direction: column; }

/* ---- centred card screens (welcome / complete) ---------------------------- */
.card-screen {
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 6vh, 60px) clamp(16px, 5vw, 40px);
  gap: 22px;
}

/* welcome hero: big square lockup + a single Proceed button */
.welcome-logo { width: clamp(220px, 64vw, 400px); height: auto; display: block; }
/* .btn-cta sets width:100% (and is defined later), so override at higher specificity:
   content-width with a comfy max so it isn't full-bleed on desktop, finger-wide on mobile */
.btn-cta.welcome-proceed { width: clamp(240px, 50vw, 300px); }
/* Recovery link under BOOK NOW — only shown when a saved booking exists.
   A quiet text link, not a second CTA, so it never competes with BOOK NOW. */
.resume-link {
  margin-top: -6px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(0.92rem, 2.2vw, 1rem);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  opacity: 0.85;
}
.resume-link:hover { opacity: 1; }
.card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(25px, 4.5vw, 47px) clamp(20px, 4.5vw, 50px);
  text-align: center;
}
.card-wide { max-width: 720px; }

.card-sub {
  color: var(--ink);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.5;
  margin: 0 auto 26px;
  max-width: 36ch;
  text-align: center;
}

/* ---- the wide CTA button used across the flow ----------------------------- */
.btn-cta {
  display: block;
  width: 100%;
  padding: 20px 24px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  border-radius: 16px;
  background: var(--magenta);
  color: #fff;
}
.btn-cta:hover { background: var(--magenta-dark); }
/* the disabled CTA in the Figma is an outline, not a greyed solid */
.btn-cta:disabled {
  background: transparent;
  color: var(--magenta);
  border: 1.5px solid var(--magenta-soft);
  cursor: default;
}

/* ---- wizard screens (steps 1–4) ------------------------------------------- */
.wizard-screen {
  padding: clamp(18px, 4vh, 36px) clamp(16px, 5vw, 48px) clamp(20px, 4vh, 40px);
  gap: clamp(18px, 3vh, 30px);
}
.wiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}
/* shared pill design: the Previous-Step button (left) + the step indicator (right) */
.pill {
  border: 1.5px solid var(--magenta);
  color: var(--magenta);
  background: transparent;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
/* Previous button: muted/subtle so the step indicator leads */
.prev-step-btn {
  border-color: #e7d4e0;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.prev-step-btn:hover { background: #f6eef2; color: var(--ink-strong); }
.prev-step-btn:active { transform: translateY(1px); }
/* the "STEP X OF 4" indicator is an uppercase label -> mono, like anotherbooth-web */
.step-pill { font-family: var(--font-mono); }

.wiz-body {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.eyebrow.center { text-align: center; letter-spacing: 0.14em; }
.wiz-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.4vw, 2.2rem);
  font-weight: 700;
  color: var(--ink-strong);
  margin: 0 0 6px;
  text-align: center;
}
.wiz-title em { color: var(--magenta); font-style: normal; }

.wiz-next {
  width: min(760px, 100%);
  margin: 0 auto;
}

/* context chips (selected frame / photos / qty echoed on later steps) */
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip-row.center { justify-content: center; }
.ctx-chip {
  border: 1.5px solid var(--magenta);
  color: var(--magenta);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Step 1: frame grid --------------------------------------------------- */
.frame-grid {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 frames -> single row on desktop */
  gap: clamp(14px, 2.5vw, 24px);
}
.frame-card {
  text-align: center;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid transparent;
  border-radius: 22px;
  padding: clamp(20px, 3vw, 34px);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}
.frame-card:active { transform: scale(0.99); }
.frame-card.selected { border-color: var(--magenta); background: var(--pin-pink); }
.frame-thumb {
  height: clamp(74px, 10vw, 108px);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--magenta-soft);
}
.frame-name { font-size: clamp(1.05rem, 2.6vw, 1.35rem); font-weight: 600; color: #1c1420; }
.frame-desc { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }

/* ---- Step 2: layout grid -------------------------------------------------- */
.layout-grid {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(12px, 2vw, 22px);
}
.layout-card {
  text-align: center;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid transparent;
  border-radius: 22px;
  padding: clamp(18px, 2.4vw, 30px) 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.layout-card.selected { border-color: var(--magenta); background: var(--pin-pink); }
.layout-thumb {
  height: clamp(70px, 9vw, 100px);
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--magenta-soft);
}
.layout-name { font-size: 1.1rem; font-weight: 600; color: #1c1420; }
.layout-desc { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* ---- Step 3: quantity stepper --------------------------------------------- */
.qty-stepper-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 20px);
  margin-top: clamp(20px, 5vh, 56px);
}
.qty-step-btn {
  width: clamp(58px, 12vw, 76px);
  height: clamp(58px, 12vw, 76px);
  border: none;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--magenta);
  font-family: inherit;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}
.qty-step-btn:hover { background: var(--pin-pink); }
.qty-step-btn:active { transform: translateY(1px); }
.qty-step-btn:disabled { color: var(--magenta-soft); background: var(--surface); opacity: 0.6; cursor: default; }
.qty-display {
  min-width: clamp(120px, 28vw, 180px);
  height: clamp(58px, 12vw, 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.qty-count {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 600;
  color: var(--magenta);
  font-variant-numeric: tabular-nums;
}
.qty-note {
  text-align: center;
  color: var(--magenta);
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  line-height: 1.6;
  margin: 14px 0 0;
}
.qty-pay {
  width: min(360px, 84vw);
  margin: clamp(20px, 4vh, 34px) auto 0;
}

/* ---- Step 4: payment ------------------------------------------------------ */
.pay-body { gap: 14px; }
/* one-line order recap under the total, in a single bordered pill (like the chips) */
.pay-recap {
  align-self: center; /* hug the content + centre, not full-width */
  border: 1.5px solid var(--magenta);
  color: var(--magenta);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: clamp(0.85rem, 2.2vw, 0.95rem);
  font-weight: 600;
  margin: 0;
  text-align: center;
}
.pay-total {
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 600;
  color: var(--magenta);
  margin: 6px 0 4px;
  text-align: center;
}
.pay-qr {
  width: clamp(200px, 44vmin, 320px);
  aspect-ratio: 1 / 1;
  margin: 8px auto;
  padding: 16px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.pay-qr img { width: 100%; height: 100%; display: block; }
.pay-expiry { color: var(--ink); font-size: 1rem; margin: 6px 0 0; }
.pay-expiry b { color: var(--magenta); font-variant-numeric: tabular-nums; }
.pay-warn { color: var(--magenta); font-size: 0.92rem; margin: 8px auto 0; max-width: 46ch; text-align: center; }

/* simulation affordances (removed when the backend lands) */
.pay-sim {
  margin: 22px auto 0;
  width: auto;
  padding: 12px 22px;
  font-size: 0.85rem;
  border-radius: 12px;
  background: var(--surface);
  color: var(--magenta);
  box-shadow: var(--shadow);
  opacity: 0.85;
}

/* ---- Step 6: complete (queue / your turn) --------------------------------- */
/* One pink-bordered card; internal <hr class="cc-rule"> rules section it. The
   queue and turn states share the shell. Children supply their own padding so
   the rules can run edge-to-edge. */
.complete-card {
  width: 100%;
  max-width: 720px;
  padding: 0;
  border: 1.5px solid rgba(192, 30, 111, 0.5);
  overflow: hidden;        /* keep the edge-to-edge rules inside the radius */
}
.cc-block { padding: clamp(30px, 6vw, 42px) clamp(20px, 5vw, 40px); }
.cc-center { text-align: center; }
.cc-rule { border: 0; border-top: 1px solid rgba(150, 70, 120, 0.18); margin: 0; }

.cc-eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--ink);
  font-size: clamp(0.82rem, 2.2vw, 0.95rem);
  margin: 0 0 10px;
}
.cc-number {
  font-size: clamp(2.4rem, 9.5vw, 3.6rem);
  font-weight: 600;
  color: var(--magenta);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.cc-requeue {
  color: var(--magenta);
  font-size: clamp(0.78rem, 2vw, 0.9rem);
  line-height: 1.5;
  margin: 12px auto 0;
  max-width: 38ch;
}
.cc-turn-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 800;
  color: var(--magenta);
  margin: 0 0 12px;
}

/* shared label / sub typography */
.cc-label {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--muted);
  font-size: clamp(0.7rem, 1.9vw, 0.8rem);
  margin: 0;
}
.cc-sub { color: var(--muted); font-size: clamp(0.8rem, 2vw, 0.9rem); line-height: 1.45; margin: 6px 0 0; }
.cc-pinrow-text .cc-sub { margin: 0; }   /* the flex-column gap handles spacing here */

/* stats row: two columns split by a vertical rule */
.cc-stats { display: flex; }
.cc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(18px, 3.6vw, 26px) clamp(16px, 4vw, 32px);
  text-align: center;
}
.cc-stat + .cc-stat { border-left: 1px solid rgba(150, 70, 120, 0.18); }
.cc-stat-value { color: var(--ink-strong); font-size: clamp(1.1rem, 3.2vw, 1.45rem); font-weight: 600; }

/* PIN row: label block on the left, spaced PIN on the right */
.cc-pinrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 3.6vw, 26px) clamp(20px, 5vw, 40px);
}
.cc-pinrow-text { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.cc-pin {
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--magenta);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cc-pin-lg { font-size: clamp(2.2rem, 9vw, 3.2rem); margin: 0 0 14px; }

/* footer note(s): foyer reminder (queue) or the timing/forfeit warning (turn) */
.cc-foot {
  color: var(--magenta);
  font-size: clamp(0.8rem, 2vw, 0.92rem);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 46ch;
  padding: clamp(26px, 5vw, 36px) clamp(24px, 5vw, 40px);
  text-align: center;
}
/* Only the turn card stacks two visible foots; collapse the gap there.
   Scoped so it never hits the queue card's hidden-then-shown footer pair. */
#complete-turn .cc-foot + .cc-foot { padding-top: 0; }
.cc-foot-warn { font-weight: 700; }

.cc-updates {
  color: var(--muted);
  font-size: clamp(0.78rem, 1.9vw, 0.88rem);
  text-align: center;
  margin: 2px 0 0;
}

.complete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 560px) {
  .frame-grid { grid-template-columns: 1fr; }
}

/* ---- Footer: business identity + policy links (persistent) ---------------- */
.site-footer {
  flex: 0 0 auto;
  text-align: center;
  padding: clamp(14px, 3vh, 22px) 16px;
  border-top: 1px solid rgba(150, 70, 120, 0.12);
}
.footer-legal { color: var(--muted); font-size: 0.72rem; line-height: 1.5; margin: 0 0 6px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  font-size: 0.72rem;
}
.footer-links a { color: var(--magenta); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links span { color: var(--muted); }

/* ---- Legal pages (terms / privacy / refund) ------------------------------- */
.legal-body { overflow-y: auto; height: auto; min-height: 100dvh; }
.legal {
  width: min(720px, calc(100% - 32px));
  margin: clamp(20px, 5vh, 56px) auto clamp(8px, 2vh, 16px);
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 56px);
}
.legal-logo { height: 32px; width: auto; display: block; margin: 0 0 28px; }
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--ink-strong);
  margin: 0 0 4px;
}
.legal .updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 26px; }
.legal h2 {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  color: var(--ink-strong);
  margin: 26px 0 8px;
}
.legal p, .legal li { color: var(--ink); font-size: 1rem; line-height: 1.65; }
.legal ul { padding-left: 1.2em; margin: 8px 0; }
.legal li { margin: 4px 0; }
.legal a { color: var(--magenta); }
.legal .back { display: inline-block; margin-top: 30px; color: var(--magenta); text-decoration: none; font-weight: 600; }
.legal .back:hover { text-decoration: underline; }
