/* ─────────────────────────────────────────────────────────────────
   /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).
   ───────────────────────────────────────────────────────────────── */

/* ── 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);
}

/* ── Two-column grid: status panel + slider ────────────────────── */
.when-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 6px;
}
@media (max-width: 720px) {
  .when-grid { grid-template-columns: 1fr; }
}

/* 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 */
.slot-cell {
  display: block;
  width: 100%;
  position: relative;
  border-bottom: 1px dashed rgba(198, 134, 84, 0.06);
  cursor: pointer;
  transition: background 0.12s;
}
.slot-cell.is-hour {
  border-bottom: 1px solid rgba(198, 134, 84, 0.18);
}
.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: 6px;
  top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted, #a0937e);
  font-family: 'Lato', sans-serif;
  pointer-events: none;
}

/* ── The draggable green pill (the user's chosen window) ───────── */
.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: 6px 10px;
  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: column;
  justify-content: center;
  gap: 2px;
}
.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, 179, 108, 0.6); }

.time-pill-time {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
}
.time-pill-dur {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
}
.time-pill-grip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 2px;
}

/* ── 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; }
}
