/* ═══════════════════════════════════════════════════════════════════════════
   Book a demo: the booking sheet (scripts/demo.js)
   Uses the marketing pages' tokens (index.html, pricing.html), so it follows
   dark and light like everything else. Circular only.
   ═══════════════════════════════════════════════════════════════════════════ */
.bd { position: fixed; inset: 0; z-index: 300; }
.bd[hidden] { display: none; }
.bd-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 7, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 380ms ease; }
.bd.open .bd-backdrop { opacity: 1; }
.bd-sheet {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(600px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform: translateX(calc(100% + 24px));
  transition: transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bd.open .bd-sheet { transform: none; }

.bd-head { display: flex; justify-content: space-between; gap: 20px; padding: 26px 28px 18px; }
.bd-kicker { font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.bd-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-red); }
.bd-title { font-size: 1.75rem; font-weight: 500; line-height: 1.1; letter-spacing: -0.028em; color: var(--text-primary); }
.bd-sub { margin-top: 8px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); }
.bd-x { flex-shrink: 0; width: 36px; height: 36px; border: 1px solid var(--border-hairline); border-radius: 10px; background: transparent; color: var(--text-secondary); font-size: 20px; line-height: 1; }
.bd-x:hover { color: var(--text-primary); border-color: var(--border-strong); }

.bd-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 28px 18px; border-bottom: 1px solid var(--border-hairline); }
.bd-steps[hidden] { display: none; }
.bd-steps li { position: relative; padding-top: 12px; font-size: 0.8125rem; color: var(--text-tertiary); display: flex; gap: 8px; align-items: center; transition: color 300ms ease; }
.bd-steps li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--border-hairline); }
.bd-steps li::after { content: ''; position: absolute; top: 0; left: 0; height: 2px; width: 0; border-radius: 2px; background: var(--text-primary); transition: width 500ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.bd-steps li.on, .bd-steps li.done { color: var(--text-primary); }
.bd-steps li.on::after, .bd-steps li.done::after { width: 100%; }
.bd-steps b { font-weight: 500; }

.bd-body { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 26px; }
.bd-step { animation: bd-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.bd-step[hidden] { display: none; }
@keyframes bd-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.bd-q { font-size: 1.0625rem; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.bd-hint { font-size: 0.875rem; color: var(--text-tertiary); margin-bottom: 16px; }

/* Step 1: the ZIP map */
.bd-map { position: relative; height: 300px; border: 1px solid var(--border-hairline); border-radius: 14px; overflow: hidden; background-color: var(--bg-secondary); background-image: radial-gradient(circle at 1px 1px, var(--pattern-dot) 1px, transparent 0); background-size: 18px 18px; }
.bd-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.bd-tip { position: absolute; z-index: 2; pointer-events: none; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-primary); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); font-size: 0.78rem; line-height: 1.45; color: var(--text-secondary); white-space: nowrap; }
.bd-tip b { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-primary); }
.bd-tip[hidden] { display: none; }
.bd-sum { margin: 14px 0 12px; min-height: 1.5em; font-size: 0.9375rem; color: var(--text-secondary); }
.bd-sum b { font-weight: 500; color: var(--text-primary); }
.bd-zips { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-zip { height: 30px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--text-secondary); font-size: 0.8125rem; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.bd-zip:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.bd-zip[aria-pressed="true"] { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-primary); }
.bd-zip.all { font-weight: 500; }

/* Step 2: about you */
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.bd-field { display: flex; flex-direction: column; gap: 7px; }
.bd-field.wide { grid-column: 1 / -1; }
.bd-field label { font-size: 0.8125rem; color: var(--text-secondary); }
.bd-field label em { font-style: normal; color: var(--text-tertiary); }
.bd-field input { height: 46px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: 0.9375rem; transition: border-color 150ms ease, box-shadow 150ms ease; }
.bd-field input:focus { outline: none; border-color: var(--text-secondary); box-shadow: 0 0 0 3px var(--card-glow); }
.bd-field input[aria-invalid="true"] { border-color: var(--accent-red); }
.bd-roles { margin-top: 22px; }
.bd-roles-l { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 9px; }
.bd-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bd-role { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg-secondary); color: var(--text-primary); font-size: 0.9375rem; text-align: left; transition: border-color 150ms ease, background-color 150ms ease; }
.bd-role:hover { border-color: var(--text-tertiary); }
.bd-role i { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-tertiary); transition: box-shadow 150ms ease; }
.bd-role[aria-checked="true"] { border-color: var(--text-primary); }
.bd-role[aria-checked="true"] i { box-shadow: inset 0 0 0 5px var(--text-primary); }
.bd-hp { display: none; }

