/* Red Roses — бронювання столу (bron) і «Моя заявка» (moya), №574/575.
   Основа — погоджений макет v2 (research/booking/variants2/src.html): рядки-значення з шевроном → поповер (ПК) /
   шторка (телефон), степер зі столом і кріслами, схема залу на тій самій сторінці, липкий підсумок, крок 2 окремим екраном.
   Кольори й шрифти — лише з tokens.css; тема — перемикач у шапці сайту (без підпису «Вечір у барі»).
   Усі правила під .bk — щоб не зачепити site.css (там свої .btn, .hint, .scrim). */

.bk {
  --bk-floor: var(--surface-2);
  --bk-bar: rgba(43, 27, 24, .07);
  --bk-scrim: rgba(26, 18, 19, .42);
  --bk-sheet: cubic-bezier(.32, .72, 0, 1);
  max-width: 1240px; margin: 0 auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
  font-size: 17px; line-height: 1.5;
  overflow-x: clip;   /* в'їзд кроку translateX(18px) на телефоні на мить розширював сторінку (check_bron, крок 2: +2 px); clip, не hidden — липке не ламається */
}
html[data-theme="dark"] .bk { --bk-floor: #120C0D; --bk-bar: rgba(246, 237, 225, .06); --bk-scrim: rgba(0, 0, 0, .55); }
.bk [hidden] { display: none !important; }
.bk h1, .bk h2, .bk h3 { font-family: var(--font-serif); font-weight: 500; text-wrap: balance; }
.bk :focus:not(:focus-visible) { outline: none; }
.bk-page .bot { display: none; }          /* помічник у куті перекривав би липкий підсумок; телефон є в тексті сторінки */
.bk .nw { white-space: nowrap; }
.bk .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* кроки */
.bk-step { padding-block: clamp(20px, 3vw, 40px) 0; }
.bk-step.in-f { animation: bkInF .34s var(--ease) both; }
.bk-step.in-b { animation: bkInB .34s var(--ease) both; }
@keyframes bkInF { from { opacity: 0; transform: translateX(18px); } }
@keyframes bkInB { from { opacity: 0; transform: translateX(-18px); } }

/* ── крок 1 ── */
.bk-s1 { display: grid; gap: 40px; padding-bottom: 28px; }
@media (min-width: 960px) { .bk-s1 { grid-template-columns: minmax(330px, 380px) minmax(0, 1fr); gap: 72px; align-items: start; } }
.bk h1 { font-size: clamp(44px, 5.2vw, 68px); line-height: .98; letter-spacing: -.02em; }
.bk-lead { margin-top: 16px; max-width: 34ch; }
.bk-tel { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.bk-tel a { display: inline-block; padding-block: 11px; margin-block: -11px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 4px; text-decoration-thickness: 1px; }

.bk-rows { position: relative; margin-top: 28px; border-top: 1px solid var(--line); } /* taste-skill-ignore: рядки-значення з макета v2 (погоджено власником) */
.bk-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; min-height: 78px;
  padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; transition: transform .12s ease-out; } /* taste-skill-ignore: рядки-значення з макета v2 */
.bk-row:active { transform: scale(.99); }
.bk-lbl { font-size: 15px; color: var(--ink-2); min-width: 54px; }
.bk-val { justify-self: end; text-align: right; display: grid; gap: 1px; }
.bk-val b { font: 500 27px/1.1 var(--font-serif); font-variant-numeric: lining-nums; transition: color .15s; }
.bk-val small { font-size: 14px; color: var(--ink-2); }
.bk-val small.bk-gone { color: var(--accent-ink); font-weight: 500; }   /* №632.22: запропонований час/стіл уже зайняли */
.bk-chev { width: 16px; height: 16px; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s var(--ease); }
.bk-row[aria-expanded="true"] .bk-chev { transform: rotate(90deg); }
@media (hover: hover) { .bk-row:hover .bk-val b { color: var(--accent-ink); } }

.bk-grow { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); } /* taste-skill-ignore: рядки-значення з макета v2 */
.bk-stepper { justify-self: end; display: flex; align-items: center; gap: 10px; }
.bk-stp { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-strong); display: grid; place-items: center; /* taste-skill-ignore: межа круглої кнопки степера (контрол) */
  transition: transform .12s ease-out, background-color .15s; }
