/* VRTL booking widget: the /book/ page, and the modal opened by any [data-book] link. */

.bk { position: relative; }
.bk-head .kicker { margin-bottom: 14px; }
.bk-head h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin-bottom: 8px; }
.bk-head > p { margin-bottom: 18px; }

.bk-progress { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 0.8rem; color: var(--muted); }
.bk-progress li { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; padding-top: 10px; transition: color 0.4s; }
.bk-progress li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--taupe); }
.bk-progress li::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--teal-2); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--out); }
.bk-progress li.on { color: var(--ink); }
.bk-progress li.on::after { transform: scaleX(1); }
.bk-progress i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 0.7rem; font-weight: 600; background: var(--taupe); color: var(--muted); transition: background 0.4s, color 0.4s; }
.bk-progress li.on i { background: var(--teal-2); color: var(--paper); }
.bk-progress li.now i { box-shadow: 0 0 0 4px rgba(42, 99, 115, 0.14); }

.bk-demo { display: flex; gap: 10px; align-items: flex-start; margin: -6px 0 18px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; line-height: 1.45; color: var(--amber); background: rgba(246, 236, 214, 0.55); border: 1px dashed rgba(138, 90, 18, 0.3); }
.bk-demo .badge { flex: none; }

.bk-panel { animation: vRise 0.55s var(--out) both; }

/* calendar */
.bk-cal-head, .bk-week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bk-cal-head { margin-bottom: 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: center; }
.bk-week + .bk-week { margin-top: 8px; }
.bk-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 56px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.85); color: var(--ink); cursor: pointer;
  font: 600 1.05rem/1 var(--sans); font-variant-numeric: tabular-nums;
  transition: transform 0.3s var(--out), background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.3s;
  animation: vRise 0.5s var(--out) calc(var(--i) * 14ms) both;
}
.bk-day .m { font-size: 0.66rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); transition: color 0.25s; }
.bk-day:not(:disabled):hover { transform: translateY(-2px); border-color: var(--teal-2); box-shadow: 0 10px 22px -16px rgba(0, 66, 80, 0.55); }
.bk-day.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 14px 26px -16px rgba(41, 42, 45, 0.7); animation: bkPop 0.4s var(--out); }
.bk-day.sel .m { color: rgba(251, 251, 249, 0.7); }
.bk-day.closed { background: transparent; border-style: dashed; color: var(--stone); cursor: default; }
.bk-day:disabled:not(.closed) { cursor: progress; }

/* times */
.bk-times { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); animation: vRise 0.5s var(--out) both; }
.bk-label { margin: 0 0 12px; font-weight: 600; color: var(--ink); }
.bk-time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.bk-time {
  padding: 10px 0; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.85); color: var(--ink); cursor: pointer;
  font: 500 0.9rem/1 var(--sans); font-variant-numeric: tabular-nums;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--out);
  animation: vRise 0.45s var(--out) calc(var(--i) * 22ms) both;
}
.bk-time:not(:disabled):hover { border-color: var(--teal-2); color: var(--teal); transform: translateY(-1px); }
.bk-time.sel { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.bk-time:disabled:not(.sel) { opacity: 0.45; }
.bk-hint { margin: 18px 0 0; }

.bk-checking {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 4px; margin-top: 16px; padding: 13px 16px;
  border-radius: var(--radius-sm); background: var(--mint); color: var(--teal); font-size: 0.9rem; font-weight: 500;
  animation: vRise 0.4s var(--out) both;
}
.bk-scan { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%); transform: translateX(-100%); animation: bkScan 1.1s ease-in-out infinite; }
.bk-dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.bk-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: bkDot 1s ease-in-out infinite; }
.bk-dots i:nth-child(2) { animation-delay: 0.15s; }
.bk-dots i:nth-child(3) { animation-delay: 0.3s; }

/* notes */
.bk-note { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border-radius: var(--radius-sm); }
.bk-note p { margin: 0; flex: 1; line-height: 1.5; }
.bk-note strong { color: var(--ink); }
.bk-note-busy { background: var(--amber-bg); color: var(--amber); }
.bk-note-free { background: var(--mint); color: var(--teal); }
.bk-note-icon { flex: none; position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; animation: bkPop 0.5s var(--out) both; }
.bk-note-icon::before { content: ""; position: absolute; left: 50%; top: 6px; width: 1.5px; height: 8px; margin-left: -0.75px; background: currentColor; border-radius: 1px; }
.bk-note-icon::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 2.5px; height: 2.5px; margin-left: -1.25px; background: currentColor; border-radius: 50%; }
.bk-change { border: 0; background: none; padding: 4px 6px; cursor: pointer; font: 500 0.85rem var(--sans); color: var(--teal-2); text-decoration: underline; text-underline-offset: 3px; }

