/* ─────────────────────────────────────────────────────────────────
   /book — public online-booking specific styles.

   Loaded AFTER kiosk.css, so anything here either adds to the kiosk
   look or overrides it for the date/time step. Most kiosk classes
   (.screen, .bnav, .hdr, .scrd, …) are reused as-is.

   The two big additions are the day strip (a horizontal row of date
   chips at the top of step 'd') and the vertical time slider (an
   11:00–22:00 ladder where the user drags a green pill to pick a slot).
   ───────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────
   /book is for guests on their PERSONAL devices, not the salon's
   fixed iPad. kiosk.css locks the viewport at width:100vw / height:
   100vh / overflow:hidden because the kiosk iPad stays in one
   orientation and you don't want stray scroll wheels.

   That layout doesn't fit a guest scrolling /book on an iPad in
   portrait — the screens are tightly packed into the locked viewport
   and cards "glue" together with no breathing room. So we unconditionally
   re-enable natural scroll + relative-positioned screens here, the same
   way kiosk.css does inside @media (max-width: 820px).

   Each rule mirrors the mobile branch in kiosk.css so the look stays
   in sync; the difference is we lift the breakpoint constraint so
   tablet-portrait sizes get the same comfortable layout.
   ───────────────────────────────────────────────────────────────── */
html, body {
  width: 100%;
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.book-progress {
  position: fixed;
  z-index: 30;
}
.book-progress-inner {
  padding-left: 78px;
}
.screen {
  position: relative;
  z-index: 2;
  min-height: auto;
  padding: 24px 24px 32px;
}
body.has-progress .screen {
  padding-top: 84px;
}
/* Group flow shows a "Guest N of M" chip — the fixed header grows by one row,
   so the screen content needs extra clearance to not slide under it. */
body.has-party .screen {
  padding-top: 138px;
}
body.has-bottombar .screen {
  padding-bottom: 88px;
}
/* Welcome + returning re-centre inside flow */
#s0.active, #s-repeat.active {
  min-height: calc(100vh - 80px);
  padding: 32px 16px 48px;
}
/* Step screens — give cards a bit more vertical room.
   The summary screen (#s5) is a flex column; relax the card grid
   gap so the cards don't visually merge. */
.sgrid {
  gap: 18px;
}
.bnav {
  margin-top: 24px;
  gap: 12px;
}

/* WhatsApp "help" button — injected after every Next button by the
   DOMContentLoaded hook in book.html. Brand-green to read as "human
   here to help", icon + short label so it stays compact next to Next.
   The whole bnav uses flex so the button just sits inline. Mobile
   collapses the label to icon-only via media query at the bottom of
   this file to save horizontal room next to Back / step counter /
   Next on small screens. */