.bk-stp svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.bk-stp:active:not(:disabled) { transform: scale(.92); }
.bk-stp:disabled { opacity: .3; cursor: default; }
@media (hover: hover) { .bk-stp:hover:not(:disabled) { background: var(--blush); } }
.bk-gt { width: 104px; height: 104px; display: block; }
.bk-gt .tb { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.bk-gt .gn { font: 500 38px var(--font-serif); fill: var(--ink); text-anchor: middle; dominant-baseline: central; font-variant-numeric: lining-nums; }
.bk-gt .ch { transform-box: view-box; transform-origin: 60px 60px; transition: transform .34s var(--ease); }
.bk-gt .ch rect { fill: var(--ink-2); transform-box: fill-box; transform-origin: center; transition: opacity .2s ease-out, transform .24s var(--ease); }
.bk-gt .ch.off rect { opacity: 0; transform: translateY(-8px) scale(.6); }
.bk-gnote { font-size: 15px; color: var(--ink-2); padding-top: 10px; max-width: 38ch; }
.bk-gnote a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; display: inline-block; padding-block: 11px; margin-block: -11px; }

/* поповер (ПК) / шторка (телефон) */
.bk-scrim { position: fixed; inset: 0; z-index: 91; background: transparent; opacity: 0; pointer-events: none; transition: opacity .3s ease-out; }
.bk-scrim.on { opacity: 1; pointer-events: auto; }
.bk-pop { position: absolute; left: 0; right: 0; z-index: 92; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 18px 20px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top center; /* taste-skill-ignore: поповер — справжній плаваючий шар */
  transition: opacity .16s ease-out, transform .2s var(--ease), visibility 0s linear .2s; } /* taste-skill-ignore: поповер — справжній плаваючий шар */
.bk-pop[data-open] { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease-out, transform .22s var(--ease); }
.bk-grab { display: none; }
.bk-ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bk-ph h2 { font-size: 24px; line-height: 1.1; }
.bk-ph p { font-size: 14px; color: var(--ink-2); }
.bk-x { width: 44px; height: 44px; margin-right: -10px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.bk-x svg { width: 14px; height: 14px; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; }
@media (hover: hover) { .bk-x:hover { background: var(--surface-2); } }

.bk-mh { font: 500 19px var(--font-serif); margin: 14px 0 6px; }
.bk-mh:first-child { margin-top: 0; }
.bk-cal { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); text-align: center; }
.bk-cal .wd { font-size: 13px; color: var(--ink-2); padding-bottom: 4px; }
.bk-day { height: 46px; display: grid; place-items: center; font: 400 19px var(--font-serif); font-variant-numeric: lining-nums tabular-nums; }
.bk-day span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: background-color .15s, color .15s; }
.bk-day.today span { box-shadow: inset 0 0 0 1px var(--line-strong); } /* taste-skill-ignore: кільце «сьогодні» в календарі */
.bk-day[aria-pressed="true"] span { background: var(--accent); color: var(--on-accent); box-shadow: none; } /* taste-skill-ignore: скидання кільця «сьогодні» на обраному дні */
.bk-day:disabled { cursor: default; color: var(--ink-2); opacity: .4; }
@media (hover: hover) { .bk-day:hover:not(:disabled):not([aria-pressed="true"]) span { background: var(--blush); } }

