/* Booking, manage and voucher pages. Same palette and type as the main site, kept small. */
/* Booking, manage and voucher pages. Loaded after styles.css, so the site header,
   footer, fonts and colours come from the main stylesheet; this file only adds the flow UI. */
:root { --success-bg: #e8f1eb; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.flow-main { max-width: 1160px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 16px 120px; }
.flow-main a { color: var(--clay-deep); text-underline-offset: 3px; }
.flow-main :where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.flow-intro { max-width: 720px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 10px; color: var(--clay-deep); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.flow-main h1, .flow-main h2, .flow-main h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; margin: 0; }
.flow-main h1 { font-size: clamp(38px, 6vw, 68px); }
.flow-intro p:last-child { margin: 12px 0 0; color: var(--bark); }
.booking-grid { display: grid; gap: 22px; }
@media (min-width: 920px) { .booking-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }

/* Steps */
.step { background: var(--white); border: 1px solid var(--line); padding: 22px 18px; margin-bottom: 16px; }
@media (min-width: 600px) { .step { padding: 28px; } }
.step-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.step-num { color: var(--clay); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.step h2 { font-size: clamp(25px, 4vw, 32px); }
.step.is-locked { opacity: .5; pointer-events: none; }

.segmented { display: inline-flex; border: 1px solid var(--line); margin-bottom: 16px; }
.segmented button { min-height: 42px; padding: 8px 16px; border: 0; background: var(--white); cursor: pointer; font-size: 14px; font-weight: 700; }
.segmented button[aria-pressed="true"] { background: var(--espresso); color: var(--white); }

.service-list { display: grid; gap: 10px; }
@media (min-width: 640px) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-option { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; padding: 16px; text-align: left; border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.service-option:hover { border-color: var(--clay-soft); transform: translateY(-1px); }
.service-option[aria-pressed="true"] { border-color: var(--clay); box-shadow: inset 0 0 0 1px var(--clay); background: #fff8f3; }
.service-option strong { font: 400 19px/1.2 var(--display); }
.service-option .price { font-weight: 800; font-size: 17px; }
.service-option .meta { grid-column: 1 / -1; color: var(--bark); font-size: 13px; }

/* Calendar */
.calendar-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar-bar h3 { font-size: 24px; }
.calendar-nav { display: flex; gap: 6px; }
.calendar-nav button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 18px; }
.calendar-nav button:disabled { opacity: .35; cursor: default; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-grid .dow { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--taupe); padding: 4px 0; }
.day { position: relative; aspect-ratio: 1 / 1; min-height: 40px; border: 1px solid transparent; background: transparent; font-weight: 700; font-size: 15px; color: #b3a497; cursor: default; }
.day.has-slots { border-color: var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.day.has-slots::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--clay); }
.day.has-slots:hover { border-color: var(--clay); }
.day[aria-pressed="true"] { background: var(--espresso); border-color: var(--espresso); color: var(--white); }
.day[aria-pressed="true"]::after { background: var(--white); }
.calendar-note { margin: 12px 0 0; color: var(--bark); font-size: 14px; }
.loading-line { height: 3px; margin: 8px 0 0; background: linear-gradient(90deg, transparent, var(--clay), transparent); background-size: 200% 100%; animation: loading 1.1s linear infinite; }
@keyframes loading { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.time { min-height: 46px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-weight: 700; }
.time:hover { border-color: var(--clay); }
.time[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: var(--white); }

/* Form */
.fields { display: grid; gap: 14px; }
@media (min-width: 640px) { .fields.two { grid-template-columns: 1fr 1fr; } }
.flow-main .field { display: block; }
.flow-main .field > label, .flow-main .field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.field .optional { color: var(--taupe); font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); background: var(--paper); border-radius: 0; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--clay); background: var(--white); }
.field.has-error input { border-color: var(--error); background: var(--error-bg); }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 13px; }
.code-row { display: flex; gap: 8px; }
.code-row input { text-transform: uppercase; }
.code-row button { flex: none; min-height: 48px; padding: 0 16px; border: 1px solid var(--espresso); background: var(--white); cursor: pointer; font-weight: 700; }
.code-status { margin: 6px 0 0; font-size: 13px; }
.code-status.ok { color: var(--success); }
.code-status.bad { color: var(--error); }
details.extras { border-top: 1px solid var(--line); padding-top: 14px; }
details.extras summary { cursor: pointer; font-weight: 700; color: var(--clay-deep); }
details.extras[open] summary { margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--clay); flex: none; }

/* Summary */
.summary { background: var(--espresso); color: var(--white); padding: 24px; }
@media (min-width: 920px) { .summary { position: sticky; top: 90px; } }
.summary h2 { font-size: 26px; margin-bottom: 14px; }
.summary dl { margin: 0 0 16px; display: grid; gap: 0; }
.summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 14px; }
.summary dt { color: #d7c6b8; }
.summary dd { margin: 0; text-align: right; font-weight: 700; }
.summary .total dd { font-size: 18px; }
.summary .fine { margin: 12px 0 0; color: #d7c6b8; font-size: 13px; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 12px 18px; border: 0; background: var(--clay); color: var(--white); cursor: pointer; font-weight: 800; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: background .15s; }
.cta:hover { background: var(--clay-deep); }
.cta:disabled { background: #8a7a6e; cursor: not-allowed; }
.cta.secondary { background: transparent; border: 1px solid currentColor; color: inherit; }
.form-alert { margin: 0 0 14px; padding: 12px 14px; background: var(--error-bg); color: var(--error); border-left: 4px solid var(--error); font-size: 14px; }
.turnstile-box { margin: 10px 0 4px; }
.turnstile-box:empty { margin: 0; }

/* Mobile sticky bar mirrors the summary total */
.mobile-total { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--espresso); color: var(--white); box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
.mobile-total span { font-size: 13px; color: #d7c6b8; }
.mobile-total strong { display: block; font-size: 16px; color: var(--white); }
.mobile-total .cta { width: auto; min-height: 46px; padding: 10px 16px; font-size: 12px; }
@media (min-width: 920px) { .mobile-total { display: none; } }

/* Status pages (thanks, manage, closed) */
.status-card { max-width: 640px; margin: 10px auto; background: var(--white); border: 1px solid var(--line); padding: 30px 22px; text-align: center; box-shadow: var(--shadow); }
.status-card h1 { font-size: clamp(32px, 6vw, 46px); margin-bottom: 12px; }
.status-card p { color: var(--bark); }
.status-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--success-bg); color: var(--success); font-size: 30px; }
.status-icon.wait { background: var(--cream); color: var(--clay); }
.status-icon.bad { background: var(--error-bg); color: var(--error); }
.status-details { text-align: left; margin: 18px 0; border-top: 1px solid var(--line); }
.status-details div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.status-details dt { color: var(--bark); }
.status-details dd { margin: 0; font-weight: 700; text-align: right; }
.status-actions { display: grid; gap: 10px; margin-top: 18px; }
.whatsapp-link { color: var(--success); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* The site header is fixed (it floats over the homepage hero), so flow pages start below it. */
body.flow-page main#main.flow-main { padding-top: calc(var(--header) + clamp(24px, 4vw, 52px)); padding-bottom: 96px; }
.flow-main a.cta { color: var(--white); text-decoration: none; }
.flow-main a.cta.secondary { color: var(--ink); }
.summary a.cta.secondary { color: var(--white); }
body.flow-page .theme-toggle { display: none; }
