/* ==========================================================================
   Aliya's Beauty — booking flow
   --------------------------------------------------------------------------
   /book/, /book/confirmation.php and /in-construction.php.

   Built on the abx design system (css/ds/aliya-ds.css), on the landing
   page's frame (css/landing.css: its tokens, type, top bar, menu and cookie
   notice) and on the shared controls and sheets (css/kit.css). Anything
   added here is a --bk-* token or a .bk-* class.

   Unprefixed classes inside #book (.container, .tab.service, .cta,
   .data-field, .cal-date, .time-slot, .slidePane …) are the markup contract
   of script/script.js, which runs the booking itself. It adds and removes
   them, and injects server-rendered markup that uses them (the calendar, the
   time slots, the sign-in forms, consent forms, the payment pane), so they
   are styled here by those names — always scoped under .bk.

   Written in two layers:

     1. The flow as script.js alone drives it: it shows and hides the step
        containers itself. This is what renders if the page module fails.
     2. html.bk-live — switched on by script/booking/main.js — where the
        module decides which step is on stage and moves between them.

   Sections: 1 Tokens · 2 Frame · 3 Step layout · 4 Controls · 5 Steps
             6 Panes & notices · 7 Other pages · 8 Live layer · 9 Wide screens
             10 Motion preferences
   ========================================================================== */

/* 1. TOKENS ================================================================ */

.abx-app.alt.bk {
  --bk-sheet: var(--abx-beige-100);
  --bk-card: var(--abx-beige-50);
  --bk-amber: #a8551b;
  --bk-good: #1f6f3a;

  --bk-gutter: clamp(1.25rem, 5.4vw, 2rem);
  --bk-radius: clamp(1.5rem, 6vw, 2rem);
  --bk-dock-h: 4.75rem;
  --bk-safe-b: env(safe-area-inset-bottom, 0px);

  --bk-fs-title: clamp(2.2rem, min(10.8vw, calc(var(--alt-vh) * 7)), 3.6rem);
  --bk-figure-h: clamp(4.5rem, calc(var(--alt-vh) * 14), 9rem);

  --bk-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bk-ease-in: cubic-bezier(0.5, 0, 0.75, 0);

  /* The shared controls and sheets (css/kit.css) follow this flow's measures. */
  --kit-sheet: var(--bk-sheet);
  --kit-card: var(--bk-card);
  --kit-gutter: var(--bk-gutter);
  --kit-radius: var(--bk-radius);
  --kit-dock-h: var(--bk-dock-h);

  min-height: 100vh;
  min-height: 100svh;
  overscroll-behavior-y: none;
}

/* A tall first hero carries the eye across from the landing page. */
.bk [data-bk-step="stylist"] {
  --bk-figure-h: clamp(8rem, calc(var(--alt-vh) * 27), 17rem);
}

.bk [data-bk-step="datetime"] {
  --bk-figure-h: clamp(5rem, calc(var(--alt-vh) * 16), 10rem);
}

/* Paper surfaces: dark type, light cards. Ink surfaces flip the same tokens
   (the [data-tone] rules in landing.css do the same for the landing page). */
.bk .bk-sheet,
.bk .bk-foot,
.bk .slidePane,
.bk .prompt,
.bk .overlay,
.bk .bk-page__sheet {
  --abx-text: var(--abx-ink-900);
  --abx-text-muted: var(--abx-ink-500);
  --abx-text-subtle: var(--abx-ink-400);
  --abx-accent: var(--abx-ink-900);
  --abx-accent-hover: #2c2b27;
  --abx-inverse: var(--abx-beige-300);
  --abx-on-accent: var(--abx-beige-100);
  --abx-border: rgba(23, 23, 22, 0.1);
  --abx-border-strong: rgba(23, 23, 22, 0.22);
  --abx-surface-sunken: rgba(23, 23, 22, 0.05);
  --abx-surface-solid: var(--bk-card);
  --abx-focus: #4459d0;
  color: var(--abx-text);
}

.bk .bk-hero,
.bk .bk-dock,
.bk .bk-receipt,
.bk .bk-preview,
.bk .bk-page__hero,
.bk .bk-svc.selected,
.bk .bk-stylist.selected {
  --abx-text: var(--abx-beige-300);
  --abx-text-muted: rgba(214, 211, 205, 0.76);
  --abx-text-subtle: rgba(214, 211, 205, 0.52);
  --abx-accent: var(--abx-beige-300);
  --abx-accent-hover: var(--abx-beige-50);
  --abx-inverse: var(--abx-ink-900);
  --abx-on-accent: var(--abx-ink-900);
  --abx-border: rgba(214, 211, 205, 0.16);
  --abx-border-strong: rgba(214, 211, 205, 0.34);
  --abx-surface-sunken: rgba(214, 211, 205, 0.09);
  --abx-surface-solid: #201f1d;
  --abx-focus: #aab6ff;
  color: var(--abx-text);
}

/* 2. FRAME ================================================================= */

.bk [hidden] {
  display: none !important;
}

.bk button,
.bk [role="checkbox"],
.bk .cal-date,
.bk .time-slot,
.bk .hour-header {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bk textarea,
.bk select {
  font: inherit;
  color: inherit;
}

/* The stage. Hidden until the director (script/booking/director.js) has a
   first frame to show; until then, and for good where WebGL or motion is
   unavailable, each hero paints its own quiet version of the same light. */
.bk-stage {
  position: fixed;
  inset: 0 0 auto;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.9s var(--abx-ease), visibility 0s 0.9s;
}

html.bk-staged .bk-stage {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* An element exactly one small-viewport tall, for the stage to measure. */
.bk-probe {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 100vh;
  height: 100svh;
  visibility: hidden;
  pointer-events: none;
}

/* The landing page lets its bar scroll away when its story is not live, and
   so do the single-screen pages here. In the flow, once the page module is
   running, it stays put: bare over the hero, and the sheet's colour once the
   sheet slides beneath it. */
html.bk-live .abx-app.bk .bk-bar {
  position: fixed;
}

/* The step counter is the module's to keep; without it, it would only ever
   say "01". */
html:not(.bk-live) .bk-count {
  visibility: hidden;
}

.bk-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bk-sheet);
  box-shadow: 0 1px 0 rgba(23, 23, 22, 0.08);
  opacity: 0;
  transition: opacity var(--abx-dur-2) var(--abx-ease);
}

