/* Finestra di prenotazione (usa i colori e i caratteri di site.css). */
/* ---------- finestra ---------- */
html.bk-lock, html.bk-lock body { overflow: hidden; }
.bk {
  --bk-radius: 22px;
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  height: min(780px, calc(100dvh - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(5, 28, 42, .45);
}
.bk[open] { display: block; animation: bk-in .26s cubic-bezier(.2, .8, .2, 1); }
.bk::backdrop { background: rgba(5, 28, 42, .62); backdrop-filter: blur(6px); animation: bk-fade .26s ease; }
@keyframes bk-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes bk-fade { from { opacity: 0; } to { opacity: 1; } }

.bk-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.bk-head { padding: 22px clamp(20px, 3vw, 36px) 16px; background: var(--white); border-bottom: 1px solid var(--line); }
.bk-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bk-brand { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.bk-close {
  display: grid; place-items: center; width: 42px; height: 42px; margin: -6px -8px 0 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer; transition: background .15s ease;
}
.bk-close:hover { background: var(--sage); }
.bk-title { margin: 4px 0 14px; font-family: var(--serif-display); font-size: clamp(32px, 3.6vw, 44px); line-height: 1.05; font-weight: 600; letter-spacing: -.01em; outline: none; }
.bk-title:focus-visible { outline: none; }

.bk-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.bk-steps[hidden] { display: none; }
.bk-step { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.bk-step::after { content: ""; flex: 1; height: 2px; margin-left: 4px; border-radius: 2px; background: var(--line); }
.bk-step:last-child::after { display: none; }
.bk-step-dot {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--white); font-size: 11px;
}
.bk-step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-step.is-current { color: var(--ink); }
.bk-step.is-current .bk-step-dot { border-color: var(--green); background: var(--green); color: var(--white); }
.bk-step.is-done { color: var(--green); }
.bk-step.is-done .bk-step-dot { border-color: var(--green); background: var(--sage); color: var(--green); }
.bk-step.is-done::after { background: var(--green); }
.bk-chip { display: none; margin: 12px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--sage); color: var(--deep); font-size: 12px; font-weight: 700; }

.bk-body { display: grid; grid-template-columns: minmax(0, 1fr) 310px; min-height: 0; }
.bk-main { min-height: 0; overflow-y: auto; padding: clamp(18px, 3vw, 32px) clamp(20px, 3vw, 36px) 0; scroll-behavior: smooth; overscroll-behavior: contain; }
.bk-aside { min-height: 0; overflow-y: auto; padding: clamp(18px, 3vw, 32px) clamp(18px, 2vw, 26px); border-left: 1px solid var(--line); background: #eaf2f4; }
.bk-aside[hidden] { display: none; }
.bk-body:has(.bk-aside[hidden]) { grid-template-columns: minmax(0, 1fr); }

.bk-intro h3 { font-family: var(--serif-display);  margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.bk-intro p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.bk-kicker { margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.bk-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* azioni fisse in basso */
.bk-actions {
  position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 22px calc(-1 * clamp(20px, 3vw, 36px)) 0; padding: 14px clamp(20px, 3vw, 36px) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 72%, rgba(247, 250, 251, 0));
}
.bk-actions > :only-child { margin-left: auto; }
.bk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.bk-btn-primary { background: var(--green); color: var(--white); }
.bk-btn-primary:hover:not(:disabled) { background: var(--deep); transform: translateY(-1px); }
.bk-btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.bk-btn-primary.is-loading { cursor: progress; opacity: .85; }
.bk-btn-ghost { border-color: var(--line); background: var(--white); color: var(--ink); }
.bk-btn-ghost:hover { border-color: var(--green); }
.bk-btn:focus-visible, .bk-card-head:focus-visible, .bk-slot:focus-visible, .bk-day:focus-visible, .bk-close:focus-visible, .bk-cal-nav:focus-visible, .bk-tab:focus-visible, .bk-link:focus-visible,
.bk-stepper-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.bk-spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 254, 250, .35); border-top-color: #fff; border-radius: 50%; animation: bk-spin .7s linear infinite; }
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* tab e carte */
.bk-tabs { display: inline-flex; margin-bottom: 16px; padding: 4px; border-radius: 999px; background: var(--sage); }
.bk-tab { min-height: 38px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--green); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s ease, color .15s ease; }
.bk-tab.is-active { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(5, 58, 84, .12); }
.bk-list { display: grid; gap: 10px; }
.bk-card { border: 1.5px solid var(--line); border-radius: 18px; background: var(--white); transition: border-color .18s ease, box-shadow .18s ease; }
.bk-card:hover { border-color: #a9c7d2; }
.bk-card.is-selected { border-color: var(--green); box-shadow: 0 10px 30px rgba(7, 79, 113, .12); }
.bk-card-head { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-radius: 18px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bk-card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sage); color: var(--green); }
.bk-card.is-selected .bk-card-icon { background: var(--green); color: var(--white); }
.bk-card-copy { display: grid; gap: 2px; min-width: 0; }
.bk-card-copy strong { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.bk-card-copy small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.bk-card-meta { display: grid; gap: 2px; justify-items: end; color: var(--green); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.bk-card-meta span:first-child:not(:last-child) { color: var(--muted); font-weight: 600; }
.bk-card-body { padding: 0 16px 6px; animation: bk-fade .2s ease; }
.bk-card-body .bk-actions { position: static; margin: 12px 0 8px; padding: 0; background: none; }
.bk-extras { margin: 0 0 12px; padding: 0; border: 0; }
.bk-extras legend { margin-bottom: 8px; padding: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bk-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 8px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.bk-option:has(input:checked) { border-color: var(--green); background: #e3f0f4; }
.bk-option:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.bk-option input { position: absolute; opacity: 0; pointer-events: none; }
.bk-option-mark { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid #8fb0bd; border-radius: 6px; background: var(--white); }
.bk-option input[type="radio"] + .bk-option-mark { border-radius: 50%; }
.bk-option input:checked + .bk-option-mark { border-color: var(--green); background: var(--green); }
.bk-option input[type="checkbox"]:checked + .bk-option-mark::after { content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid var(--white); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.bk-option input[type="radio"]:checked + .bk-option-mark { box-shadow: inset 0 0 0 3.5px var(--white); }
.bk-option-text { font-size: 14px; font-weight: 600; line-height: 1.35; }
.bk-option-price { font-size: 13px; font-weight: 700; color: var(--green); }
.bk-note, .bk-fixed { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; color: #6b4a10; font-size: 13px; line-height: 1.45; }
.bk-note svg, .bk-fixed svg { flex: none; margin-top: 2px; }
.bk-fixed { align-items: center; color: var(--ink); }
.bk-stepper { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--paper); }
.bk-stepper-label { margin-right: auto; font-size: 14px; font-weight: 600; }
.bk-stepper-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer; }
.bk-stepper-btn:disabled { opacity: .35; cursor: not-allowed; }
.bk-stepper-value { min-width: 22px; text-align: center; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bk-stepper-sub { min-width: 44px; color: var(--muted); font-size: 13px; }
.bk-empty { padding: 24px; border-radius: 16px; background: var(--white); color: var(--muted); text-align: center; line-height: 1.6; }
.bk-skeleton { display: grid; gap: 10px; }
.bk-skeleton span { height: 74px; border-radius: 18px; background: linear-gradient(90deg, #dde9ec 25%, #edf4f6 50%, #dde9ec 75%); background-size: 200% 100%; animation: bk-shimmer 1.2s linear infinite; }
@keyframes bk-shimmer { to { background-position: -200% 0; } }

/* calendario e orari */
.bk-calendar { padding: 16px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--white); }
.bk-calendar > .bk-skeleton { grid-template-columns: repeat(2, 1fr); }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bk-cal-title { font-size: 16px; font-weight: 700; text-transform: capitalize; }
.bk-cal-nav { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
.bk-cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.bk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-cal-dow { padding: 4px 0 8px; text-align: center; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bk-day { position: relative; display: grid; place-items: center; align-content: center; height: 46px; border: 1.5px solid transparent; border-radius: 14px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bk-day small { position: absolute; bottom: 4px; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bk-day.is-none { opacity: .38; cursor: default; }
.bk-day.is-full { cursor: not-allowed; opacity: .6; text-decoration: line-through; text-decoration-thickness: 1px; }
.bk-day.is-open { background: #e3f0f4; color: var(--ink); font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.bk-day.is-open:hover { border-color: var(--green); transform: translateY(-1px); }
.bk-day.is-selected { border-color: var(--green); background: var(--green); color: var(--white); }
.bk-hint { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.bk-waiting-link { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.bk-link { padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bk-slots { margin-top: 18px; }
.bk-slots h4 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.bk-slots h4::first-letter { text-transform: uppercase; }
.bk-slot-group { margin-bottom: 14px; }
.bk-slot-label { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.bk-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bk-slot { min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.bk-slot:hover { border-color: var(--green); }
.bk-slot.is-selected { border-color: var(--green); background: var(--green); color: var(--white); }
.bk-nodates { padding: 20px 8px; text-align: center; }
.bk-nodates strong { display: block; margin-bottom: 6px; font-size: 17px; }
.bk-nodates p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.bk-nodates .bk-btn { margin: 0 auto; }

/* modulo dati */
.bk-form .bk-intro { margin-bottom: 4px; }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 14px; }
.bk-field { min-width: 0; }
.bk-field.is-wide { grid-column: 1 / -1; }
.bk-field label:not(.bk-check) { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.bk-opt { color: var(--muted); font-weight: 500; }
.bk-field input:not([type="checkbox"]):not([type="radio"]), .bk-field select, .bk-field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--white);
  color: var(--ink); font: inherit; font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
.bk-field textarea { resize: vertical; min-height: 84px; }
.bk-field input:focus, .bk-field select:focus, .bk-field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(7, 79, 113, .16); }
.bk-field input:disabled { background: #e6eef0; color: var(--muted); }
.bk-field [aria-invalid="true"] { border-color: #b3382c !important; box-shadow: 0 0 0 4px rgba(179, 56, 44, .12) !important; }
.bk-field-error { margin: 6px 0 0; color: #a52f24; font-size: 12.5px; font-weight: 600; }
.bk-field-error[hidden] { display: none; }
.bk-hint-text { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.bk-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.bk-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); }
.bk-check-inline { margin-top: 8px; }
.bk-check-card { margin-top: 16px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--white); font-weight: 600; }
.bk-check-card:has(input:checked) { border-color: var(--green); background: #e3f0f4; }
.bk-other { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--white); }
.bk-other > * + * { margin-top: 12px; }
.bk-warn { display: flex; gap: 8px; margin: 0; color: #6b4a10; font-size: 13px; line-height: 1.45; }
.bk-warn svg { flex: none; margin-top: 2px; }
.bk-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-pill { position: relative; }
.bk-pill input { position: absolute; opacity: 0; pointer-events: none; }
.bk-pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); font-size: 14px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.bk-pill input:checked + span { border-color: var(--green); background: var(--green); color: var(--white); }
.bk-pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.bk-consents { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.bk-consent { margin-bottom: 16px; }
.bk-consent-label { margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 1.45; }
.bk-ref { color: var(--muted); font-size: 12px; font-weight: 500; }
.bk-extra { margin-bottom: 16px; padding: 14px; border-radius: 14px; background: var(--white); }
.bk-extra .bk-check { margin-top: 12px; }
.bk-legal { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.bk-legal a { color: var(--green); font-weight: 700; }
.bk-error-summary { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fbe9e6; color: #8d2a20; font-size: 13.5px; font-weight: 700; }
.bk-error-summary[hidden] { display: none; }

/* riepilogo, esiti, errori */
.bk-summary-title { font-family: var(--serif-display);  margin: 0 0 14px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.bk-rows, .bk-review { margin: 0; }
.bk-row { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid rgba(5, 58, 84, .1); }
.bk-row dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bk-row dd { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; text-transform: none; }
.bk-row dd:first-letter { text-transform: uppercase; }
.bk-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; font-size: 14px; }
.bk-total strong { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.bk-review { padding: 6px 18px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--white); }
.bk-review .bk-row:last-child { border-bottom: 0; }
.bk-error, .bk-dup { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; font-weight: 600; }
.bk-error { background: #fbe9e6; color: #8d2a20; }
.bk-dup { background: #fdf3dc; color: #6b4a10; }
.bk-dup[hidden] { display: none; }
.bk-error svg, .bk-dup svg { flex: none; margin-top: 2px; }
.bk-done { display: grid; justify-items: center; gap: 6px; padding: 28px 8px 8px; text-align: center; }
.bk-done-mark { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 10px; border-radius: 50%; background: var(--green); color: var(--white); animation: bk-pop .45s cubic-bezier(.2, 1.4, .3, 1); }
@keyframes bk-pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.bk-done h3 { font-family: var(--serif-display);  margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.bk-done p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; text-transform: none; }
.bk-code { display: inline-flex; gap: 8px; align-items: baseline; margin-top: 8px !important; padding: 8px 16px; border-radius: 999px; background: var(--sage); color: var(--deep) !important; }
.bk-code strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.bk-done-note { max-width: 460px; margin-top: 10px !important; font-size: 13.5px !important; }
.bk-done-note a { color: var(--green); font-weight: 700; }
.bk-cal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

/* telefono e schermi piccoli: finestra a tutto schermo */
@media (max-width: 860px) {
  .bk { width: 100vw; height: 100dvh; max-width: 100vw; border-radius: 0; }
  .bk-body { grid-template-columns: minmax(0, 1fr); }
  .bk-aside { display: none; }
  .bk-chip:not([hidden]) { display: block; }
  .bk-head { padding-top: 16px; padding-bottom: 12px; }
  .bk-title { margin-bottom: 12px; }
  .bk-step-label { display: none; }
  .bk-step.is-current .bk-step-label { display: block; }
  .bk-steps { grid-template-columns: repeat(3, auto) 1fr; }
  .bk-step.is-current { flex: 1; }
  .bk-card-head { grid-template-columns: 42px minmax(0, 1fr); }
  .bk-card-icon { width: 42px; height: 42px; }
  .bk-card-meta { grid-column: 2; grid-auto-flow: column; justify-content: start; gap: 10px; }
  .bk-card-meta span:first-child:not(:last-child)::after { content: " ·"; }
  .bk-card-body .bk-actions > .bk-btn { width: 100%; }
  .bk-grid { grid-template-columns: minmax(0, 1fr); }
  .bk-calendar { padding: 12px; }
  .bk-actions > .bk-btn-primary { flex: 1; }
}
@media (max-width: 420px) {
  .bk-actions { gap: 8px; }
  .bk-actions .bk-btn { padding: 0 16px; }
  .bk-cal-links .bk-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bk[open], .bk::backdrop, .bk-card-body, .bk-done-mark, .bk-skeleton span, .bk-spinner { animation-duration: .01ms; animation-iteration-count: 1; }
  .bk-btn, .book-btn, .bk-day, .bk-slot, .bk-card { transition: none; }
  .bk-main { scroll-behavior: auto; }
}