.bk-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.bk-slot { min-height: 62px; border-radius: 999px; display: grid; place-content: center; gap: 1px; transition: background-color .15s, color .15s; }
.bk-slot b { font: 500 23px/1.05 var(--font-serif); font-variant-numeric: lining-nums tabular-nums; }
.bk-slot small { font-size: 13px; color: var(--ink-2); }
.bk-slot[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.bk-slot[aria-pressed="true"] small { color: inherit; opacity: .85; }
.bk-slot:disabled { cursor: default; } .bk-slot:disabled b { color: var(--ink-2); opacity: .45; } .bk-slot:disabled small { opacity: .7; }
@media (hover: hover) { .bk-slot:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--blush); } }

/* зал */
.bk-hall { min-width: 0; }
.bk-hh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 20px; margin-bottom: 14px; }
.bk-hh h2 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.1; }
.bk-avail { font-size: 16px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bk-avail b { color: var(--ink); font-weight: 500; }
.bk-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin: -4px 0 12px; font-size: 16px; }
.bk-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 2px; color: var(--accent-ink);
  font: 500 16px var(--font-sans); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.bk-plan { display: block; width: 100%; height: auto; background: var(--bk-floor); border-radius: var(--radius); touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: opacity .2s ease-out; }
.bk-plan[aria-busy="true"] { opacity: .55; }
.bk-plan .wall { fill: none; stroke: var(--ink); stroke-opacity: .42; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.bk-plan .win { stroke: var(--brass); stroke-width: 4; }
.bk-plan .barblock { fill: var(--bk-bar); }
.bk-plan .terrace { fill: none; stroke: var(--ink); stroke-opacity: .3; stroke-dasharray: 1 6; stroke-linecap: round; stroke-width: 2; }
.bk-plan .zl { font: italic 400 18px var(--font-serif); fill: var(--ink-2); }
.bk-plan .zl.s { font-size: 15px; }
.bk-plan .t { cursor: pointer; outline: none; }
.bk-plan .hit { fill: transparent; }
.bk-plan .top { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; transition: fill .15s ease-out, stroke .15s ease-out; }
.bk-plan .chair { fill: var(--ink-2); fill-opacity: .5; transition: fill .15s ease-out, fill-opacity .15s ease-out; }
.bk-plan .num { font: 500 17px var(--font-sans); fill: var(--ink); text-anchor: middle; dominant-baseline: central; pointer-events: none; font-variant-numeric: tabular-nums; transition: fill .15s ease-out; }
.bk-plan .sub { font: 400 12.5px var(--font-sans); fill: var(--ink-2); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.bk-plan .ring { fill: none; stroke: transparent; stroke-width: 2; }
.bk-plan .t:focus-visible .ring { stroke: var(--accent-ink); }
.bk-plan .busy .top { fill: none; stroke-dasharray: 3 3; }
.bk-plan .busy .chair { fill-opacity: .2; }
.bk-plan .busy .num { fill: var(--ink-2); }
.bk-plan .nofit { opacity: .26; cursor: default; }
.bk-plan .rec .top { fill: var(--blush); stroke: var(--accent); }
.bk-plan .rec .chair { fill: var(--accent); fill-opacity: .55; }
.bk-plan .sel .top { fill: var(--accent); stroke: var(--accent); }
.bk-plan .sel .chair { fill: var(--accent); fill-opacity: 1; }
.bk-plan .sel .num { fill: var(--on-accent); }
@media (hover: hover) { .bk-plan .t.free:not(.sel):hover .top { stroke: var(--ink); } }
.bk-plan .t:active .top { transition-duration: 0s; }

.bk-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.bk-legend li { display: flex; align-items: center; gap: 8px; }
.bk-legend svg { width: 18px; height: 18px; flex: none; }

/* липкий підсумок */
.bk-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 16px; background: var(--bg); border-top: 1px solid var(--line); /* taste-skill-ignore: межа липкого підсумку з макета v2 */
  margin-inline: calc(-1 * var(--gutter)); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px)); }