html[data-alt-top="paper"] .bk-bar::before {
  opacity: 1;
}

html.alt-menu-open .bk-bar::before {
  opacity: 0;
}

.bk-count {
  font-family: var(--abx-font-display);
  font-size: var(--alt-fs-meta);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--abx-text-subtle);
  white-space: nowrap;
}

.bk-count b {
  font-weight: 600;
  color: var(--abx-text);
}

html.alt-menu-open .bk-count {
  visibility: hidden;
}

/* Progress: the landing page's hairline, one fifth per step. */
.bk-progress {
  transform: scaleX(var(--bk-progress, 0.2));
  transition: transform 0.9s var(--bk-ease), color var(--abx-dur-3) var(--abx-ease);
}

/* "Preview only" — shown to staff and preview accounts while online booking
   is switched off for clients. A badge above the action bar; tap for why. */
.bk-preview {
  position: fixed;
  left: 0.9rem;
  bottom: calc(var(--bk-dock-h) + var(--bk-safe-b) + 0.9rem);
  z-index: 33;
  display: flex;
  flex-direction: column-reverse;
  max-width: min(calc(100vw - 5.5rem), 22rem);
  border: 1px solid rgba(214, 211, 205, 0.28);
  border-radius: 1.1rem;
  background: rgba(32, 31, 29, 0.94);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  font-size: var(--abx-fs-100);
  line-height: 1.45;
  transition: bottom 0.5s var(--bk-ease);
}

.bk-preview summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  font-family: var(--abx-font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.bk-preview summary::-webkit-details-marker {
  display: none;
}

.bk-preview summary::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #e0a15f;
}

.bk-preview p {
  padding: 0.9rem 1rem 0.3rem;
  color: var(--abx-text-muted);
}

/* The landing page keeps its cookie notice back for the opening scene. Here
   there is none, and the notice must clear the action bar. */
.bk .bk-cookie {
  bottom: calc(var(--bk-dock-h) + var(--bk-safe-b) + 0.75rem);
  z-index: 34;
  animation-delay: 1.4s;
}

.bk--page .bk-cookie {
  bottom: max(0.75rem, env(safe-area-inset-bottom));
}

/* "Ask the Agent" launcher (inc/clientAgentPanel.php): lifted clear of the
   action bar, and out of the way of the notice above. */
.bk .abx-agent-panel__launcher {
  right: 0.9rem;
  bottom: calc(var(--bk-dock-h) + var(--bk-safe-b) + 0.9rem);
  width: 3rem;
  height: 3rem;
  background: var(--abx-ink-900);
  color: var(--abx-beige-300);
  font-size: 1.1rem;
  z-index: 33;
}

.bk .abx-agent-panel__launcher,
.bk .abx-agent-panel__close {
  display: grid;
  place-items: center;
}

.bk .abx-agent-panel__header > span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bk .abx-agent-panel__sheet {
  z-index: 71;
}

.bk .abx-agent-panel__backdrop {
  z-index: 70;
}

/* 3. STEP LAYOUT =========================================================== */

.bk-main.alt-main {
  z-index: auto;
}

.bk-flow {
  position: relative;
}

.bk-step {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

/* script.js hides the steps it is not showing with this class. */
.bk-step.hide {
  display: none;
}

/* Hero: transparent, so the stage shows through. (Isolated, so its still
   backdrop — a layer behind its own content — is not also behind <body>.) */
.bk-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(var(--bk-figure-h), 1fr) auto;
  flex: none;
  padding: calc(var(--alt-bar-h) + env(safe-area-inset-top, 0px)) var(--bk-gutter) calc(var(--bk-radius) * 0.5 + 1.1rem);
}

/* The still backdrop: a warm light on ink, where the stage's eye would be.
   It gives way once the canvas has a frame to show. */
.bk-hero::before,
.bk-page__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46% 5% at 50% 38%, rgba(255, 237, 204, 0.42), rgba(255, 237, 204, 0) 72%),
    radial-gradient(120% 62% at 50% 38%, rgba(255, 237, 204, 0.2), rgba(255, 237, 204, 0) 64%);
  pointer-events: none;
  transition: opacity 0.9s var(--abx-ease);
}

html.bk-staged .bk-hero::before,
html.bk-staged .bk-page__hero::before {
  opacity: 0;
}

/* An empty box the stage's figure is fitted into. On a phone it reaches up
   behind the bar, between the wordmark and the menu, where nothing else is. */
.bk-anchor {
  min-height: 0;
  margin-top: calc(var(--alt-bar-h) * -0.34);
  pointer-events: none;
}

.bk-hero__copy {
  display: grid;
  gap: clamp(0.5rem, calc(var(--alt-vh) * 1.3), 0.9rem);
}

