/* ==========================================================================
   Booking component — scoped to .bk so it can be reused on /book-online/
   ========================================================================== */

.demo-banner {
  display: flex; gap: 10px; align-items: baseline; margin-bottom: 18px; padding: 12px 18px;
  border-radius: var(--radius); background: var(--oak-soft); color: var(--ink-2); font-size: 14px;
}
.demo-banner strong { color: var(--oak); }

/* ---- Form primitives ------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field__label { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.field__optional { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.field__hint { font-size: 13px; color: var(--muted); }
.field__error {
  display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--error);
  animation: bk-error-in .35s var(--ease-out);
}
.field__error::before {
  content: "!"; display: grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: var(--error); color: #fff; font-size: 11px; font-weight: 700;
}
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }

.input, .select select {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 17px; line-height: 1.3;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: #a1a1a6; }
.input:hover, .select select:hover { border-color: #b9b9be; }
.input:focus, .select select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0, 0, 0, .08); }
.input--upper { text-transform: uppercase; }
.input--upper::placeholder { text-transform: none; }
[aria-invalid="true"].input, .select select[aria-invalid="true"] { border-color: var(--error); background: var(--error-soft); }
[aria-invalid="true"].input:focus, .select select[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(192, 38, 29, .12); }

.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.8px solid var(--ink); border-bottom: 1.8px solid var(--ink); transform: rotate(45deg); pointer-events: none;
}
.select select:disabled { color: var(--muted); background: var(--bg-alt); cursor: default; }

/* Choice cards (booking type, payment) */
.choice-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card { position: relative; display: block; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-card__inner {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 18px 16px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .3s var(--ease-out), background-color .25s var(--ease);
}
.choice-card__inner .icon { width: 26px; height: 26px; stroke-width: 1.5; margin-bottom: 10px; }
.choice-card__title { font-weight: 600; font-size: 16px; }
.choice-card__text { font-size: 13px; color: var(--muted); }
.choice-card__price { margin-top: 8px; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.choice-card:hover .choice-card__inner { border-color: #a7a7ac; }
.choice-card input:checked + .choice-card__inner { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice-card input:focus-visible + .choice-card__inner { outline: 2px solid var(--focus); outline-offset: 3px; }
.choice-card input:checked + .choice-card__inner .icon { animation: bk-pop .4s var(--ease-out); }

/* Segmented control */
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-sunk); align-self: flex-start; }
.segmented--3 { align-self: stretch; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block; padding: 10px 18px; border-radius: 10px; text-align: center; font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
}
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

/* Pills (timeframe, days) */
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pill { position: relative; cursor: pointer; }
.choice-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-pill span {
  display: block; padding: 11px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 15px;
  transition: all .25s var(--ease);
}
.choice-pill:hover span { border-color: #a7a7ac; }
.choice-pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.choice-pill input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Checkboxes */
.consents { display: grid; gap: 14px; margin-top: 8px; }
.check { position: relative; display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.check__box {
  display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1.5px solid #b0b0b5; border-radius: 7px; background: #fff;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.check__box .icon { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.6; transform: scale(.4); opacity: 0; transition: transform .3s var(--ease-out), opacity .2s; }
.check input:checked + .check__box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check__box .icon { transform: none; opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--focus); outline-offset: 2px; }
.check input[aria-invalid="true"] + .check__box { border-color: var(--error); background: var(--error-soft); }
.check a { color: var(--ink); }
.consents .field__error { margin: -4px 0 0 36px; }

/* Dropzone + thumbnails */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 20px;
  border: 1.5px dashed var(--line); border-radius: 16px; background: #fff; text-align: center; font-size: 15px; cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { width: 28px; height: 28px; margin-bottom: 6px; color: var(--muted); transition: transform .35s var(--ease-out); }
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); background: var(--bg-alt); }
.dropzone:hover .icon, .dropzone.is-over .icon { transform: translateY(-3px); }
.dropzone:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.dropzone__hint { font-size: 13px; color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs:not(:empty) { margin-top: 4px; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--bg-alt); animation: bk-pop .35s var(--ease-out); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff;
}
.thumb button .icon { width: 14px; height: 14px; stroke-width: 2.4; }

/* ---- Progress ------------------------------------------------------------- */
.bk-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.bk-progress__item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); transition: color .3s var(--ease); }
.bk-progress__dot {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 600;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease-out);
}
.bk-progress__item.is-current { color: var(--ink); font-weight: 600; }
.bk-progress__item.is-current .bk-progress__dot { border-color: var(--ink); transform: scale(1.08); }
.bk-progress__item.is-done { color: var(--ink-2); }
.bk-progress__item.is-done .bk-progress__dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.bk-progress__bar { height: 3px; border-radius: 3px; background: var(--line-soft); overflow: hidden; margin-bottom: 28px; }
.bk-progress__bar span { display: block; height: 100%; background: var(--brand); transform-origin: left; transform: scaleX(.2); transition: transform .6s var(--ease-out); }

