/* booking.css — the public appointment request and private receipt. Everything here
   is sized for a thumb on a phone: big targets, one decision at a time, and a
   sticky bar that turns the chosen slot into the only thing left to press. */

.bk-page { padding-bottom: 48px; }
.bk-page.has-bar { padding-bottom: calc(148px + env(safe-area-inset-bottom)); }

.bk-hero { position: relative; overflow: hidden; padding: 92px 0 34px; color: #fff; }
.bk-hero-photo { position: absolute; inset: 0; }
.bk-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.bk-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,51,62,.86), rgba(7,51,62,.72)); }
.bk-hero-text { position: relative; z-index: 1; display: grid; gap: 14px; }
.bk-hero-text .eyebrow { color: rgba(255,255,255,.78); }
.bk-hero-text h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: 0; }
.bk-hero-text p { margin: 0; color: rgba(255,255,255,.88); max-width: 54ch; }
.bk-page-head { display: grid; gap: 14px; min-width: 0; }
.bk-page-head > * { margin: 0; }
.bk-page-head h1 { line-height: 1.2; overflow-wrap: anywhere; }

.bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; padding-top: 26px; }
.bk-aside { position: sticky; top: 96px; display: grid; gap: 14px; }

/* Each step collapses to a single line once it is answered. */
.bk-steps { display: grid; gap: 14px; }
.bk-step { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.bk-step.open { border-color: var(--aqua-deep); box-shadow: var(--shadow-sm); }
.bk-step.done { background: var(--bg); }
.bk-step-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; }
.bk-num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--aqua-tint-2); color: var(--aqua-text); font-weight: 700; font-size: .86rem;
}
.bk-step.open .bk-num { background: var(--yellow); color: var(--brand-dark); }
.bk-step.done .bk-num { background: var(--ok); color: #fff; }
.bk-step-head > * { min-width: 0; }
/* A treatment called "HIFU (High-Intensity Focused Ultrasound)" has to wrap
   rather than widen the card off the side of the phone. */
.bk-step-title { font-weight: 600; overflow-wrap: anywhere; flex: 1; }
.bk-step-head > .btn { flex: none; }
.bk-step-name { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.bk-step-sum { margin-top: 8px; text-align: left; font-size: .88rem; color: var(--ink-soft); min-width: 0; font-weight: 500; }
.bk-step-body { padding: 0 18px 20px; display: grid; gap: 16px; }
/* Grid children size to their content by default, so a wide slot grid or day
   strip would push the card wider than the phone. */
.bk-step-body > *, .bk-steps > *, .bk-layout > * { min-width: 0; }

.bk-simple { display: grid; gap: 14px; max-width: 420px; }
/* Appointment and lookup pages use their own centred shell. The form-width
   helper on their outer page previously pinned the whole view to the left. */
.bk-page.bk-simple { display: block; max-width: none; }
.bk-consent { font-size: .82rem; color: var(--ink-faint); line-height: 1.5; }
.bk-welcome { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ok-tint); color: var(--ok); font-weight: 600; }

/* The card that says "we know who you are" on a personalised link. */
.bk-hi { display: grid; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--aqua-tint); }
.bk-hi-title { font-family: var(--font-display); font-size: 1.35rem; }
.bk-hi > p, .bk-hi > .row { margin: 0; }
.bk-hi > .btn { justify-self: start; }
.bk-chosen { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bk-chosen-photo { width: 62px; height: 62px; border-radius: 12px; overflow: hidden; flex: none; background: var(--aqua-tint); }
.bk-chosen-photo img { width: 100%; height: 100%; object-fit: cover; }
.bk-chosen-body { min-width: 0; display: grid; gap: 8px; flex: 1; }
.bk-chosen-name, .bk-tile-name { overflow-wrap: anywhere; }
.bk-chosen-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; line-height: 1.45; }
.bk-chosen-notes { font-size: .85rem; color: var(--ink-faint); }

/* Treatment picker. */
.bk-cats { display: grid; gap: 10px; }
.bk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.bk-tile {
  display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-height: 76px; transition: border-color .15s, background .15s;
}
.bk-tile:hover { border-color: var(--aqua-deep); }
.bk-tile.on { border-color: var(--aqua-deep); background: var(--aqua-tint); }
.bk-tile.lead { background: var(--yellow-tint); border-color: var(--yellow-deep); }
.bk-tile-body { min-width: 0; display: grid; gap: 8px; flex: 1; }
.bk-tile-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; line-height: 1.45; }
.bk-tile-sub { display: block; font-size: .84rem; line-height: 1.55; color: var(--ink-faint); }

