/* ==========================================================================
   Booking pages — /book/ and a customer's own booking.

   Loaded only on those pages, after styles.css, and written entirely in that
   file's tokens: a re-skinned site re-skins its booking pages with no edit
   here. Nothing in this file names a colour or a font.

   Every control is a real link or a real button, 44px or taller, so the
   whole thing works on a phone with JavaScript off.
   ========================================================================== */

/* Past the first step the page's job is the form, not the headline. On a
   phone the full page head pushed the day strip below the fold. */
.page-head--compact {
  padding-top: clamp(6.5rem, 13vh, 8.5rem);
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}
.page-head--compact h1 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); }

.bk { padding-block: clamp(1.5rem, 4vw, 3.5rem) var(--pad); }
.bk__inner { max-width: min(46rem, 100%); }

/* --- Steps --------------------------------------------------------------- */
.bk-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.bk-steps li { list-style: none; }
.bk-steps [aria-current="step"] { color: var(--ink); font-weight: 600; }

.bk h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); margin-bottom: 1.25rem; }

/* /book/privacy/ — the one booking page that is mostly reading. Seven short
   sections, so the headings step down from the page-sized .bk h2 above and the
   measure is held to a comfortable line length. */
.bk-prose { max-width: 40rem; }
.bk-prose h2 { font-size: clamp(1.1rem, 1.9vw, 1.3rem); margin: 2.25rem 0 0.5rem; }
.bk-prose p { margin: 0 0 0.9rem; }
.bk-prose .lede { margin-bottom: 0.5rem; }

/* --- Messages ------------------------------------------------------------ */
/* The same quiet box as the enquiry form's status line: a hairline all round,
   not a coloured stripe down one side. */
.bk-alert {
  border: 1px solid var(--hair-strong);
  background: var(--paper-2);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  color: var(--ink);
}
.bk-alert--error { border-color: var(--todo); color: var(--todo); }
.bk-alert a { color: var(--water); }
/* A demo's strip: the marker colour, because it means the same thing — this
   is not real yet. */
.bk-alert--demo { border-color: var(--todo); }
.bk-alert--demo strong { color: var(--todo); }

/* --- Services ------------------------------------------------------------ */
.bk-services { border-bottom: 1px solid var(--hair); }
.bk-service {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.5rem;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--hair);
  text-decoration: none;
  color: var(--ink-2);
  min-height: 44px;
}
.bk-service:hover .bk-service__name,
.bk-service:focus-visible .bk-service__name { color: var(--water); }
.bk-service:focus-visible { outline: 2px solid var(--water); outline-offset: 4px; }
.bk-service__name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink);
  letter-spacing: -0.015em;
  transition: color 0.3s var(--ease);
}
.bk-service__meta { font-size: 0.875rem; color: var(--muted); }
.bk-service__desc { grid-column: 1; font-size: 0.9375rem; }
.bk-service__go { grid-row: 1 / span 3; grid-column: 2; color: var(--ink); font-size: 1.25rem; }

/* --- The chosen booking, carried down the page --------------------------- */
.bk-chosen {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  margin-bottom: 2rem;
}
.bk-chosen__what { color: var(--ink); font-weight: 600; }
.bk-chosen__meta { font-size: 0.9375rem; color: var(--muted); }
.bk-link {
  color: var(--water);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  padding-block: 0.6rem;
}

/* --- Days ---------------------------------------------------------------- */
.bk-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(4.25rem, 1fr);
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  /* The browser's own scrollbar is bright white on a dark palette — found on
     demos/dpt. A thin one in the site's hairline colour works on both. */
  scrollbar-width: thin;
  scrollbar-color: var(--hair-strong) transparent;
}
.bk-day {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 4.5rem;
  padding: 0.6rem 0.25rem;
  border: 1px solid var(--hair-strong);
  border-radius: var(--bk-radius, 0);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.bk-day__name { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.bk-day__num { font-family: var(--font-display); font-weight: var(--weight-display); font-size: 1.35rem; line-height: 1; }
.bk-day__month { font-size: 0.6875rem; color: var(--muted); }
a.bk-day:hover { border-color: var(--ink); }
a.bk-day:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }
.bk-day[aria-current="date"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.bk-day[aria-current="date"] .bk-day__name,
.bk-day[aria-current="date"] .bk-day__month { color: rgb(var(--paper-rgb) / 0.7); }
.bk-day.is-full { color: var(--muted); border-style: dashed; opacity: 0.55; }

.bk-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}

/* --- Times --------------------------------------------------------------- */
.bk-times-group { margin-bottom: 1.5rem; }
.bk-times-group h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.bk-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
  gap: 0.5rem;
}
.bk-time {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid var(--hair-strong);
  border-radius: var(--bk-radius, 0);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.bk-time:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.bk-time:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }

/* --- Details form -------------------------------------------------------- */
.bk-form { max-width: min(34rem, 100%); }
.bk-small { font-size: 0.875rem; color: var(--muted); margin-top: 1rem; max-width: min(46ch, 100%); }

/* "Already booked?" under the services: its own band with a real button, not
   a small line of text — Ash nearly missed the old one, 2026-09-15. */
.bk-find {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; margin-top: 2rem; padding: 1.25rem 1.5rem;
  border: 1px solid var(--hair-strong); border-radius: var(--bk-radius, 0);
}
.bk-find__title {
  margin: 0;
  font-family: var(--font-display); font-weight: var(--weight-display);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink);
}
.bk-find__text { margin: 0.25rem 0 0; color: var(--muted); }

/* --- A customer's own booking -------------------------------------------- */
.bk-detail { border-bottom: 1px solid var(--hair); margin-bottom: 2rem; }
.bk-detail div {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--hair);
}
.bk-detail dt { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.bk-detail dd { color: var(--ink); }
.bk-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-bottom: 1.5rem; }
.bk-cancel { color: var(--todo); }
.bk-strike { text-decoration: line-through; color: var(--muted); }

@media (max-width: 520px) {
  .bk-detail div { grid-template-columns: 1fr; gap: 0.15rem; }
  .bk-actions .btn,
  .bk-find .btn { width: 100%; justify-content: center; }
}