.bk-title {
  font-family: var(--alt-serif);
  font-size: var(--bk-fs-title);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.bk-title:focus {
  outline: none;
}

.bk-hero .alt-lede {
  max-width: 30ch;
  font-size: 1rem;
}

/* The sheet of paper everything is chosen on. */
.bk-sheet {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  margin-top: calc(var(--bk-radius) * -0.5);
  border-radius: var(--bk-radius) var(--bk-radius) 0 0;
  background: var(--bk-sheet);
  box-shadow: 0 -1.25rem 3rem rgba(0, 0, 0, 0.28);
}

.bk-sheet__inner {
  display: grid;
  align-content: start;
  gap: clamp(1.25rem, 5vw, 1.75rem);
  padding: clamp(1.4rem, 6vw, 2rem) var(--bk-gutter) 2.5rem;
}

.bk-empty {
  padding: 1.25rem;
  border: 1px dashed var(--abx-border-strong);
  border-radius: var(--abx-radius-lg);
  line-height: 1.5;
  color: var(--abx-text-muted);
}

.bk-empty a {
  color: var(--abx-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* The action bar. Each step brings its own buttons; the bed underneath is
   one element, so the bar itself never blinks as steps change. */
.bk-dock-bed,
.bk-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

.bk-dock-bed {
  z-index: 30;
  height: calc(var(--bk-dock-h) + var(--bk-safe-b));
  background: var(--alt-ink);
  box-shadow: 0 -1px 0 rgba(214, 211, 205, 0.12), 0 -0.75rem 2rem rgba(0, 0, 0, 0.18);
  transition: height 0.5s var(--bk-ease);
}

.bk-dock {
  z-index: 31;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: calc(var(--bk-dock-h) + var(--bk-safe-b));
  padding: 0 max(0.9rem, env(safe-area-inset-right)) var(--bk-safe-b) max(0.9rem, env(safe-area-inset-left));
}

.bk-dock__info {
  flex: 1 1 0;
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.25;
}

.bk-dock__hint {
  font-size: var(--abx-fs-100);
  color: var(--abx-text-muted);
}

.bk-dock__main {
  overflow: hidden;
  font-family: var(--abx-font-display);
  font-size: 1.02rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.bk-dock__sub {
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--abx-text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bk-dock__picked {
  flex: none;
}

@media (max-width: 29.99rem) {
  .bk-dock__picked {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

.bk-dock__clear {
  min-height: 2.75rem;
  padding: 0 0.35rem;
  font-family: var(--abx-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--abx-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bk .bk-dock .bk-cta {
  flex: none;
  min-width: 7rem;
  padding: 0 1.3rem;
}

/* The last step on a phone: what is due sits on its own line, and the button
   that takes the payment gets the full width of the bar. */
@media (max-width: 61.99rem) {
  html.bk-live[data-bk-at="summary"] .abx-app.alt.bk {
    --bk-dock-h: 7.6rem;
  }

  html.bk-live [data-bk-step="summary"] .bk-dock {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 0.6rem;
  }

  html.bk-live [data-bk-step="summary"] .bk-dock__info {
    flex: 1 0 100%;
    order: -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    column-gap: 0.65rem;
    padding-inline: 0.2rem;
  }

  html.bk-live [data-bk-step="summary"] .bk-dock .bk-cta {
    flex: 1;
  }
}

/* The foot of the sheet: a way out for anyone who would rather call. */
.bk-foot {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.9rem;
  padding: 1.75rem var(--bk-gutter) calc(var(--bk-dock-h) + var(--bk-safe-b) + 1.75rem);
  border-top: 1px solid var(--abx-border);
  background: var(--bk-sheet);
  font-size: var(--abx-fs-100);
  color: var(--abx-text-muted);
}

.bk-foot__help a {
  color: var(--abx-text);
  font-weight: 500;
  white-space: nowrap;
}

.bk-foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: var(--abx-fs-50);
}

.bk-foot__legal span {
  margin-left: auto;
}

@media (hover: hover) {
  .bk-foot a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

/* 4. CONTROLS ============================================================== */

/* Buttons, fields, tick boxes and loading veils — the pieces script.js
   names (.cta, .data-field, .checkbox-wrapper, .opacity-blur …) — are in
   css/kit.css, shared with the rest of the app. What is left here belongs
   to this flow's own markup. */

@keyframes bk-spin {
  to {
    transform: rotate(1turn);
  }
}

/* Back. */
.bk .bk-back {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--abx-border-strong);
  border-radius: 50%;
  color: var(--abx-text);
  transition: background-color var(--abx-dur-2) var(--abx-ease), transform var(--abx-dur-1) var(--abx-ease);
}

.bk .bk-back svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bk .bk-back:active {
  transform: scale(0.94);
}

/* Fields (script.js: .field-wrapper > label + .data-field > .data > input,
   then a span for the message; .data-field gets .i when invalid). The design
   system already dresses .data-field, .field-message and the password meter
   for the client portal; these rules only restate what this flow changes. */
.bk .bk-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 0.75rem;
}

.bk .bk-field--half {
  grid-column: auto;
}

.bk-field__hint {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--abx-text-muted);
}

.bk .field-message:not(:empty):not([style*="none"]) + .bk-field__hint {
  display: none;
}

/* Fold-away sections. */
.bk-fold {
  border-top: 1px solid var(--abx-border);
}

.bk-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  font-family: var(--abx-font-display);
  font-size: var(--abx-fs-100);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.bk-fold > summary::-webkit-details-marker {
  display: none;
}

.bk-fold > summary i {
  position: relative;
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
}

.bk-fold > summary i::before,
.bk-fold > summary i::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--abx-dur-2) var(--abx-ease);
}

.bk-fold > summary i::after {
  transform: rotate(90deg);
}

.bk-fold[open] > summary i::after {
  transform: rotate(0deg);
}

.bk-fold__body {
  padding-bottom: 1.1rem;
}

.bk-fold__body ul {
  display: grid;
  gap: 0.6rem;
  padding-left: 1.1rem;
  list-style: disc;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--abx-text-muted);
}

.bk-fold__aside {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--abx-text-muted);
}

/* Notes. */
.bk-note {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: var(--abx-surface-sunken);
  font-size: 0.92rem;
  line-height: 1.5;
}

.bk-note--good {
  background: rgba(31, 111, 58, 0.1);
  color: #17502b;
}

.bk-note--bad {
  background: var(--abx-danger-soft);
  color: var(--abx-danger);
}

.bk-note strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--abx-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bk-note p strong {
  display: inline;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}

/* A pane is already open over these two; no second veil needed. */
.bk #book-account-opacity-blur,
.bk #payment-blur {
  display: none !important;
}

/* 5. STEPS ================================================================= */

/* 5.1 Stylist -------------------------------------------------------------- */

.bk-stylists {
  display: grid;
  gap: 0.75rem;
}

.bk .bk-stylist {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.1rem 1.1rem 1rem;
  overflow: hidden;
  border: 1px solid var(--abx-border);
  border-radius: var(--abx-radius-lg);
  background: var(--bk-card);
  color: var(--abx-text);
  text-align: left;
  cursor: pointer;
  transition: color 0.3s var(--abx-ease), border-color 0.3s var(--abx-ease), transform var(--abx-dur-1) var(--abx-ease);
}

/* Ink floods in from wherever the card was touched (--bk-x / --bk-y). */
.bk .bk-stylist::before,
.bk .bk-svc::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--abx-ink-900);
  clip-path: circle(0% at var(--bk-x, 88%) var(--bk-y, 50%));
  transition: clip-path 0.55s var(--bk-ease);
}