/* ---- Layout --------------------------------------------------------------- */
.bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.bk-main { padding: clamp(24px, 3.4vw, 44px); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.bk-step__title { display: block; margin-bottom: 26px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 650; letter-spacing: -.026em; }
.bk-step__title:focus { outline: none; }
.bk-step.is-entering { animation: bk-step-in .5s var(--ease-out) both; }
.bk-step.is-entering-back { animation: bk-step-in-back .5s var(--ease-out) both; }
.bk-group.is-revealed, .field.is-revealed { animation: bk-reveal .45s var(--ease-out) both; }

.bk-estimate {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; margin-top: 6px;
  border-radius: 16px; background: var(--bg-alt);
}
.bk-estimate__label { font-size: 13px; color: var(--muted); }
.bk-estimate__value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.bk-estimate__note { max-width: 24em; font-size: 13px; color: var(--muted); text-align: right; }

.bk-suggest {
  display: flex; align-items: center; gap: 16px; margin: -6px 0 24px; padding: 16px 18px;
  border-radius: 16px; background: var(--oak-soft); font-size: 14px; color: var(--ink-2);
  animation: bk-reveal .45s var(--ease-out) both;
}
.bk-suggest > .icon { color: var(--oak); width: 24px; height: 24px; }
.bk-suggest__title { font-weight: 600; color: var(--ink); }
.bk-suggest .btn { margin-left: auto; flex: none; }

.bk-nav {
  display: flex; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-soft);
}
.bk-nav__step { margin: 0 auto; font-size: 14px; color: var(--muted); }
.bk-nav [data-bk-next], .bk-nav [data-bk-submit] { min-width: 168px; }
.bk-nav [data-bk-back][hidden] + .bk-nav__step { margin-left: 0; }

.btn .spinner {
  display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: bk-spin .8s linear infinite;
}
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn__label { opacity: .7; }

/* ---- Calendar ------------------------------------------------------------- */
.cal { margin-top: 10px; padding: 22px; border: 1px solid var(--line-soft); border-radius: 20px; }
.cal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.cal__badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--oak); font-weight: 500; }
.cal__badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--oak); }
.cal__nav { display: flex; align-items: center; gap: 8px; }
.cal__month { min-width: 128px; text-align: center; font-weight: 600; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { padding: 6px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal__day {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; max-height: 52px; width: 100%; padding: 0;
  border: 0; border-radius: 50%; background: none; font-size: 15px; font-variant-numeric: tabular-nums;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .25s var(--ease-out);
}
.cal__day--empty { visibility: hidden; }
.cal__day--open { font-weight: 600; }
.cal__day--open::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--success); }
.cal__day--open:hover { background: var(--bg-alt); }
.cal__day--full { color: #a1a1a6; text-decoration: line-through; cursor: not-allowed; }
.cal__day--closed { color: #c7c7cc; cursor: not-allowed; }
.cal__day[aria-pressed="true"] { background: var(--brand); color: #fff; transform: scale(1.04); }
.cal__day[aria-pressed="true"]::after { background: #fff; }
.cal__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 6px; font-size: 12px; color: var(--muted); }
.cal__legend li { display: flex; align-items: center; gap: 6px; }
.cal__key { width: 8px; height: 8px; border-radius: 50%; }
.cal__key--open { background: var(--success); }
.cal__key--full { background: #a1a1a6; }
.cal__key--closed { background: #dedee3; }

.slots { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.slots .field__label { display: block; margin-bottom: 10px; }
.slots__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slots__empty { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.slot {
  padding: 11px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums;
  animation: bk-pop .35s var(--ease-out) both;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.slot:hover { border-color: var(--ink); }
.slot[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot[disabled] { color: #b4b4b9; text-decoration: line-through; background: var(--bg-alt); border-color: transparent; cursor: not-allowed; }

/* ---- Review --------------------------------------------------------------- */
.review { display: grid; gap: 0; margin-bottom: 28px; border-top: 1px solid var(--line-soft); }
.review__row { display: grid; grid-template-columns: 170px 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.review__row dt { color: var(--muted); }
.review__row dd { color: var(--ink); overflow-wrap: anywhere; }
.review__edit { padding: 0; border: 0; background: none; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.bk-result {
  margin-top: 24px; padding: 24px; border-radius: 18px; background: var(--bg-alt);
  animation: bk-reveal .5s var(--ease-out) both;
}
.bk-result:focus { outline: none; }
.bk-result h4 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin-bottom: 8px; }
.bk-result p { font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.bk-result ul { margin: 0 0 12px; padding-left: 18px; list-style: disc; font-size: 14px; color: var(--ink-2); }
.bk-result details { font-size: 13px; }
.bk-result summary { cursor: pointer; font-weight: 600; }
.bk-result pre { max-height: 280px; overflow: auto; padding: 14px; margin-top: 10px; border-radius: 10px; background: #fff; font-size: 12px; }

/* ---- Summary -------------------------------------------------------------- */
.bk-summary { position: sticky; top: calc(var(--header-h) + 24px); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.bk-summary__toggle { display: none; }
.bk-summary__body { padding: 28px; }
.bk-summary__title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.bk-summary__service { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.bk-summary__meta { margin-top: 6px; font-size: 14px; color: var(--muted); }
.bk-summary__meta:empty { display: none; }
.bk-summary__lines { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 15px; }
.bk-summary__lines:empty { display: none; }
.bk-summary__lines li { display: flex; justify-content: space-between; gap: 16px; animation: bk-line-in .4s var(--ease-out) both; }
.bk-summary__lines li span:first-child { color: var(--ink-2); }
.bk-summary__lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-summary__lines li.is-muted span { color: var(--muted); }
.bk-summary__lines--pay { border-top-style: dashed; }
.bk-summary__lines--pay li:first-child span { color: var(--ink); font-weight: 600; }
.bk-summary__total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
  font-weight: 600;
}
.bk-summary__total strong { font-size: 30px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bk-summary__total strong.is-bump { animation: bk-bump .5s var(--ease-out); }
.bk-summary__note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---- Keyframes ------------------------------------------------------------ */
@keyframes bk-step-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes bk-step-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes bk-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes bk-error-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes bk-pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes bk-line-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes bk-bump { 0% { transform: none; } 35% { transform: scale(1.06); } 100% { transform: none; } }
@keyframes bk-spin { to { transform: rotate(360deg); } }