/* alternatives */
.bk-alts { display: grid; gap: 8px; margin-bottom: 14px; }
.bk-alt {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; padding: 14px 18px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.9); color: var(--ink); cursor: pointer;
  font: 500 0.95rem var(--sans);
  transition: border-color 0.25s, transform 0.35s var(--out), box-shadow 0.35s;
  animation: bkSlide 0.55s var(--out) calc(120ms + var(--i) * 70ms) both;
}
.bk-alt-time { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.bk-alt b { font-weight: 400; color: var(--muted); transition: transform 0.3s var(--snap), color 0.25s; }
.bk-alt:hover { border-color: var(--teal-2); transform: translateX(4px); box-shadow: 0 12px 24px -18px rgba(0, 66, 80, 0.5); }
.bk-alt:hover b { transform: translateX(3px); color: var(--teal); }

/* details */
.bk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.bk-fields .field { margin-bottom: 14px; }
.bk-wide { grid-column: 1 / -1; }
.bk-demo-fields { display: contents; }
.bk-demo-intro { margin: 4px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.bk-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.bk-actions p { margin: 0; }
.bk .errors { margin: 0 0 12px; }

/* tick */
.bk-tick { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bk-tick circle { stroke-dasharray: 66; stroke-dashoffset: 66; animation: bkDraw 0.6s var(--out) 0.1s forwards; }
.bk-tick path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: bkDraw 0.4s var(--out) 0.5s forwards; }

/* done */
.bk-done { text-align: center; padding: 10px 0 4px; }
.bk-tick-lg { width: 72px; height: 72px; margin: 0 auto 14px; color: var(--green); stroke-width: 1.3; display: block; animation: bkPop 0.6s var(--out) both; }
.bk-done h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 4px; animation: vRise 0.5s var(--out) 0.35s both; }
.bk-done-when { font-size: 1.1rem; font-weight: 600; color: var(--teal); animation: vRise 0.5s var(--out) 0.45s both; }
.bk-done > p, .bk-done > .btn { animation: vRise 0.5s var(--out) 0.55s both; }
.bk-done .muted { max-width: 44ch; margin-left: auto; margin-right: auto; }

/* skeleton */
.bk-skeleton { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bk-skeleton span { height: 56px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--sand) 0, var(--taupe) 50%, var(--sand) 100%); background-size: 200% 100%; animation: bkShimmer 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * 30ms); }

/* page */
.bk-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); gap: clamp(32px, 6vw, 80px); align-items: start; }
.bk-page .page-hero h1, .bk-page h1 { max-width: 14ch; }
.bk-expect { margin-top: 28px; animation: vRise 0.8s var(--out) 0.5s both; }
.bk-card { padding: clamp(22px, 3vw, 34px); animation: vRise 0.8s var(--out) 0.2s both; }
@media (max-width: 960px) { .bk-page-grid { grid-template-columns: 1fr; } }

/* modal */
html.bk-locked { overflow: hidden; }
.bk-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; }
.bk-backdrop { position: absolute; inset: 0; background: rgba(41, 42, 45, 0.36); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bk-sheet {
  position: relative; width: min(620px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(22px, 4vw, 34px); border-radius: 24px; background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(41, 42, 45, 0.55);
  animation: bkSheet 0.55s var(--out) both;
}
.bk-close { position: absolute; top: 16px; right: 16px; z-index: 1; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--sand); cursor: pointer; transition: background 0.2s, transform 0.3s var(--out); }
.bk-close:hover { background: var(--taupe); transform: rotate(90deg); }
.bk-close span::before, .bk-close span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; margin: -0.75px 0 0 -7px; background: var(--ink); transform: rotate(45deg); }
.bk-close span::after { transform: rotate(-45deg); }
.bk-modal .bk-head { padding-right: 44px; }

@media (max-width: 560px) {
  .bk-modal { padding: 0; align-items: end; }
  .bk-sheet { max-height: 94dvh; border-radius: 24px 24px 0 0; animation-name: bkSheetUp; }
  .bk-fields { grid-template-columns: 1fr; }
  .bk-day { height: 50px; }
  .bk-progress { font-size: 0.72rem; }
}

@keyframes bkPop { 0% { transform: scale(0.88); } 60% { transform: scale(1.04) translateY(-2px); } 100% { transform: translateY(-2px); } }
@keyframes bkSlide { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes bkScan { to { transform: translateX(100%); } }
@keyframes bkDot { 0%, 80%, 100% { opacity: 0.25; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes bkDraw { to { stroke-dashoffset: 0; } }
@keyframes bkShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes bkSheet { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes bkSheetUp { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .bk *, .bk-sheet { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .bk-tick circle, .bk-tick path { stroke-dashoffset: 0; }
}
