/* Booking page - built to the approved Booking design (Claude Design project,
   booking.html + booking-mobile.html). Base styles come from site.css; this
   file carries only the booking flow's own components. */

.head-back { margin-left: auto; font-weight: 600; font-size: 15.5px; text-decoration: none; color: var(--ink); }
.head-back:hover { color: var(--accent); }

/* The photo header comes from page.css (.subpage .page-head.has-media), the same as /classes;
   the stepper sits under it in its own white bar. */
.book-page .page-head.has-media { padding-bottom: 8px; }
.book-page .page-head.has-media .lede a { color: #fff; font-weight: 700; text-decoration-color: rgba(255, 255, 255, .5); }
.stepper { display: flex; gap: 12px; align-items: center; margin-top: 20px; background: #fff; border: 1px solid #E7E3DC; border-radius: 14px; padding: 16px 28px; }
.stepper .st { display: flex; gap: 10px; align-items: center; font-size: 14.5px; font-weight: 700; color: var(--ink-3); }
.stepper .st .dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #D8D2C8; display: grid; place-items: center; font-family: var(--font-display); background: #fff; }
.stepper .st.is-done .dot { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.stepper .st.is-now { color: var(--ink); }
.stepper .st.is-now .dot { border-color: var(--accent); color: var(--accent); }
.stepper .bar { flex: 1 1 40px; height: 2px; background: #D8D2C8; } /* the bars share the width, so the four steps spread evenly */

.sec-note { font-size: 14px; color: var(--ink-3); }
.seg-label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 6px; }

/* The rolling flow: one column at the full site width (operator call:
   content expands to the title's width, never the other way) */
/* Each step is a card (operator, 2026-10-15: "very plain, wrap sections in containers") */
#flow { padding-top: 20px; padding-bottom: 0; } /* every gap between step cards is the card's own 20px margin, step 4 included */
.flow-step { margin-bottom: 20px; background: #fff; border: 1px solid #E7E3DC; border-radius: 18px; padding: 26px 30px 28px;
  box-shadow: 0 1px 2px rgba(34, 51, 46, .04), 0 18px 36px -30px rgba(34, 51, 46, .4); }
.flow-step > .sec-head { margin-bottom: 18px; gap: 6px; }
.flow-step > .sec-head h2 { font-size: var(--step-2); }
.flow-step > .sec-head .eyebrow { display: inline-flex; width: max-content; padding: 4px 10px; border-radius: 999px; background: #F6E9E7; font-size: 12px; }
/* the step label on the right of the card, level with its heading (operator, 2026-11-06) */
.flow-step > .sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px; row-gap: 6px; }
.flow-step > .sec-head .eyebrow { order: 2; flex: none; margin: 0 0 0 auto; }
.flow-step > .sec-head h1, .flow-step > .sec-head h2, .flow-step > .sec-head h3 { order: 1; flex: 1 1 0; min-width: min(14rem, 60%); margin-top: 0; }
.flow-step > .sec-head > :not(.eyebrow):not(h1):not(h2):not(h3) { order: 3; flex: 1 0 100%; }
.flow-step .pick-card { border: 0; padding: 0; background: none; }
.flow-step .done-row { background: var(--paper); border-color: transparent; }
.flow-step .done-row:hover { border-color: var(--ink-2); }
/* a finished step is one compact line: its explanation goes */
.flow-step:has(> .done-row:not([hidden])) > .sec-head .sec-note { display: none; }
.flow-step:has(> .done-row:not([hidden])) > .sec-head { margin-bottom: 12px; }
.step-card .form { border: 0; padding: 0; background: none; box-shadow: none; } /* no box inside the card */

/* the drawn dropdown - never a native select (house rule) */
.pick-card { background: #fff; border: 1px solid #E7E3DC; border-radius: 12px; padding: 18px; display: grid; gap: 0; }
.dd { position: relative; }
.dd-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; font-family: var(--font-body); font-size: 16px; font-weight: 700; color: var(--ink); padding: 14px 16px; border: 1.5px solid #CFC9BF; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; }
.dd-trigger:hover { border-color: var(--ink-3); }
.dd-trigger:focus-visible { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(62,90,82,.18); }
.dd-trigger[aria-expanded="true"] { border-color: var(--ink-2); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.dd-trigger[aria-expanded="true"] .dd-caret { transform: rotate(180deg); }
.dd-placeholder { color: var(--ink-3); font-weight: 600; }
.dd-caret { color: var(--ink-2); display: grid; place-items: center; transition: transform .18s ease; }
.dd-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1.5px solid var(--ink-2); border-top: 0; border-radius: 0 0 8px 8px; box-shadow: 0 16px 32px rgba(34,51,46,.14); overflow: hidden; }
.dd-option { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 16px; background: #fff; border: none; border-bottom: 1px solid #EFEBE4; font-family: var(--font-body); cursor: pointer; text-align: left; }
.dd-option:last-child { border-bottom: 0; }
.dd-option:hover, .dd-option:focus-visible { background: var(--paper); outline: none; }
.dd-option b { color: var(--ink); font-size: 15.5px; }
.dd-option small { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.dd-option.is-selected b { color: var(--accent); }

/* the treatment list that expands under the dropdown */
.type-list { border-top: 1px solid #EFEBE4; margin-top: 16px; padding-top: 6px; }
.type-row { border-bottom: 1px solid #F3F0EA; }
.type-row:last-child { border-bottom: 0; }
.type-head { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.type-head:hover { background: var(--paper); } /* one highlight across the whole row, arrow included */
.type-head .opt { border-bottom: 0; flex: 1; min-width: 0; }
.type-head .opt:hover { background: none; }
/* quiet text toggle, not a boxed button; constant width - only the chevron turns */
.opt-more { background: none; border: none; color: var(--ink-3); font-family: var(--font-body); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; padding: 10px 6px; flex: none; }
.opt-more:hover { color: var(--accent); }
.opt-more svg { transition: transform .18s ease; }
.opt-more.open svg { transform: rotate(180deg); }
/* the price pins to the row's end, one aligned column for every row */
.type-head .price { margin-left: 10px; min-width: 52px; text-align: right; font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 17px; white-space: nowrap; padding-right: 10px; cursor: pointer; }
.opt-desc { padding: 2px 10px 16px; color: var(--ink-3); font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
html.js .type-list.grow { animation: grow .28s ease; }
@keyframes grow { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.opt { display: flex; align-items: center; gap: 14px; padding: 13px 10px; border: none; border-bottom: 1px solid #F3F0EA; border-radius: 0; cursor: pointer; background: none; width: 100%; text-align: left; font-family: var(--font-body); font-size: inherit; min-height: 56px; }
.opt:last-child { border-bottom: 0; }
.opt:hover { background: var(--paper); }
.opt .opt-main { min-width: 0; }
.opt b { color: var(--ink); font-size: 16px; display: block; }
.opt small { display: block; color: var(--ink-3); font-size: 13.5px; }
.opt .price { margin-left: auto; font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 17px; white-space: nowrap; }

/* a finished step, rolled up into one line */
.done-row { display: flex; align-items: center; gap: 14px; width: 100%; background: #fff; border: 1px solid #E7E3DC; border-radius: 10px; padding: 14px 18px; font-family: var(--font-body); font-size: 15.5px; cursor: pointer; text-align: left; }
html.js .done-row:not([hidden]) { animation: grow .28s ease; }
.done-row:hover { border-color: var(--ink-2); }
.done-row .tickmini { width: 26px; height: 26px; border-radius: 50%; background: var(--ink-2); color: #fff; display: grid; place-items: center; flex: none; }
.done-row .done-text { color: var(--ink); font-weight: 700; min-width: 0; }
.done-row .done-text small { color: var(--ink-3); font-weight: 600; }
.done-row .change { margin-left: auto; font-weight: 700; font-size: 14px; color: var(--ink-2); border: 1.5px solid #E7E3DC; border-radius: 6px; padding: 7px 14px; white-space: nowrap; }
.done-row:hover .change { border-color: var(--accent); color: var(--accent); }

/* practitioner picker: fills the full column edge to edge */
.pract-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; }
.pract { display: grid; gap: 8px; justify-items: center; align-content: start; padding: 14px 12px; background: #fff; border: 1.5px solid #E7E3DC; border-radius: 10px; cursor: pointer; min-width: 0; font-family: var(--font-body); }
.pract-next { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.pract-next.none { color: var(--ink-3); font-weight: 600; }
.pract-next.skel { display: block; width: 68px; height: 12px; border-radius: 6px; color: transparent; background: linear-gradient(90deg, #EDEAE3 25%, #F7F5F0 45%, #EDEAE3 65%); background-size: 200% 100%; animation: skel-shimmer 1.1s linear infinite; }
@keyframes skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pract-next.skel { animation: none; } }
.pract:hover { border-color: var(--ink-2); }
.pract.is-picked { border-color: var(--accent); background: #FDF7F6; }
.pract.is-off { opacity: .4; pointer-events: none; }
.pract img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #E4EAE7; }
.pract .any { width: 64px; height: 64px; border-radius: 50%; background: var(--ink-2); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; text-align: center; line-height: 1.15; padding: 6px; }
.pract span { font-size: 14px; font-weight: 700; color: var(--ink); }

/* step 3: dates on the left, times on the right */
.times-cols { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.day-tabs { display: grid; gap: 10px; }
.day-tab { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 14px 16px; background: #fff; border: 1.5px solid #E7E3DC; border-radius: 8px; cursor: pointer; font-family: var(--font-body); }
.day-tab b { color: var(--ink); font-size: 15px; }
.day-tab span { font-size: 12.5px; color: var(--ink-3); }
.day-tab:hover { border-color: var(--ink-2); }
.day-tab.is-picked { border-color: var(--accent); background: #FDF7F6; }
.day-tab.is-empty { opacity: .45; pointer-events: none; }
.time-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 12px 18px; background: #fff; border: 1.5px solid #E7E3DC; border-radius: 8px; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; font-family: var(--font-body); min-height: 48px; }
.chip:hover { border-color: var(--ink-2); }
.chip.is-picked { border-color: var(--accent); background: var(--accent); color: #fff; }
.times-note { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

/* state bands: empty and outage are distinct and never claim "fully booked" */
.state-band { border-radius: 10px; padding: 18px 22px; display: flex; gap: 14px; align-items: baseline; font-size: 15px; flex-wrap: wrap; margin-top: 8px; }
.state-empty { background: #fff; border: 1px solid #E7E3DC; color: var(--body); }
.state-down { background: #F6EFE4; border: 1px solid #E4D5BC; color: #6B5836; }
.state-band b { font-family: var(--font-display); }

/* step 3 */
.details-cols { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 48px; align-items: start; }
.form { background: #fff; border: 1px solid #E7E3DC; border-radius: 10px; padding: 28px; display: grid; gap: 18px; }
.form label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); display: grid; gap: 6px; }
.form input, .form textarea { font-family: var(--font-body); font-size: 15px; padding: 12px; border: 1px solid #CFC9BF; border-radius: 6px; background: #fff; color: var(--body); width: 100%; -webkit-appearance: none; appearance: none; }
.form input:hover, .form textarea:hover { border-color: var(--ink-3); }
.form input:focus-visible, .form textarea:focus-visible { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(62,90,82,.18); }
.form input.err, .form textarea.err { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,51,44,.14); }
.form textarea { min-height: 80px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.seg { display: flex; border: 1.5px solid #CFC9BF; border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; padding: 12px; background: #fff; border: none; font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--ink-3); cursor: pointer; }
.seg button.is-picked { background: var(--ink-2); color: #fff; }
.privacy-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-3); }
.privacy-line svg { flex: none; margin-top: 2px; }
.form-msg.fail { font-size: 14.5px; font-weight: 700; border-radius: 6px; padding: 10px 12px; background: #F6E4E2; color: var(--accent); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.summary { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 24px; display: grid; gap: 14px; position: sticky; top: 24px; }
.summary h3 { color: #fff; font-size: 21px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; border-bottom: 1px dotted #4A5D54; padding-bottom: 10px; }
.summary .row:last-of-type { border: 0; padding-bottom: 0; }
.summary .row b { color: #fff; text-align: right; }
.summary .row span { color: #C7D2CC; white-space: nowrap; }

/* confirmation */
.confirm { background: #fff; border: 1px solid #E7E3DC; border-radius: 12px; padding: 40px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.confirm .tick { width: 64px; height: 64px; border-radius: 50%; background: #E4EAE7; color: var(--ink-2); display: grid; place-items: center; }

/* which of form/call-band shows depends on the server-decided mode */
html[data-book-mode="phone"] .live-only { display: none !important; }
html[data-book-mode="live"] .phone-only { display: none !important; }
html[data-book-mode="phone"] .form.phone-only { display: grid !important; }

/* mobile: one column, list-pattern options, sticky continue bar */

@media (max-width: 899.98px) {
  .stepper { padding: 12px 14px; margin-top: 12px; gap: 8px; }
  .stepper .bar { flex-basis: 18px; }
  #flow { padding-top: 16px; }
  .flow-step { margin-bottom: 14px; padding: 20px 16px 22px; border-radius: 14px; }
  .pick-card { border-radius: 12px; }
  .opt { min-height: 60px; padding: 10px 8px; }
  .opt b { font-size: 15px; }
  .done-row { padding: 12px 14px; font-size: 14.5px; }
  .done-row .change { padding: 6px 10px; font-size: 13px; }
  .pract-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .pract-row::-webkit-scrollbar { display: none; }
  .pract { min-width: 104px; padding: 12px 14px; flex: 0 0 auto; }
  .pract img, .pract .any { width: 52px; height: 52px; font-size: 10.5px; }
  .times-cols { grid-template-columns: 1fr; gap: 14px; }
  .day-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .day-tabs::-webkit-scrollbar { display: none; }
  .day-tab { display: grid; gap: 2px; justify-items: center; min-width: 78px; flex: 0 0 auto; padding: 9px 10px; }
  .pract-row { display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .pract { min-width: 112px; flex: 0 0 auto; }
  .details-cols { grid-template-columns: 1fr; gap: 20px; }
  .form { border-radius: 12px; padding: 18px; }
  .form .two { grid-template-columns: 1fr; }
  .form input, .form textarea { font-size: 16px; padding: 13px; border-radius: 8px; }
  .summary { position: static; }
  .confirm { padding: 28px 20px; }
}

/* The first-visit hand-off to the intake form, on the confirmation panel.
   Shown only when the visitor said this is their first visit - the site never
   asks Cliniko whether an email is already a patient (docs/DATA.md). */
.next-step {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  background: #E4EAE7; border-left: 3px solid var(--ink-2);
  border-radius: 8px; padding: 18px 20px; margin: var(--sp-3) 0;
}
.next-step .ns-ico { flex: none; color: var(--ink-2); margin-top: 2px; }
.next-step h3 { font-size: var(--step-1); margin-bottom: 6px; }
.next-step p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 14px; }
html.js .next-step:not([hidden]) { animation: grow .28s ease; }
@media (max-width: 899.98px) {
  .next-step { padding: 16px; gap: 12px; }
  .next-step .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .next-step:not([hidden]) { animation: none; }
}

/* ---------- the moment the booking lands ----------
   The confirmation is the emotional peak of the flow, so it is composed rather
   than just un-hidden: the panel lifts in, the ring draws, the tick follows it,
   and the detail lines arrive last on a short stagger. Every step is a
   transform/opacity pair so it stays on the compositor. */
:is(html.js, html.is-app) #step4 .confirm { opacity: 0; transform: translateY(18px) scale(.985); }
:is(html.js, html.is-app) #step4 .confirm.is-in {
  animation: confirm-rise .62s cubic-bezier(.22,.68,.3,1) forwards;
}
@keyframes confirm-rise { to { opacity: 1; transform: none; } }

:is(html.js, html.is-app) #step4 .confirm.is-in .tick { animation: tick-pop .5s cubic-bezier(.3,1.5,.5,1) .12s both; }
@keyframes tick-pop {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: 1; transform: none; }
}
:is(html.js, html.is-app) #step4 .confirm.is-in .tick svg { stroke-dasharray: 26; stroke-dashoffset: 26; animation: tick-draw .34s ease .34s forwards; }
@keyframes tick-draw { to { stroke-dashoffset: 0; } }

/* the lines under the heading arrive on a stagger */
:is(html.js, html.is-app) #step4 .confirm.is-in > h2 { animation: confirm-line .44s ease .18s both; }
:is(html.js, html.is-app) #step4 .confirm.is-in > p:nth-of-type(1) { animation: confirm-line .44s ease .26s both; }
:is(html.js, html.is-app) #step4 .confirm.is-in > p:nth-of-type(2) { animation: confirm-line .44s ease .34s both; }
:is(html.js, html.is-app) #step4 .confirm.is-in > .next-step { animation: confirm-line .5s ease .5s both; }
:is(html.js, html.is-app) #step4 .confirm.is-in > .btn { animation: confirm-line .44s ease .5s both; }
@keyframes confirm-line {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

/* the intake form rises in under the confirmation */
:is(html.js, html.is-app) #step5 { opacity: 0; transform: translateY(22px); }
:is(html.js, html.is-app) #step5.is-in { animation: step5-rise .6s cubic-bezier(.22,.68,.3,1) forwards; }
@keyframes step5-rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  :is(html.js, html.is-app) #step4 .confirm, :is(html.js, html.is-app) #step4 .confirm.is-in,
  :is(html.js, html.is-app) #step5, :is(html.js, html.is-app) #step5.is-in { opacity: 1; transform: none; animation: none; }
  :is(html.js, html.is-app) #step4 .confirm.is-in .tick,
  :is(html.js, html.is-app) #step4 .confirm.is-in .tick svg,
  :is(html.js, html.is-app) #step4 .confirm.is-in > h2,
  :is(html.js, html.is-app) #step4 .confirm.is-in > p:nth-of-type(1),
  :is(html.js, html.is-app) #step4 .confirm.is-in > p:nth-of-type(2),
  :is(html.js, html.is-app) #step4 .confirm.is-in > .next-step,
  :is(html.js, html.is-app) #step4 .confirm.is-in > .btn { animation: none; stroke-dashoffset: 0; }
}

/* ---------- booking while signed in (book.js, 2026-11-03): who it is booked for, in place of the fields ---------- */
.head-back + .head-account { margin-left: 18px; }
.who-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 16px;
  background: #EEF3F0; border: 1.5px solid #CFE0D6; }
.who-dot { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 800 17px var(--font-display); }
.who-text { display: grid; gap: 2px; min-width: 0; }
.who-label { font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #2D6A4F; }
.who-text b { color: var(--ink); font-size: 18px; }
.who-meta { color: var(--ink-3); font-size: 14.5px; overflow-wrap: anywhere; }
.who-other { border: 0; background: none; padding: 6px 0; font: 700 14.5px var(--font-body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.who-other:hover { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .who-card:not([hidden]) { animation: ubx-who .4s cubic-bezier(.2, .7, .2, 1) both; } }
@keyframes ubx-who { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 640px) {
  .who-card { grid-template-columns: auto minmax(0, 1fr); }
  .who-other { grid-column: 1 / -1; justify-self: start; }
}