/* Day strip and slot grid. */
.bk-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; -ms-overflow-style: none; scrollbar-width: none; }
.bk-days::-webkit-scrollbar { display: none; }
.bk-days-live { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); overflow: visible; }
.bk-days-live .bk-day { min-width: 0; padding: 12px 6px; gap: 6px; }
.bk-days-live .bk-day-date { font-size: .94rem; overflow-wrap: anywhere; }
.bk-calendar-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.bk-calendar-nav > div { text-align: center; line-height: 1.5; }
.bk-calendar-nav .btn { min-height: 44px; }
.bk-availability-status { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 16px; line-height: 1.6; background: var(--aqua-tint); border-radius: var(--radius-sm); }
.bk-availability-status svg { flex: none; }
.bk-day {
  display: grid; justify-items: center; gap: 4px; flex: none; min-width: 82px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.bk-day.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.bk-day.full { opacity: .45; cursor: not-allowed; }
.bk-day-rel { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; opacity: .75; }
.bk-day-date { font-weight: 700; font-size: 1.02rem; }
.bk-day-sub { font-size: .72rem; opacity: .8; }

.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.bk-slot {
  padding: 13px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: .94rem; cursor: pointer; min-height: 48px; transition: border-color .15s, background .15s;
}
.bk-slot:hover:not(:disabled) { border-color: var(--aqua-deep); }
.bk-slot.on { background: var(--yellow); border-color: var(--yellow-deep); color: var(--brand-dark); }
.bk-slot:disabled { opacity: .4; cursor: not-allowed; }
.bk-k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.bk-v { font-weight: 600; }
.bk-rows { display: grid; gap: 12px; }
.bk-row { display: grid; grid-template-columns: minmax(70px, .3fr) minmax(0, 1fr); gap: 14px; font-size: .92rem; }
.bk-row > * { min-width: 0; overflow-wrap: anywhere; }
.bk-row .bk-v { text-align: right; }

/* The sticky bar is the confirm button; there is no separate step for it. */
.bk-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(7,51,62,.1);
}
.bk-bar-in { width: 92%; max-width: var(--shell); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.bk-bar-text { min-width: 0; display: grid; gap: 4px; }
.bk-bar-k { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.bk-bar-text > * { overflow-wrap: anywhere; }
.bk-bar-slot { font-weight: 700; font-size: 1.02rem; }
.bk-bar .btn { min-width: 190px; }

/* Confirmation. */
.bk-confirm { display: grid; gap: 18px; max-width: 620px; margin: 0 auto; padding: 34px 0 40px; }
.bk-done { display: grid; justify-items: center; gap: 10px; text-align: center; }
.bk-done .bk-page-head { justify-items: center; }
.bk-done-ico { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); }
.bk-done-ico svg { width: 30px; height: 30px; }
.bk-ref { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .06em; }
.bk-recap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.bk-recap-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 16px; }
.bk-recap-head > * { min-width: 0; }
.bk-recap-title { display: grid; gap: 8px; overflow-wrap: anywhere; }
.bk-recap-photo { width: 100%; aspect-ratio: 16 / 7; border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.bk-recap-photo img { width: 100%; height: 100%; object-fit: cover; }
.bk-msg {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.55; color: var(--ink-soft);
  padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
}
.bk-secondary { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-how { display: grid; gap: 12px; }
.bk-how > div { display: grid; gap: 6px; }
.bk-how-t { font-weight: 600; }
.bk-visits-out { display: grid; gap: 12px; }
.bk-visits-out .bk-visit-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 16px; padding: 16px; }
.bk-visit-body { display: grid; gap: 6px; }
.bk-visits-out .list-item .title, .bk-visits-out .list-item .sub { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.5; }
.bk-visit-end { align-self: start; }
.bk-visit-end .tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .bk-layout { grid-template-columns: 1fr; }
  .bk-aside { position: static; }
  .bk-hero { padding: 78px 0 26px; }
  .bk-bar .btn { min-width: 0; }
  .bk-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .bk-bar-in { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bk-bar .btn { width: 100%; }
}
@media (max-width: 480px) {
  .bk-calendar-nav { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-calendar-nav > div { grid-row: 1; grid-column: 1 / -1; }
  .bk-calendar-nav .btn { width: 100%; }
  .bk-visits-out .bk-visit-item { grid-template-columns: minmax(0, 1fr); }
  .bk-visits-out .bk-visit-end { width: 100%; justify-content: space-between; }
  .bk-step-head { padding: 14px; gap: 10px; }
  .bk-step-body { padding: 0 14px 18px; }
  .bk-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bk-slot { font-size: .88rem; }
}
@media (max-width: 360px) { .bk-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