.bk-bar .bl { flex: 1; min-width: 0; }
.bk-b1 { font: 500 22px/1.2 var(--font-serif); font-variant-numeric: lining-nums; }
.bk-b2 { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.bk .btn { flex: none; min-height: 52px; padding: 0 30px; font-size: 17px; }
.bk .btn:disabled { background: var(--surface-2); color: var(--ink-2); cursor: default; transform: none; }
.bk .btn[aria-busy="true"] { background: var(--accent-deep); color: var(--on-accent); cursor: progress; }
.bk .btn--ghost { box-shadow: inset 0 0 0 1px var(--line-strong); } /* taste-skill-ignore: межа другорядної кнопки сайту */

/* ── крок 2 ── */
.bk-s2 { display: grid; gap: 48px; padding-bottom: 72px; }
@media (min-width: 960px) { .bk-s2 { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 80px; align-items: start; } }
.bk-recap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 14px 0; border-block: 1px solid var(--line); margin-bottom: 32px; } /* taste-skill-ignore: рядки-значення з макета v2 */
.bk-recap > div { flex: 1 1 220px; min-width: 0; }
.bk-recap .acts { display: flex; flex-wrap: wrap; gap: 0 18px; flex: none; }
.bk-h { font-size: clamp(38px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -.015em; }
.bk-f { display: grid; gap: 6px; margin-top: 22px; }
.bk-f label { font-size: 15px; color: var(--ink-2); }
.bk-f label span { opacity: .85; }
.bk-f label .bk-req { opacity: 1; color: var(--accent-ink); font-weight: 600; }   /* №632.13: обов'язкове за налаштуваннями закладу */
.bk-f input, .bk-f textarea { width: 100%; min-height: 54px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); /* taste-skill-ignore: поле форми */
  color: var(--ink); font: 400 18px/1.4 var(--font-sans); caret-color: var(--accent); resize: vertical; }
.bk-f textarea { min-height: 96px; }
.bk-f input::placeholder, .bk-f textarea::placeholder { color: var(--ink-2); opacity: .8; }
.bk-f input:focus, .bk-f textarea:focus { outline: 2px solid var(--accent-ink); outline-offset: -1px; }
.bk-f [aria-invalid="true"] { border-color: var(--accent); }
.bk-err { font-size: 14px; color: var(--accent-ink); }
/* №638: окрема згода на дані про алергії — з'являється під полем, лише коли воно заповнене; ціль дотику ≥44 px */
.bk-ok { display: grid; gap: 6px; margin-top: 4px; }
.bk-ok[hidden] { display: none; }
.bk-f .bk-cb { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding-block: 8px; cursor: pointer; color: var(--ink); line-height: 1.45; }
.bk-f .bk-cb span { opacity: 1; }
.bk-f .bk-cb input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; padding: 0; border-radius: 4px; accent-color: var(--accent); }
.bk-f .bk-cb input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.bk-note { margin-top: 22px; font-size: 15px; color: var(--ink-2); max-width: 46ch; }
.bk-note a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-ink); text-underline-offset: 3px; display: inline-block; padding-block: 11px; margin-block: -11px; }
.bk-s2 .btn { margin-top: 22px; width: 100%; }
@media (min-width: 600px) { .bk-s2 .btn { width: auto; } }
.bk-msg { margin-top: 18px; padding: 14px 16px; background: var(--blush); border-radius: var(--radius); font-size: 16px; }
.bk-msg a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.bk-msg b { font-weight: 500; }
.bk-alts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bk-alt { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 500; font-size: 15px; /* taste-skill-ignore: межа кнопки-варіанта (контрол) */
  transition: background-color .15s, transform .12s ease-out; } /* taste-skill-ignore: межа кнопки-варіанта */
