/* ==========================================================================
   book-demo.css: the "Book a demo" flow (v2.2, 28 Nov 2026, asked by Tommy).
   v2.2: the HubSpot form lines up with the card's text on wider screens.
   Used by scripts/book-demo.js on every page: the pop-up from every
   "Book a demo" button, and the inline card in each product page's #book
   section. Looks like the pricing page's quote form (styles/pricing.css),
   with its own bd- class names so the two never clash.

   Some pages don't load styles/tokens.css yet, so every token has its
   brand value as a fallback. Change colours in tokens.css, not here.
   ========================================================================== */

.bd-root, .bd-inline {
  --bd-navy: var(--odro-navy, #0E2050);
  --bd-blue: var(--odro-blue, #0094C6);
  --bd-deep: var(--odro-text-blue, #0069A8);
  --bd-mid: var(--odro-mid-blue, #479CD0);
  --bd-sky: var(--odro-sky, #94CEF2);
  --bd-mist: var(--odro-mist, #ECF6FD);
  --bd-gold: var(--odro-gold, #FFDB29);
  --bd-white: var(--odro-white, #FFFFFF);
  --bd-muted: rgba(14, 32, 80, 0.72);
  --bd-line: rgba(14, 32, 80, 0.18);
  --bd-display: var(--font-display, Epilogue, Arial, sans-serif);
  --bd-body: var(--font-body, 'Baloo 2', Arial, sans-serif);
  font-family: var(--bd-body);
  color: var(--bd-navy);
  line-height: 1.5;
  text-align: left;
}
.bd-root *, .bd-inline * { box-sizing: border-box; }
.bd-root[hidden], .bd-root [hidden], .bd-inline [hidden] { display: none !important; }

/* ---- Pop-up ------------------------------------------------------------ */
.bd-root { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(14, 32, 80, 0.86); }
.bd-dialog { position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; background: var(--bd-white); border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); padding: clamp(20px, 3.4vw, 32px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 639px) {
  .bd-root { padding: 0; align-items: stretch; }
  .bd-dialog { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: 20px 18px 28px; }
}

/* ---- Top of the card: step, title, close ------------------------------- */
.bd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bd-top-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bd-eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--bd-deep); }
.bd-title { margin: 0; font-family: var(--bd-display); font-weight: 700; font-size: clamp(24px, 3vw, 28px); line-height: 1.15; letter-spacing: -0.02em; color: var(--bd-navy); }
.bd-title:focus { outline: none; }
.bd-close { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(14, 32, 80, 0.16); background: var(--bd-white); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: var(--bd-navy); }
.bd-close:hover { background: var(--bd-mist); }

.bd-prog { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.bd-prog span { height: 6px; border-radius: 999px; background: var(--bd-mist); transition: background 0.3s ease; }
.bd-prog span.on { background: var(--bd-blue); }

/* ---- Steps ---------------------------------------------------------------- */
.bd-step { display: flex; flex-direction: column; gap: 16px; }
.bd-step.bd-in, .bd-field.bd-in { animation: bd-rise 0.35s ease-out both; }
@keyframes bd-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bd-lead { margin: 0; font-size: 17px; }
.bd-lead:focus { outline: none; }
.bd-q { margin: 0; font-size: 18px; font-weight: 700; }
.bd-q:focus { outline: none; }

/* Product tiles (same look as the pricing quote form) */
.bd-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.bd-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bd-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; min-height: 92px; padding: 14px 34px 12px; border: 1.5px solid var(--bd-line); border-radius: 16px; background: var(--bd-white); cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.bd-tile:hover { border-color: var(--bd-mid); }
.bd-tile.is-on { border-color: var(--bd-blue); box-shadow: inset 0 0 0 1px var(--bd-blue); background: #F5FAFE; }
.bd-tile img { height: 29px; width: auto; max-width: 100%; display: block; }
.bd-tile-name { font-family: var(--bd-display); font-weight: 700; font-size: 19px; line-height: 1.2; }
.bd-kind { font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.bd-new { background: var(--bd-gold); color: var(--bd-navy); border-radius: 999px; padding: 0 7px; font-size: 10px; font-weight: 800; letter-spacing: 0.8px; line-height: 1.7; }
.bd-box { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid rgba(14, 32, 80, 0.55); background: var(--bd-white); display: flex; align-items: center; justify-content: center; }
.bd-box svg { opacity: 0; }
.bd-tile.is-on .bd-box { background: var(--bd-blue); border-color: var(--bd-blue); }
.bd-tile.is-on .bd-box svg { opacity: 1; }
.bd-tile--wide { grid-column: 1 / -1; min-height: 64px; flex-direction: row; gap: 10px; }
.bd-tile:has(.bd-vh:focus-visible) { outline: 3px solid var(--bd-deep); outline-offset: 2px; }
@media (max-width: 420px) {
  .bd-tile { padding: 34px 14px 12px; }
  .bd-tile img { height: 24px; }
  .bd-box { top: 8px; right: 8px; }
  .bd-tile--wide { padding: 14px 40px 14px 14px; flex-direction: column; gap: 2px; }
  .bd-tile--wide .bd-box { top: 50%; transform: translateY(-50%); right: 14px; }
}

/* Visually hidden, still reachable by keyboard and screen readers */
.bd-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }

/* Summary bar: "You picked: …  Change" */
.bd-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bd-mist); border-radius: 12px; padding: 8px 8px 8px 14px; font-size: 15px; font-weight: 600; }
.bd-summary strong { font-weight: 800; }

/* Fields */
.bd-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.bd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.bd-span { grid-column: 1 / -1; }
@media (max-width: 420px) { .bd-fields { grid-template-columns: minmax(0, 1fr); } }
.bd-field { display: flex; flex-direction: column; gap: 6px; font-size: 16px; font-weight: 700; }
.bd-field input, .bd-field select { min-height: 48px; width: 100%; border-radius: 12px; border: 1.5px solid #6B8FB3; padding: 0 14px; font-family: var(--bd-body); font-size: 16px; font-weight: 500; color: var(--bd-navy); background: var(--bd-white); }
.bd-field input::placeholder { color: rgba(14, 32, 80, 0.6); }
.bd-field input[aria-invalid="true"], .bd-field select[aria-invalid="true"] { border-color: var(--bd-navy); border-width: 2px; background: #FFFBEA; }
.bd-field input:focus-visible, .bd-field select:focus-visible { outline: 3px solid var(--bd-deep); outline-offset: 2px; }

.bd-err { margin: 0; font-size: 14px; font-weight: 700; color: var(--bd-navy); background: #FFF6CC; border-radius: 10px; padding: 6px 10px; }
.bd-err:empty { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.bd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.bd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 14px; border: 0; font-family: var(--bd-body); font-weight: 700; font-size: 17px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.bd-btn-gold { background: var(--bd-gold); color: var(--bd-navy); box-shadow: 0 6px 18px rgba(14, 32, 80, 0.14); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.bd-btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(14, 32, 80, 0.18); }
.bd-btn-line { background: var(--bd-white); color: var(--bd-navy); border: 2px solid var(--bd-navy); }
.bd-btn-line:hover { background: var(--bd-mist); }
.bd-btn:focus-visible, .bd-close:focus-visible, .bd-textbtn:focus-visible, .bd-link:focus-visible, .bd-chip:focus-visible { outline: 3px solid var(--bd-deep); outline-offset: 3px; }
.bd-textbtn { background: none; border: 0; padding: 6px 2px; font-family: var(--bd-body); font-weight: 700; font-size: 15px; color: var(--bd-navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; flex: none; border-radius: 8px; }
.bd-link { color: var(--bd-deep); font-weight: 700; font-size: 15px; text-underline-offset: 3px; }
.bd-link:hover { color: var(--bd-navy); }

.bd-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.bd-foot p, .bd-privacy { margin: 0; font-size: 14px; }
.bd-foot a, .bd-privacy a { color: var(--bd-deep); }

/* Stand-in labels, like the other placeholders on Staging */
.bd-tag { margin: 0; align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--bd-navy); background: var(--bd-mist); border: 2px dashed var(--bd-mid); border-radius: 10px; padding: 4px 10px; }

/* ---- Calendar ------------------------------------------------------------- */
.bd-cal { display: flex; flex-direction: column; gap: 12px; border: 1.5px solid var(--bd-line); border-radius: 18px; padding: clamp(14px, 2.4vw, 20px); }
.bd-cal-h { margin: 0; font-size: 16px; font-weight: 700; }
.bd-cal-h span { font-weight: 500; color: var(--bd-muted); }
.bd-chips { display: grid; gap: 8px; }
.bd-chips--days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bd-chips--times { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 520px) { .bd-chips--days, .bd-chips--times { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bd-chip { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 6px 4px; border: 1.5px solid var(--bd-line); border-radius: 12px; background: var(--bd-white); font-family: var(--bd-body); font-size: 15px; font-weight: 700; line-height: 1.15; color: var(--bd-navy); cursor: pointer; }
.bd-chip small { font-size: 12px; font-weight: 600; color: var(--bd-muted); }
.bd-chip:hover { border-color: var(--bd-mid); }
.bd-chip[aria-pressed="true"] { background: var(--bd-navy); border-color: var(--bd-navy); color: var(--bd-white); }
.bd-chip[aria-pressed="true"] small { color: var(--bd-sky); }
.bd-chip:disabled { opacity: 0.45; cursor: default; }

/* Real HubSpot calendar and form slots */
.bd-frame { display: block; width: 100%; height: 680px; border: 0; border-radius: 14px; background: var(--bd-white); }
@media (max-width: 639px) { .bd-frame { height: 760px; } }
.bd-hs { min-height: 360px; }
/* HubSpot draws its form inside its own frame with about 40px of padding we can't change
   (no setting for it). On wider screens, pull the frame out so the fields line up with
   "Where can we reach you?" (28 Nov 2026, Tommy). Phones are left as they are. The pop-up
   hides the bit of HubSpot's empty padding that now sits past its edge, so no sideways scroll. */
@media (min-width: 768px) {
  .bd-hs .hs-form-frame { margin: -40px -40px -24px; }
  .bd-dialog { overflow-x: hidden; }
}
.bd-fallback { margin: 0; font-size: 15px; }

/* ---- Booked ----------------------------------------------------------------- */
.bd-done { align-items: flex-start; gap: 12px; padding-top: 4px; }
.bd-done:focus { outline: none; }
.bd-done-title { margin: 0; font-family: var(--bd-display); font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
.bd-done p { margin: 0; }

/* ---- Inline card in a product page's #book section ------------------------- */
.bd-inline { display: flex; flex-direction: column; gap: 14px; }
.bd-inline .bd-title { font-size: 22px; }

@media (prefers-reduced-motion: reduce) {
  .bd-step.bd-in, .bd-field.bd-in { animation: none; }
  .bd-tile, .bd-btn-gold, .bd-prog span { transition: none; }
  .bd-btn-gold:hover { transform: none; }
}