.bk .bk-stylist.selected::before,
.bk .bk-svc.selected::before {
  clip-path: circle(160% at var(--bk-x, 88%) var(--bk-y, 50%));
}

.bk .bk-stylist:active {
  transform: scale(0.985);
}

.bk-stylist__avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--abx-ink-900) center / cover no-repeat;
  color: var(--abx-beige-300);
  font-family: var(--alt-serif);
  font-size: 1.6rem;
  line-height: 1;
  transition: background-color 0.3s var(--abx-ease), color 0.3s var(--abx-ease);
}

.bk-stylist.selected .bk-stylist__avatar {
  background-color: var(--abx-beige-300);
  color: var(--abx-ink-900);
}

.bk-stylist__body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.bk-stylist__name {
  font-family: var(--alt-serif);
  font-size: 1.75rem;
  line-height: 1.05;
}

.bk-stylist__bio {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--abx-text-muted);
}

.bk-stylist__count {
  margin-top: 0.15rem;
  font-family: var(--abx-font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--abx-text-muted);
}

.bk-stylist__go {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--abx-border-strong);
  border-radius: 50%;
  transition: transform var(--abx-dur-3) var(--bk-ease);
}

.bk-stylist__go svg {
  width: 1.15rem;
  height: 1.15rem;
}

.bk-stylist.selected .bk-stylist__go {
  transform: translateX(0.2rem);
}

/* 5.2 Treatments ----------------------------------------------------------- */

/* Category chips: stick under the bar while the menu scrolls past. */
.bk-rail {
  position: sticky;
  top: calc(var(--alt-bar-h) + env(safe-area-inset-top, 0px) - 1px);
  z-index: 6;
  border-radius: var(--bk-radius) var(--bk-radius) 0 0;
  background: var(--bk-sheet);
}

.bk-rail::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--abx-border);
}

.bk-rail ul {
  display: flex;
  gap: 0.4rem;
  padding: 0.9rem var(--bk-gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.bk-rail ul::-webkit-scrollbar {
  display: none;
}

.bk-rail li {
  flex: none;
}

.bk-rail a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--abx-border-strong);
  border-radius: var(--abx-radius-pill);
  font-family: var(--abx-font-display);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--abx-dur-2) var(--abx-ease), color var(--abx-dur-2) var(--abx-ease), border-color var(--abx-dur-2) var(--abx-ease);
}

.bk-rail a[aria-current="true"] {
  border-color: var(--abx-ink-900);
  background: var(--abx-ink-900);
  color: var(--abx-beige-100);
}

.bk .bk-menu {
  gap: clamp(2rem, 9vw, 3rem);
  padding-top: clamp(1.25rem, 5vw, 1.75rem);
}

.bk-cat {
  display: grid;
  gap: 1.1rem;
  /* Chips jump here; land clear of the bar and the chips themselves. */
  scroll-margin-top: calc(var(--alt-bar-h) + 4.75rem);
}

.bk-cat__title {
  font-family: var(--alt-serif);
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.bk-family {
  display: grid;
  gap: 0.5rem;
}

.bk-family + .bk-family:not(.bk-family--single),
.bk-family:not(.bk-family--single) + .bk-family {
  margin-top: 0.65rem;
}

.bk-family__name {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0 0.15rem 0.1rem;
  font-family: var(--abx-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--abx-text-muted);
}

.bk-family__name::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--abx-border-strong);
  opacity: 0.6;
}

/* One treatment. The whole row is the control (script.js toggles .selected
   on a tap anywhere in it). */
.bk .bk-svc {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--abx-border);
  border-radius: 1.1rem;
  background: var(--bk-card);
  color: var(--abx-text);
  cursor: pointer;
  transition: color 0.3s var(--abx-ease), border-color 0.3s var(--abx-ease);
}

.bk .bk-svc.selected {
  border-color: var(--abx-ink-900);
}

.bk-svc__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 0.25rem 0.85rem;
  padding: 0.95rem 0.95rem 0.95rem 1.1rem;
  outline-offset: -3px;
  transition: transform var(--abx-dur-1) var(--abx-ease);
}

.bk-svc__main:active {
  transform: scale(0.99);
}