.bk-alt:active { transform: scale(.97); }
@media (hover: hover) { .bk-alt:hover { background: var(--surface-2); } }
.bk-mini { display: none; }
@media (min-width: 960px) { .bk-mini { display: block; } .bk-mini svg { pointer-events: none; } }
.bk-mini p { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.bk-ts { margin-top: 8px; }
.bk-ts:empty { margin: 0; }

/* ── крок 3 і «Моя заявка» ── */
.bk-s3, .bk-moya { max-width: 640px; padding-bottom: 80px; }
.bk-lead2 { margin-top: 18px; font-size: 18px; max-width: 44ch; }
.bk-s3 .bk-recap { margin: 28px 0 0; }
.bk-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.bk-acts .btn { margin: 0; }
.bk-small { margin-top: 18px; font-size: 15px; color: var(--ink-2); max-width: 48ch; }
.bk-small a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-ink); text-underline-offset: 3px; display: inline-block; padding-block: 11px; margin-block: -11px; }

.bk-moya { padding-top: clamp(28px, 4vw, 56px); }
.bk-kind { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
@media (min-width: 960px) {
  .bk-moya { max-width: none; }
  #bk-moya-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "a b" "c b"; gap: 0 clamp(48px, 7vw, 112px); align-items: start; }
  .bk-m1 { grid-area: a; } .bk-m2 { grid-area: b; } .bk-m3 { grid-area: c; }
  #bk-moya-body > .bk-dl { margin-top: 30px; }
}
.bk-st { margin-top: 18px; font: 500 clamp(30px, 3.6vw, 42px)/1.08 var(--font-serif); letter-spacing: -.01em; }
.bk-st.is-wait { color: var(--ink); }
.bk-st.is-ok { color: var(--ink); }
.bk-st.is-off { color: var(--ink-2); }
.bk-st i { display: inline-block; width: .32em; height: .32em; border-radius: 50%; margin-right: .3em; vertical-align: .22em; background: var(--brass); }
.bk-st.is-ok i { background: var(--accent); }
.bk-st.is-off i { background: transparent; box-shadow: inset 0 0 0 2px var(--ink-2); } /* taste-skill-ignore: кружечок статусу «скасовано» — контур */
.bk-dl { margin: 28px 0 0; border-top: 1px solid var(--line); } /* taste-skill-ignore: рядки-значення з макета v2 */
.bk-dl > div { display: grid; grid-template-columns: minmax(96px, 30%) 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); } /* taste-skill-ignore: рядки-значення */
.bk-dl dt { font-size: 15px; color: var(--ink-2); }
.bk-dl dd { margin: 0; font: 500 20px/1.3 var(--font-serif); font-variant-numeric: lining-nums; }
.bk-confirm { margin-top: 28px; padding: 18px 18px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); } /* taste-skill-ignore: підтвердження скасування — шар над сторінкою */
.bk-confirm p { font-size: 17px; }
.bk-confirm .bk-acts { margin-top: 16px; }
.bk-danger { color: var(--accent-ink); }
.bk-loading { margin-top: 24px; color: var(--ink-2); }

/* телефон і вузький планшет */
@media (max-width: 959px) {
  .bk-scrim { background: var(--bk-scrim); }
  .bk-pop { position: fixed; top: auto; bottom: 0; left: 0; right: 0; margin-inline: auto; width: min(560px, 100%); max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 14px 14px 0 0; opacity: 1; transform: translateY(105%);
    padding: 0 max(20px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-right, 0px));
    transition: transform .42s var(--bk-sheet), visibility 0s linear .42s; }
  .bk-pop[data-open] { transform: none; transition: transform .42s var(--bk-sheet); }
  .bk-grab { display: block; height: 26px; margin-inline: -20px; touch-action: none; cursor: grab; position: sticky; top: 0; background: var(--surface); z-index: 1; }
  .bk-grab::after { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); opacity: .6; margin: 10px auto 0; }
  .bk-ph { position: sticky; top: 26px; background: var(--surface); z-index: 1; padding-bottom: 6px; touch-action: none; }
}
@media (max-width: 520px) {
  .bk-b1 { font-size: 19px; }
  .bk .btn { padding: 0 22px; }
  .bk-hh h2 { font-size: 26px; }
  .bk-val b { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk *, .bk *::before, .bk *::after, .bk-step { animation: none !important; transition: none !important; }
  .bk-pop { transition: opacity .15s ease !important; }
}