.btn-wa-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #25D366;             /* WhatsApp brand green */
  color: #0a1a0e !important;       /* high-contrast dark text */
  text-decoration: none !important;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
  white-space: nowrap;
}
.btn-wa-help:hover { background: #1ebf5b; transform: translateY(-1px); }
.btn-wa-help:active { transform: translateY(0); }
@media (max-width: 480px) {
  /* On narrow phones, just keep the chat-bubble icon — Back + step
     counter + Next + WA needs to fit in one row without wrapping. */
  .btn-wa-help { padding: 10px 12px; font-size: 0; gap: 0; }
  .btn-wa-help::before { content: '💬'; font-size: 18px; }
  .btn-wa-help [data-i18n] { display: none; }
}

/* ── Top chrome alignment ─────────────────────────────────────────
   The kiosk's home-btn (top:12px) + lang-picker (top:12px) + the
   public-booking progress bar (top:0, padding 14px 12px) ended up
   visually overlapping — the home button looked like it was floating
   on top of the progress track instead of inside the same row.
   Bumping the progress-bar's top padding gives both controls a
   parking lane and pushes the track + STEP label below them. */
.book-progress {
  padding-top: 22px;
  min-height: 60px;
  box-sizing: border-box;
}
.home-btn       { top: 14px !important; }
.lang-picker    { top: 14px !important; }

/* ── Tabs: Today / Week / Month ────────────────────────────────── */
.when-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 0 0 18px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.wt-btn {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(198, 134, 84, 0.18));
  border-radius: 999px;
  color: var(--muted, #a0937e);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s;
}
.wt-btn:hover { color: var(--text, #ece4d6); border-color: var(--ember, #c68654); }
.wt-btn.is-active {
  background: var(--ember, #c68654);
  color: #1a1109;
  border-color: var(--ember, #c68654);
}

/* ── Day strip: horizontal-scroll list of date chips ───────────── */
.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px 14px;
  margin: 0 -12px 18px;
  scroll-snap-type: x mandatory;
  /* Don't let the parent column-flex collapse this row when the slider
     below is tall — the day chips ARE the navigation, they must always
     show their full height. */
  flex-shrink: 0;
  min-height: 84px;
}
.day-strip::-webkit-scrollbar { height: 4px; }
.day-strip::-webkit-scrollbar-thumb { background: rgba(198, 134, 84, 0.3); border-radius: 4px; }

.day-chip {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 10px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(198, 134, 84, 0.18));
  border-radius: 12px;
  color: var(--text, #ece4d6);
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.18s;
  scroll-snap-align: start;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.day-chip:hover { border-color: var(--ember, #c68654); }
.day-chip.is-on {
  background: var(--ember, #c68654);
  color: #1a1109;
  border-color: var(--ember, #c68654);
  box-shadow: 0 2px 8px rgba(198, 134, 84, 0.35);
}
.day-chip.is-on .day-chip-mon,
.day-chip.is-on .day-chip-dow { color: rgba(26, 17, 9, 0.7); }

.day-chip-dow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted, #a0937e);
}
.day-chip-num {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
}
.day-chip-mon {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted, #a0937e);
}

/* ── Three-column grid: status panel + drag rail + tap-slot column ── */
.when-grid {
  display: grid;
  grid-template-columns: 230px 1fr 184px;
  gap: 20px;
  align-items: start;
  margin-top: 6px;
}
@media (max-width: 880px) {
  /* Mobile/tablet (owner spec 2026-06-21): status full-width on top, then the
     drag picker (left) + the tap-a-time column (right) stay SIDE BY SIDE — the
     times must stay at hand on phones, never pushed below the picker. */
  .when-grid { grid-template-columns: 1fr 150px; }
  .when-status { grid-column: 1 / -1; }
  .when-slotcol-wrap { grid-column: auto; max-height: 520px; }
  .when-slotcol { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  /* Narrow phone: tighten the gap, give the rail room, single time column. */
  .when-grid { grid-template-columns: 1fr 92px; gap: 12px; }
  .when-slotcol { grid-template-columns: 1fr; }
}

/* Tap-slot column (right): fixed 30-min start times — a clear alternative
   to dragging the pill. Past / busy slots are struck through + disabled. */
.when-slotcol-wrap { max-height: 560px; overflow-y: auto; }
.when-slotcol-title { font-family: 'Lato', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted, #a0937e); margin-bottom: 10px; }
.when-slotcol { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; align-content: start; }
.when-slot-chip {
  padding: 9px 4px; border-radius: 10px;
  border: 1px solid var(--border, rgba(198,134,84,0.18));
  background: rgba(255,255,255,0.03);
  color: var(--text, #f5e4c8);
  font-family: 'Lato', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.when-slot-chip:hover { border-color: var(--gold, #c68654); background: rgba(198,134,84,0.10); }
.when-slot-chip.is-on { background: var(--gold, #c68654); color: #0c0905; border-color: var(--gold, #c68654); }
.when-slot-chip.is-off { opacity: 0.32; text-decoration: line-through; cursor: not-allowed; pointer-events: none; }

/* Status panel (left): selected slot + duration */
.when-status {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, rgba(198, 134, 84, 0.18));
  border-radius: 14px;
  padding: 18px 18px 14px;
  position: sticky;
  top: 80px;     /* below sticky progress bar */
}
.when-status-row { margin-bottom: 12px; }
.when-status-row:last-of-type { margin-bottom: 0; }
.when-status-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted, #a0937e);
  margin-bottom: 4px;
}
.when-status-val {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  color: var(--text, #ece4d6);
  font-weight: 500;
}

.when-hint {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border, rgba(198, 134, 84, 0.18));
}
.when-hint p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #a0937e);
  margin: 0;
}

/* ── Slider container ──────────────────────────────────────────── */
.when-slider-wrap {
  background: rgba(12, 9, 5, 0.55);
  border: 1px solid var(--border, rgba(198, 134, 84, 0.18));
  border-radius: 14px;
  padding: 14px 12px;
  max-height: 560px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.when-slider-wrap::-webkit-scrollbar { width: 6px; }
.when-slider-wrap::-webkit-scrollbar-thumb { background: rgba(198, 134, 84, 0.3); border-radius: 4px; }

.when-slider {
  position: relative;
  width: 100%;
}

.when-slider-track {
  position: relative;
  width: 100%;
  /* height set inline by JS = totalSlots * pxPerSlot */
}

.when-slider-loading {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted, #a0937e);
  font-size: 14px;
  font-style: italic;
}

/* Each 10-min slot row.
   Bumped both grid colors after a phone-screen audit: previous
   0.06 / 0.18 amber rendered invisible against the dark sand
   background — a user just told us "spent a month staring at this
   thing without noticing the dashed lines existed". The new values
   keep the page's warm palette but actually carry contrast. */
.slot-cell {
  display: block;
  width: 100%;
  position: relative;
  border-bottom: 1px dashed rgba(198, 134, 84, 0.22);
  cursor: pointer;
  transition: background 0.12s;
}
/* Hour boundary — solid, much brighter so the pill's snap-to-hour
   behaviour reads as "I'm starting on the hour" without ambiguity.
   The solid line lives on the TOP of the on-hour slot (not bottom)
   so it physically lines up with the "13:00" label that sits at
   that slot's top edge. Previously it was on the bottom border,
   which placed the line one slot down (visually marking 13:10
   even though the label said 13:00) — a guest dragging the pill
   "to the solid line" was actually picking 13:10 because that's
   the y-coordinate the solid line was rendered at. */
.slot-cell.is-hour {
  border-top: 1px solid rgba(198, 134, 84, 0.55);
}
.slot-cell:hover:not(.is-busy) {
  background: rgba(102, 179, 108, 0.05);
}
.slot-cell.is-busy {
  background: rgba(255, 255, 255, 0.025);
  cursor: not-allowed;
  /* diagonal stripes to make "unavailable" obvious */
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 8px,
    rgba(255, 255, 255, 0.05) 8px,
    rgba(255, 255, 255, 0.05) 16px
  );
}

.slot-hour-label {
  position: absolute;
  left: 4px;
  top: -5px;            /* sit on the hour line, not below it; the
                           half-line offset reads as "this hour starts
                           here" even when slot rows are only 8px tall */
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted, #a0937e);
  font-family: 'Lato', sans-serif;
  pointer-events: none;
  background: rgba(12, 9, 5, 0.85);   /* readability strip — the label
                                          sits over the cell-bottom border */
  padding: 0 3px;
  border-radius: 2px;
}

/* ── The draggable green pill (the user's chosen window) ─────────
   Layout: HORIZONTAL row.
     [   time + duration (centered body)   ][ ↕ grip (right edge) ]
   The grip lives on the right edge so the guest's right thumb
   lands on it naturally on a held phone; the time + duration text
   sit in a centred body so the pill reads cleanly at any height. */
.time-pill {
  position: absolute;
  left: 50px;            /* leave room for hour labels */
  right: 8px;
  background: linear-gradient(135deg, rgba(102, 179, 108, 0.85), rgba(132, 199, 138, 0.92));
  color: #0e1a0f;
  border: 2px solid rgba(102, 179, 108, 1);
  border-radius: 8px;
  padding: 4px 8px 4px 12px;  /* slightly less right padding because
                                  the grip already has its own. The
                                  extra left padding gives the
                                  centred text some breathing room
                                  from the pill's left edge. */
  font-family: 'Lato', sans-serif;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(102, 179, 108, 0.32);
  transition: box-shadow 0.18s, transform 0.18s;
  z-index: 5;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  /* Soft floor so a 20-min pill (16px at the new px/min) stays
     touchable. The snap math uses TOP only, so visually growing
     the pill past its time range is harmless — the schedule still
     books exactly the picked duration. */
  min-height: 44px;
}
.time-pill:hover { box-shadow: 0 6px 20px rgba(102, 179, 108, 0.5); }
.time-pill.is-dragging { cursor: grabbing; box-shadow: 0 8px 24px rgba(102, 199, 108, 0.6); }

.time-pill-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;       /* horizontal centring of the two text rows */
  justify-content: center;
  gap: 1px;
}
.time-pill-time {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.time-pill-dur {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.72;
}

/* Drag handle — pinned to the right edge, vertically centred.
   The arrow glyph is larger than the old "↕ DRAG" label so it
   reads as a tap-target even when the text would overflow on a
   narrow phone width. Touch target is at least 32×min-pill-height,
   which sits comfortably inside Apple HIG's 44pt minimum once
   the pill itself is at min-height: 44px. */
.time-pill-grip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-height: 28px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.7;
  background: rgba(14, 26, 15, 0.15);
  border-radius: 6px;
  /* Faint grip-dots flanking the arrow — reads as "draggable"
     without an explicit word. */
  position: relative;
}
.time-pill-grip::before,
.time-pill-grip::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 1px;
  background: rgba(14, 26, 15, 0.35);
  left: 7px;
}
.time-pill-grip::before { top: 6px; }
.time-pill-grip::after  { bottom: 6px; }

/* ── Compact mobile tweaks ─────────────────────────────────────── */
@media (max-width: 540px) {
  .day-chip { min-width: 54px; padding: 8px 4px; }
  .day-chip-num { font-size: 18px; }
  .when-status { position: static; }
  .when-slider-wrap { max-height: 70vh; }
  .time-pill { left: 42px; }
}

/* ─────────────────────────────────────────────
   Booking consent gate (summary step, before Confirm)
   ───────────────────────────────────────────── */
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 2px 2px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.consent-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--gold, #c68654);
  cursor: pointer;
}
.consent-check span {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted, rgba(245,228,200,0.72));
}
.consent-check a {
  color: var(--gold, #c68654);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-check.is-err {
  border-color: var(--red, #c45c5c);
  background: rgba(196,92,92,0.10);
  animation: consentShake .35s ease;
}
@keyframes consentShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ─────────────────────────────────────────────
   Live promo pricing on screen 1 (promo on first page)
   A valid % code strikes the old price and shows the discounted one.
   ───────────────────────────────────────────── */
.promo-row--top { margin: 2px 0 18px; }
.dur-old { text-decoration: line-through; opacity: 0.55; font-weight: 400; margin-right: 3px; }
.dur-new { color: var(--gold, #c68654); font-weight: 700; }
/* When the duration chip is selected (ember fill), keep the discounted
   price legible against the highlight instead of gold-on-amber. */
.dur-btn.sel .dur-new { color: inherit; }
.dur-btn.sel .dur-old { opacity: 0.6; }

/* The desktop .bs-item rule sets display:flex, which overrides the default
   [hidden]{display:none} — so hidden summary rows (oil/add-ons/zones/wellness
   on the online flow) stayed visible. Make [hidden] win explicitly. */
.book-summary .bs-item[hidden] { display: none !important; }