.bk-svc__text {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.bk-svc__label {
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.25;
}

.bk-svc__desc {
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.42;
  color: var(--abx-text-muted);
  text-wrap: pretty;
}

.bk-svc__figures {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  padding-top: 0.05rem;
  white-space: nowrap;
}

.bk-svc .price {
  font-family: var(--abx-font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.bk-svc .duration {
  font-size: var(--abx-fs-50);
  letter-spacing: 0.04em;
  color: var(--abx-text-muted);
}

.bk-svc__check {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.02rem;
  border: 1.5px solid var(--abx-border-strong);
  border-radius: 50%;
  transition: background-color 0.3s var(--abx-ease), border-color 0.3s var(--abx-ease);
}

.bk-svc__check svg {
  width: 1rem;
  height: 1rem;
  color: var(--abx-ink-900);
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.35s var(--bk-ease) 0.12s;
}

.bk-svc.selected .bk-svc__check {
  border-color: var(--abx-beige-300);
  background: var(--abx-beige-300);
}

.bk-svc.selected .bk-svc__check svg {
  stroke-dashoffset: 0;
}

/* Favourite and photo: icon buttons tucked under the tick. They are the
   row's siblings, not its children, so each is its own control. */
.bk-svc--extras {
  min-height: 5.9rem;
}

.bk-svc__extras {
  position: absolute;
  right: 0.3rem;
  bottom: 0.2rem;
  display: flex;
  flex-direction: row-reverse;
}

.bk .bk-svc__fav,
.bk .bk-svc__info {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: none;
  color: var(--abx-text-muted);
  cursor: pointer;
}

.bk-svc__fav span,
.bk-svc__info span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.bk-svc__fav svg,
.bk-svc__info svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  transition: transform var(--abx-dur-2) var(--abx-ease-spring), fill var(--abx-dur-2) var(--abx-ease);
}

.bk-svc__fav:active svg {
  transform: scale(0.85);
}

.bk-svc__fav.active {
  color: var(--abx-text);
}

.bk-svc__fav.active svg {
  fill: currentColor;
  transform: scale(1.12);
}

.bk-svc__fav.loading {
  opacity: 0.5;
}

/* 5.3 Date & time ---------------------------------------------------------- */

.bk-block {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.bk-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.bk-label h2 {
  font-family: var(--alt-serif);
  font-size: 1.65rem;
  line-height: 1.1;
}

.bk-label__note {
  font-family: var(--abx-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--abx-text-muted);
}

.bk-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--abx-fs-50);
  color: var(--abx-text-muted);
}

.bk-legend__key {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--abx-ink-900);
}

.bk-legend__key--few {
  margin-left: 0.6rem;
  background: var(--bk-amber);
}

/* The calendar and the time slots themselves (.cal-date, .hour-group,
   .time-slot …) are drawn by css/kit.css: the staff schedule's booking sheet
   and date pickers show the same ones. */

.bk-times__hint {
  font-size: 0.92rem;
  color: var(--abx-text-muted);
}

.bk-times:has(#day-view) .bk-times__hint {
  display: none;
}

/* 5.4 Details -------------------------------------------------------------- */

.bk-form {
  display: grid;
  gap: 1.25rem;
}

.bk-paths {
  display: grid;
  gap: 0.75rem;
}

.bk-paths__why {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--abx-text-muted);
}

.bk-paths .cta {
  width: 100%;
}

.bk .or {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--abx-font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--abx-text-subtle);
}

.bk .or::before,
.bk .or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--abx-border-strong);
}

.bk .login-prompt,
.bk .go-back-prompt,
.bk #client .register-prompt {
  font-size: 0.95rem;
  text-align: center;
  color: var(--abx-text-muted);
}

/* 5.5 Summary -------------------------------------------------------------- */

.bk-ticket {
  position: relative;
  display: grid;
  padding: 0 1.25rem;
  border-radius: var(--abx-radius-lg);
  background: var(--bk-card);
  box-shadow: 0 1px 0 rgba(23, 23, 22, 0.06), 0 1.25rem 2.5rem -1.5rem rgba(23, 23, 22, 0.28);
}

.bk-ticket__when {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem 0 1.35rem;
}

