/* =========================================================
   Página de agendamento — usa as cores e fontes de styles.css
   ========================================================= */
.bk-page { min-height: 100svh; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

.bk-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(247, 241, 236, .82); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.bk-top .logo__img { width: 50px; }
.bk-progress { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--ink-3); }
.bk-progress li { display: flex; align-items: center; gap: 6px; }
.bk-progress li + li::before { content: ""; width: 18px; height: 1px; background: var(--line); }
.bk-progress li.is-current { color: var(--accent); font-weight: 600; }
.bk-progress li.is-done { color: var(--ink-2); }

.bk { max-width: 720px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) var(--gutter) 0; }
.bk-step { animation: bkIn .7s var(--spring-soft) both; }
@keyframes bkIn { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }
.bk-step.is-leaving { animation: bkOut .28s var(--ease) both; }
@keyframes bkOut { to { opacity: 0; transform: translateY(-14px) scale(.985); } }

.bk-title { font-family: var(--serif); font-size: clamp(38px, 7vw, 58px); line-height: 1.04; letter-spacing: -.015em; margin: 8px 0 28px; }
.bk-title em { color: var(--accent); font-weight: 400; }
.bk-title--sm { font-size: clamp(28px, 5vw, 38px); margin: 34px 0 16px; }
.bk-back { background: none; border: 0; padding: 6px 0; margin-bottom: 6px; font: 600 14px var(--sans); color: var(--accent); cursor: pointer; }
.bk-loading, .bk-hint { color: var(--ink-3); font-size: 14px; }

/* Serviços */
.bk-services { display: grid; gap: 12px; }
.bk-group { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 0; }
.bk-service {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; text-align: left;
  width: 100%; padding: 18px 20px; border-radius: 18px;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease), transform .45s var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.bk-service:active { transform: scale(.975); transition-duration: .12s; }
.bk-service h3 { font-family: var(--serif); font-size: 23px; line-height: 1.15; }
.bk-service p { grid-column: 1; margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.bk-service .bk-price { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.bk-price strong { display: block; font-family: var(--serif); font-size: 24px; color: var(--accent); font-weight: 600; }
.bk-price small { font-size: 12px; color: var(--ink-3); }
.bk-service[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 14px 34px -18px rgba(145, 90, 77, .55), inset 0 0 0 1px var(--accent); }

.bk-addons { border: 0; padding: 0; margin: 26px 0 0; }
.bk-addons legend { font-family: var(--serif); font-size: 24px; margin-bottom: 12px; }
.bk-addon { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); margin-bottom: 10px; cursor: pointer; transition: border-color .3s; }
.bk-addon:has(input:checked) { border-color: var(--accent); }
.bk-addon input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.bk-addon span { flex: 1; }
.bk-addon b { color: var(--accent); font-weight: 600; }

/* Dias: carrossel horizontal com rolagem por "ímã" */
.bk-days-wrap { margin: 0 calc(var(--gutter) * -1); }
.bk-days { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.bk-days::-webkit-scrollbar { display: none; }
.bk-day {
  flex: 0 0 auto; scroll-snap-align: start; width: 74px; padding: 14px 0 12px; border-radius: 18px;
  display: grid; justify-items: center; gap: 2px;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); font: inherit; cursor: pointer;
  transition: transform .45s var(--spring), border-color .3s, background .3s, color .3s;
  -webkit-tap-highlight-color: transparent;
}
.bk-day small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.bk-day strong { font-family: var(--serif); font-size: 30px; line-height: 1; font-weight: 500; }
.bk-day span { font-size: 11px; color: var(--ink-3); }
.bk-day:active { transform: scale(.94); transition-duration: .12s; }
.bk-day[disabled] { opacity: .38; cursor: default; }
.bk-day[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-3px); }
.bk-day[aria-selected="true"] small, .bk-day[aria-selected="true"] span { color: var(--blush); }

/* Horários */
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.bk-slot {
  height: 50px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line);
  font: 600 15px var(--sans); color: var(--ink); cursor: pointer;
  transition: transform .45s var(--spring), border-color .3s, background .3s, color .3s;
  animation: bkPop .5s var(--spring) both; animation-delay: calc(var(--i) * 22ms);
  -webkit-tap-highlight-color: transparent;
}
@keyframes bkPop { from { opacity: 0; transform: scale(.85); } }
.bk-slot:active { transform: scale(.93); transition-duration: .12s; }
.bk-slot[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Formulário */
.bk-form { display: grid; gap: 16px; }
.bk-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.bk-field small { font-weight: 400; color: var(--ink-3); }
.bk-field input, .bk-field textarea {
  width: 100%; padding: 15px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  font: 400 16px var(--sans); color: var(--ink); transition: border-color .3s, box-shadow .3s; resize: vertical;
}
.bk-field input:focus, .bk-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(145, 90, 77, .12); }
.bk-field input[aria-invalid="true"] { border-color: #B3261E; }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bk-summary { margin-top: 6px; padding: 20px; border-radius: 18px; background: var(--bg-2); display: grid; gap: 8px; font-size: 14.5px; }
.bk-summary div { display: flex; justify-content: space-between; gap: 16px; }
.bk-summary span { color: var(--ink-2); }
.bk-summary strong { text-align: right; }
.bk-summary .bk-total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 16px; }
.bk-summary .bk-total strong { color: var(--accent); font-family: var(--serif); font-size: 24px; line-height: 1; }
.bk-rules { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.bk-error { color: #B3261E; font-size: 14px; font-weight: 600; margin: 0; }

/* Barra inferior fixa (estilo app) */
.bk-bar[hidden] { display: none; }
.bk-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 696px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 22px;
  background: rgba(255, 251, 248, .86); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line); box-shadow: 0 18px 50px -20px rgba(42, 34, 36, .45);
  animation: barIn .6s var(--spring) both;
}
@keyframes barIn { from { transform: translateY(140%); } }
.bk-bar__info { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.bk-bar__info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-bar__info span { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-bar .btn { flex: 0 0 auto; }
.bk-bar .btn[disabled] { opacity: .35; pointer-events: none; }
.bk-bar .btn.is-loading { pointer-events: none; }
.bk-bar .btn.is-loading::before { content: ""; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* Sucesso */
.bk-done { text-align: center; padding-top: 4vh; }
.bk-check { width: 92px; height: 92px; margin: 0 auto 10px; }
.bk-check svg { width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.bk-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .8s var(--ease) .1s forwards; }
.bk-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s var(--ease) .75s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.bk-done__text { font-size: 18px; margin: 0 auto 8px; max-width: 460px; }
.bk-done__sub { color: var(--ink-2); max-width: 460px; margin: 0 auto 30px; }
.bk-done__actions { display: grid; gap: 12px; justify-items: center; }

@media (max-width: 600px) {
  .bk-top .logo__text { display: none; }
  .bk-progress li:not(.is-current) { font-size: 0; }
  .bk-progress li:not(.is-current)::after { content: attr(data-step); font-size: 12px; }
  .bk-done__actions .btn { width: 100%; white-space: normal; }
}
.bk-page [hidden] { display: none !important; }