/* Step 3: a time */
.bd-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 8px; scrollbar-width: none; }
.bd-days::-webkit-scrollbar { display: none; }
.bd-day { flex: 0 0 auto; width: 64px; padding: 10px 0 9px; border: 1px solid var(--border-strong); border-radius: 12px; background: transparent; color: var(--text-secondary); text-align: center; transition: all 150ms ease; }
.bd-day span { display: block; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.bd-day b { display: block; margin-top: 3px; font-size: 1.25rem; font-weight: 500; color: var(--text-primary); }
.bd-day small { display: block; font-size: 0.7rem; color: var(--text-tertiary); }
.bd-day:hover { border-color: var(--text-tertiary); }
.bd-day[aria-selected="true"] { background: var(--text-primary); border-color: var(--text-primary); }
.bd-day[aria-selected="true"] span, .bd-day[aria-selected="true"] b, .bd-day[aria-selected="true"] small { color: var(--bg-primary); }
.bd-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bd-slot { height: 42px; border: 1px solid var(--border-strong); border-radius: 10px; background: transparent; color: var(--text-primary); font-size: 0.875rem; transition: all 150ms ease; }
.bd-slot:hover:not(:disabled) { border-color: var(--text-secondary); }
.bd-slot:disabled { color: var(--text-tertiary); opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.bd-slot[aria-pressed="true"] { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }
.bd-slots-msg { grid-column: 1 / -1; padding: 18px 0 6px; font-size: 0.875rem; color: var(--text-tertiary); }
.bd-slots-msg a { color: var(--text-primary); }
.bd-tz { margin-top: 14px; font-size: 0.8125rem; color: var(--text-tertiary); }
.bd-tz b { font-weight: 500; color: var(--text-primary); }
.bd-note { margin-top: 18px; display: flex; gap: 10px; padding: 13px 14px; border: 1px solid var(--border-hairline); border-radius: 12px; font-size: 0.8125rem; line-height: 1.5; color: var(--text-secondary); }
.bd-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--text-primary); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.bd-foot { display: flex; align-items: center; gap: 12px; padding: 16px 28px 20px; border-top: 1px solid var(--border-hairline); background: var(--bg-primary); }
.bd-foot .btn { padding: 12px 20px; }
.bd-foot [data-back][hidden] { display: none; }
.bd-foot-sum { flex: 1; min-width: 0; font-size: 0.8125rem; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-foot .btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.bd-err { margin-top: 14px; font-size: 0.875rem; color: var(--accent-red); }
.bd-err[hidden] { display: none; }

/* Done */
.bd-done { text-align: left; }
.bd-check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--text-primary); margin-bottom: 22px; animation: bd-pop 600ms cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.bd-check svg { width: 26px; height: 26px; fill: none; stroke: var(--bg-primary); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: bd-draw 500ms 250ms ease forwards; }
@keyframes bd-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bd-draw { to { stroke-dashoffset: 0; } }
.bd-done h3 { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.028em; line-height: 1.1; color: var(--text-primary); }
.bd-when { margin-top: 14px; font-size: 1.125rem; color: var(--text-primary); }
.bd-when small { display: block; margin-top: 3px; font-size: 0.875rem; color: var(--text-tertiary); }
.bd-done p { margin-top: 16px; font-size: 0.9375rem; line-height: 1.6; color: var(--text-secondary); }
.bd-done .bd-map { margin-top: 22px; height: 220px; }
.bd-done .bd-map canvas { cursor: default; }

@media (max-width: 640px) {
  .bd-sheet { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; border: 0; }
  .bd-head, .bd-body, .bd-foot { padding-left: 20px; padding-right: 20px; }
  .bd-steps { padding-left: 20px; padding-right: 20px; }
  .bd-title { font-size: 1.5rem; }
  .bd-map { height: 250px; }
  .bd-grid, .bd-role-grid { grid-template-columns: 1fr; }
  .bd-slots { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .bd-sheet, .bd-backdrop, .bd-step, .bd-check, .bd-check svg { transition: none; animation: none; }
  .bd-check svg { stroke-dashoffset: 0; }
}