.bk-ticket__date {
  font-family: var(--alt-serif);
  font-size: clamp(2.1rem, 10.5vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
}

.bk-ticket__time {
  font-family: var(--abx-font-display);
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bk-ticket__date:empty,
.bk-ticket__time:empty {
  display: none;
}

.bk-ticket__facts {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.bk-ticket__facts > div {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0.75rem;
}

.bk-ticket__facts dt,
.bk-ticket__label {
  font-family: var(--abx-font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--abx-text-muted);
}

.bk-ticket__facts dt {
  padding-top: 0.2rem;
}

/* A torn edge between the two halves of the ticket. */
.bk-ticket__part,
.bk-ticket__money {
  position: relative;
  display: grid;
  gap: 0.6rem;
  padding: 1.2rem 0;
  border-top: 1px dashed var(--abx-border-strong);
}

.bk-ticket__when + .bk-ticket__part::before,
.bk-ticket__when + .bk-ticket__part::after {
  content: '';
  position: absolute;
  top: -0.6rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--bk-sheet);
}

.bk-ticket__when + .bk-ticket__part::before {
  left: -1.85rem;
}

.bk-ticket__when + .bk-ticket__part::after {
  right: -1.85rem;
}

.bk-lines {
  display: grid;
  gap: 0.5rem;
}

.bk-lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  line-height: 1.35;
}

.bk-lines li span:last-child {
  font-family: var(--abx-font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bk-lines li small {
  display: block;
  font-size: var(--abx-fs-50);
  letter-spacing: 0.04em;
  color: var(--abx-text-muted);
}

/* script.js's own plain list of names; the page module draws the fuller one above. */
.bk-lines--plain {
  display: grid;
  gap: 0.35rem;
}

.bk-lines:not(:empty) + .bk-lines--plain {
  display: none;
}

.bk-ticket__who {
  display: grid;
  gap: 0.1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.bk-ticket__who span:not(:first-child) {
  font-size: 0.92rem;
  color: var(--abx-text-muted);
}

.bk-ticket .bk-fold {
  border-top-style: dashed;
  border-top-color: var(--abx-border-strong);
}

.bk-ticket__money {
  gap: 0;
  padding: 0;
  border-top: 0;
}

/* (The promotional code field is drawn by css/kit.css.) */

.bk-totals {
  display: grid;
  padding: 1.1rem 0 1.2rem;
  border-top: 1px dashed var(--abx-border-strong);
}

.bk-totals__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0;
  color: var(--abx-text-muted);
  font-variant-numeric: tabular-nums;
}

.bk-totals__row b {
  font-family: var(--abx-font-display);
  font-weight: 600;
}

.bk-totals__row i {
  font-style: normal;
}

.bk-totals__row--total {
  color: var(--abx-text);
}

.bk-totals__row--total > span {
  font-family: var(--abx-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bk-totals__row--total b {
  font-family: var(--alt-serif);
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1;
}

/* Pay today (script.js: updatePayNowPreview()). */
.bk-paytoday {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.15rem 1rem;
  margin: 0 -1.25rem;
  padding: 1.1rem 1.25rem 1.2rem;
  border-radius: 0 0 var(--abx-radius-lg) var(--abx-radius-lg);
  background: var(--abx-ink-900);
  color: var(--abx-beige-300);
}

.bk-paytoday .pay-today-label {
  font-family: var(--abx-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bk-paytoday .pay-today-value {
  font-family: var(--alt-serif);
  font-size: 1.9rem;
  line-height: 1;
}

.bk-paytoday .pay-today-note {
  grid-column: 1 / -1;
  font-size: 0.86rem;
  color: rgba(214, 211, 205, 0.76);
}

.bk .scheduled-payment-disclosure {
  margin: 1rem 0 1.25rem;
}

.bk-paytoday + .scheduled-payment-disclosure {
  margin-top: 1.25rem;
}

.bk-legal {
  display: grid;
}

.bk-legal .bk-ticket__label {
  padding-bottom: 0.85rem;
}

/* (The list of consent forms needed for the chosen treatments is drawn by
   css/kit.css: the staff booking sheet shows the same one.) */

/* 6. PANES & NOTICES ======================================================= */

/* The slide pane, payment sheet, sign-in forms, consent forms, prompt,
   popup and toasts are in css/kit.css. Section 9 adapts them to this
   flow's wide layout. */

.bk-pane__grip {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  width: 2.5rem;
  height: 0.25rem;
  margin-left: -1.25rem;
  border-radius: 1rem;
  background: var(--abx-border-strong);
}

@keyframes bk-fade {
  from {
    opacity: 0;
  }
}

/* 7. OTHER PAGES =========================================================== */

/* /book/confirmation.php and /in-construction.php: one hero, one sheet. */
.bk-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.bk-page__hero {
  position: relative;
  display: grid;
  grid-template-rows: minmax(clamp(7rem, calc(var(--alt-vh) * 26), 16rem), 1fr) auto;
  flex: none;
  padding: calc(var(--alt-bar-h) + env(safe-area-inset-top, 0px)) var(--bk-gutter) calc(var(--bk-radius) * 0.5 + 1.25rem);
}

.bk-page__sheet {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  display: grid;
  align-content: start;
  gap: 1.5rem;
  margin-top: calc(var(--bk-radius) * -0.5);
  padding: clamp(1.5rem, 6vw, 2.25rem) var(--bk-gutter) calc(2.5rem + var(--bk-safe-b));
  border-radius: var(--bk-radius) var(--bk-radius) 0 0;
  background: var(--bk-sheet);
  box-shadow: 0 -1.25rem 3rem rgba(0, 0, 0, 0.28);
}

.bk-page__sheet > * {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}

.bk-page__actions {
  display: grid;
  gap: 0.75rem;
}

.bk-page__actions .cta {
  width: 100%;
}

.bk-page__text {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--abx-text-muted);
}

.bk-page__text a {
  color: var(--abx-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bk-contact {
  display: grid;
  gap: 0.5rem;
}

.bk .bk-contact a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--abx-border-strong);
  border-radius: 1rem;
  background: var(--bk-card);
}

.bk-contact a span:first-child {
  font-family: var(--abx-font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--abx-text-muted);
}

.bk-contact a span:last-child {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

/* The tick that draws itself on the confirmation page. */
.bk-done {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--abx-font-display);
  font-size: var(--alt-fs-meta);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bk-done svg {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0.3rem;
  border-radius: 50%;
  background: var(--abx-beige-300);
  color: var(--abx-ink-900);
  stroke-dasharray: 20;
  animation: bk-draw 0.7s var(--bk-ease) 0.5s both;
}

@keyframes bk-draw {
  from {
    stroke-dashoffset: 20;
  }
}

/* 8. LIVE LAYER ============================================================ */

/* The page module decides which step is on stage (.is-active); what
   script.js does to the containers' classes and inline styles is read, not
   shown. Its slide animations are switched off, so these are safe to force. */
html.bk-live .bk-step {
  display: none !important;
}

html.bk-live .bk-step.is-active {
  display: flex !important;
}

html.bk-live .bk-step > .container-view {
  display: block !important;
  height: auto !important;
}

html.bk-live .bk-step > .container-footer {
  display: flex !important;
  height: calc(var(--bk-dock-h) + var(--bk-safe-b)) !important;
}

/* While one step hands over to the next, nothing in it takes a tap. */
html.bk-moving .bk-step,
html.bk-moving .bk-dock {
  pointer-events: none;
}

/* What rises into place when a step arrives (see flow.js). */
html.bk-live .bk-step.is-entering [data-bk-rise],
html.bk-live .bk-step.is-entering .bk-hero__copy > *,
html.bk-live .bk-step.is-entering .bk-cat,
html.bk-live .bk-step.is-entering .bk-dock > * {
  animation: bk-rise 0.7s var(--bk-ease) both;
  animation-delay: calc(var(--bk-i, 0) * 55ms + 60ms);
}

html.bk-live .bk-step.is-entering .bk-dock > * {
  animation-name: bk-fade;
  animation-duration: 0.4s;
  animation-delay: 0.1s;
}

@keyframes bk-rise {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
}

html.bk-live .bk-step.is-leaving .bk-hero__copy,
html.bk-live .bk-step.is-leaving .bk-sheet > *,
html.bk-live .bk-step.is-leaving .bk-dock > * {
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity 0.18s var(--abx-ease), transform 0.18s var(--bk-ease-in);
}

html.bk-live .bk-step.is-leaving .bk-dock > * {
  transform: none;
}

/* One bookable stylist: the step was skipped, so there is no way back to it. */
html.bk-solo #back-to-staff {
  display: none;
}

/* The stylist step is a single tap: the card is the button. */
html.bk-live [data-bk-step="stylist"] .bk-cta {
  display: none;
}

html.bk-live [data-bk-step="stylist"].is-returning .bk-cta {
  display: inline-flex;
}

/* Times, live: hours as a row of chips, and only the open hour's minutes
   underneath. Which hour is open is the module's to remember (.bk-open),
   because script.js rebuilds this list every few seconds. */
html.bk-live .time-hours-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

html.bk-live .hour-group {
  display: contents;
}

html.bk-live .hour-group.no-available .hour-header {
  display: none;
}

html.bk-live .hour-header {
  order: 1;
  position: relative;
  justify-content: center;
  min-height: 3rem;
  padding: 0 0.25rem;
  overflow: hidden;
  border-color: var(--abx-border-strong);
  border-radius: 0.9rem;
  background: var(--bk-card);
  transition: background-color var(--abx-dur-2) var(--abx-ease), color var(--abx-dur-2) var(--abx-ease), border-color var(--abx-dur-2) var(--abx-ease);
}

html.bk-live .availability-count {
  display: none;
}

/* How much of the hour is still free, as a rule along the chip's foot. */
html.bk-live .hour-header::after {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0.42rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
  transform: scaleX(var(--bk-free, 1));
  transform-origin: left center;
}

/* The open hour is only being looked through, so it is outlined. Filled
   means chosen, as for the day and the time: only the hour holding the
   chosen time is filled. */
html.bk-live .hour-group.bk-open .hour-header,
html.bk-live .hour-group.bk-has-pick .hour-header {
  border-color: var(--abx-ink-900);
  box-shadow: inset 0 0 0 1px var(--abx-ink-900);
}

html.bk-live .hour-group.bk-has-pick .hour-header {
  background: var(--abx-ink-900);
  color: var(--abx-beige-100);
}

html.bk-live .hour-slots {
  order: 2;
  display: none !important;
  grid-column: 1 / -1;
  height: auto !important;
  padding: 0.85rem 0 0.25rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--abx-border);
}

html.bk-live .hour-group.bk-open .hour-slots {
  display: grid !important;
}

html.bk-live .bk-times.is-fresh .hour-header,
html.bk-live .bk-times.is-fresh .hour-group.bk-open .time-slot {
  animation: bk-rise 0.5s var(--bk-ease) both;
}

/* The summary's big date and time say what these two rows say. */
html.bk-live .bk-ticket__facts > div:nth-child(-n + 2) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Panes: a class on <html> says one is open, so the page behind can be held
   still whatever script.js last wrote to its inline styles. */
html.bk-live {
  overflow-y: auto !important;
}

html.bk-live.bk-pane-open {
  overflow: hidden !important;
}

html.bk-live body {
  overflow: visible !important;
}

html.bk-live.bk-pane-open .bk #slidePane-wrapper .blur,
html.bk-live.bk-pane-open .bk #slidePane-wrapper .base {
  display: block !important;
}

/* script.js removes its backdrop the instant a pane closes, 300ms before it
   empties the pane. So the dimming is drawn on .base, which outlives it and
   can fade; the script's own .blur stays, unseen, to catch taps outside. */
html.bk-live .bk #slidePane-wrapper .blur {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: none;
}

html.bk-live .bk #slidePane-wrapper .base::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 22, 0.62);
  opacity: 0;
  transition: opacity 0.28s var(--abx-ease);
}

html.bk-live.bk-pane-open .bk #slidePane-wrapper .base::before {
  opacity: 1;
  transition-duration: 0.4s;
}

/* A receipt of what has been chosen so far (wide screens; see section 9). */
.bk-receipt {
  display: none;
}

/* 9. WIDE SCREENS ========================================================== */

/* Tablets held upright: still one column, kept to a comfortable measure. */
@media (min-width: 46rem) and (max-width: 61.99rem) {
  .bk-hero__copy,
  .bk-anchor,
  .bk-sheet__inner,
  .bk-rail ul,
  .bk-foot > *,
  .bk-page__sheet > * {
    width: 100%;
    max-width: 42rem;
    margin-inline: auto;
  }

  .bk-dock {
    padding-inline: max(1.5rem, calc((100% - 42rem) / 2));
  }
}

@media (min-width: 40rem) {
  .bk .calendarDaysOfWeek,
  .bk .calendarWeek,
  .bk .calendarScrollOuter {
    gap: 0.45rem;
  }

  .bk .cal-date {
    aspect-ratio: 1 / 0.82;
  }

  html.bk-live .time-hours-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .bk .hour-slots {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Phone-sized sheets and everything in them are single columns that only get
   roomier; from here the stage and the sheet sit side by side. */
@media (min-width: 62rem) {
  .abx-app.alt.bk {
    --bk-col: clamp(28rem, 44vw, 40rem);
    --bk-gutter: clamp(2rem, 3.4vw, 3.25rem);
    --bk-fs-title: clamp(3rem, min(5.4vw, calc(var(--alt-vh) * 9.5)), 5.75rem);
    --bk-dock-h: 5.5rem;
  }

  .bk-stage {
    width: calc(100% - var(--bk-col));
  }

  /* The bar straddles both: wordmark over the stage, menu over the sheet. */
  .bk .bk-bar .alt-bar__actions {
    --abx-text: var(--abx-ink-900);
    --abx-text-subtle: var(--abx-ink-400);
    color: var(--abx-ink-900);
  }

  html.alt-menu-open .bk .bk-bar .alt-bar__actions {
    color: var(--abx-beige-300);
  }

  /* Only the sheet scrolls here; once it has, the menu's half of the bar
     takes the sheet's colour so nothing shows through behind it. */
  .bk-bar::before {
    left: auto;
    width: var(--bk-col);
  }

  html.bk-scrolled .bk-bar::before {
    opacity: 1;
  }

  .bk-progress {
    left: auto;
    width: var(--bk-col);
    color: var(--abx-ink-900);
  }

  .bk-preview {
    left: var(--bk-gutter);
    top: calc(var(--alt-bar-h) + 0.25rem);
    bottom: auto;
    flex-direction: column;
    max-width: 22rem;
  }

  .bk-preview p {
    padding: 0.2rem 1rem 0.9rem;
  }

  .bk-step,
  .bk-page {
    display: block;
    min-height: 0;
  }

  html.bk-live .bk-step.is-active {
    display: block !important;
  }

  .bk-hero,
  .bk-page__hero {
    position: fixed;
    inset: 0 var(--bk-col) 0 0;
    grid-template-rows: minmax(0, 1fr) auto;
    padding-bottom: clamp(2rem, calc(var(--alt-vh) * 6), 4rem);
  }

  .bk-anchor {
    margin: 0 0 clamp(1rem, calc(var(--alt-vh) * 3), 2.5rem);
  }

  /* With a receipt underneath, the copy sits above it. */
  html.bk-live .bk-hero {
    padding-bottom: calc(var(--bk-receipt-h, 0px) + clamp(2rem, calc(var(--alt-vh) * 6), 4rem));
    transition: padding-bottom 0.6s var(--bk-ease);
  }

  .bk-hero .alt-lede {
    max-width: 34ch;
    font-size: var(--alt-fs-lede);
  }

  .bk-sheet,
  .bk-page__sheet,
  .bk-foot {
    width: var(--bk-col);
    margin: 0 0 0 auto;
    border-radius: 0;
    box-shadow: none;
  }

  .bk-sheet {
    min-height: 100vh;
  }

  .bk-sheet__inner {
    padding-top: calc(var(--alt-bar-h) + 1.5rem);
  }

  .bk-page__sheet {
    min-height: 100vh;
    padding-top: calc(var(--alt-bar-h) + 2rem);
    align-content: center;
  }

  .bk-rail {
    top: 0;
    padding-top: var(--alt-bar-h);
    border-radius: 0;
  }

  .bk-rail + .bk-sheet__inner {
    padding-top: 1.75rem;
  }

  .bk-cat {
    scroll-margin-top: calc(var(--alt-bar-h) + 5.5rem);
  }

  .bk-dock-bed,
  .bk-dock {
    left: auto;
    width: var(--bk-col);
  }

  .bk-dock {
    gap: 0.9rem;
    padding-inline: var(--bk-gutter);
  }

  .bk .bk-dock .bk-cta {
    min-width: 10rem;
  }

  /* Notices keep to the sheet's side, clear of the headline and the receipt. */
  .bk .bk-cookie {
    left: auto;
    right: 1.5rem;
    bottom: calc(var(--bk-dock-h) + 1.25rem);
  }

  .bk--page .bk-cookie {
    bottom: 1.5rem;
  }

  .bk .abx-agent-panel__launcher {
    right: 1.5rem;
    bottom: calc(var(--bk-dock-h) + 1.25rem);
  }

  .bk #popup {
    left: auto;
    right: calc((var(--bk-col) - min(26rem, var(--bk-col) - 2rem)) / 2);
    width: min(26rem, calc(var(--bk-col) - 2rem));
    margin: 0;
  }

  /* Sign in, payment and consent forms slide in over the sheet instead of
     rising from the bottom. */
  .bk .slidePane {
    inset: 0 0 0 auto;
    width: var(--bk-col);
    max-height: none;
    margin: 0;
    border-radius: 0;
    transform: translateX(102%);
  }

  .bk-pane__grip {
    display: none;
  }

  .bk .slidePane-header {
    padding-top: 1.1rem;
  }

  .bk .slidePane-view {
    padding-top: 2.4rem;
  }

  /* The receipt: what the appointment is so far, under the headline. */
  html.bk-live .bk-receipt {
    position: fixed;
    left: var(--bk-gutter);
    bottom: clamp(2rem, calc(var(--alt-vh) * 6), 4rem);
    z-index: 3;
    display: grid;
    gap: 0.75rem;
    width: min(calc(100% - var(--bk-col) - var(--bk-gutter) * 2), 30rem);
    padding-top: 1.1rem;
    border-top: 1px solid var(--abx-border-strong);
    transition: opacity 0.5s var(--abx-ease), transform 0.6s var(--bk-ease);
  }

  html.bk-live .bk-receipt.is-empty {
    opacity: 0;
    transform: translateY(0.75rem);
    pointer-events: none;
  }

  .bk-receipt dl {
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .bk-receipt dl > div {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .bk-receipt dt {
    padding-top: 0.22rem;
    font-family: var(--abx-font-display);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--abx-text-muted);
  }

  .bk-receipt dd b {
    font-family: var(--abx-font-display);
    font-weight: 600;
  }
}

/* A phone on its side: no room for a tall hero. */
@media (max-height: 30rem) and (max-width: 61.99rem) {
  .abx-app.alt.bk,
  .bk [data-bk-step] {
    --bk-figure-h: 0.5rem;
  }

  .bk-hero .alt-lede {
    display: none;
  }
}

/* The smallest phones: the lede gives way so the sheet starts sooner. */
@media (max-height: 40rem) and (max-width: 61.99rem) {
  .bk [data-bk-step]:not([data-bk-step="stylist"]) .bk-hero .alt-lede {
    display: none;
  }
}

/* 10. MOTION PREFERENCES =================================================== */

@media (prefers-reduced-motion: reduce) {
  .bk *,
  .bk *::before,
  .bk *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .bk .cta.is-busy::after,
  .bk .opacity-blur::after,
  .bk #payment-status.loading::before {
    animation-duration: 1.2s !important;
  }
}
