/* Book-a-demo modal — VenueStory marketing (dark + olive)
 * Two phases, one at a time: (1) date & time  (2) details + captcha
 */
.db-root[hidden] { display: none !important; }
.db-root {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 20px 14px;
  box-sizing: border-box;
}
.db-backdrop {
  position: absolute; inset: 0;
  background: rgb(0 0 0 / 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.db-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: var(--surface, #202020);
  border: 1px solid var(--border, #333);
  border-radius: var(--r-xl, 18px);
  box-shadow: 0 32px 70px -28px rgb(0 0 0 / 0.75);
  color: var(--fg, #F2F0EC);
  display: flex;
  flex-direction: column;
  will-change: transform, opacity;
}

/* Entrance: backdrop soft-fades, panel rises + scales in */
.db-root.db-enter .db-backdrop {
  animation: dbBackdropIn 0.32s ease both;
}
.db-root.db-enter .db-panel {
  animation: dbPanelIn 0.44s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes dbBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dbPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .db-root.db-enter .db-backdrop,
  .db-root.db-enter .db-panel {
    animation: none;
  }
}
.db-panel.phase-2 {
  width: min(480px, 100%);
}
.db-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 18px;
  padding: 18px 20px 16px 24px;
  border-bottom: 1px solid var(--border, #333);
}
.db-head-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.db-title-icon {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--fg, #F2F0EC);
}
.db-title-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.db-head h2 {
  margin: 0;
  font: 600 clamp(22px, 3vw, 28px)/1.15 var(--font-display, Georgia, serif);
  letter-spacing: -0.01em;
}

/* Compact greeting under the title (full-width, no side-by-side crowding) */
.db-head .db-blurb {
  order: 3;
  width: 100%;
  max-width: 100%;
  margin: 4px 0 0;
  padding-right: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  min-width: 0;
}
.db-panel.phase-2 .db-blurb {
  display: none; /* phase 2 is form-only — keep it tight */
}
.db-x {
  flex: none;
  width: 40px; height: 40px;
  border: 0; border-radius: 10px;
  background: var(--surface-muted, #282828);
  color: var(--fg-muted, #B2AFA8);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s, color 0.15s;
  margin-left: auto;
}
.db-x:hover { background: var(--border, #333); color: #fff; }
.db-x svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* Main content */
.db-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.db-phase {
  padding: 20px 24px 8px;
  flex: 1;
  min-height: 0;
}
.db-phase[hidden] { display: none !important; }

.db-label {
  font: 600 12px/1 var(--font-sans, system-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle, #8B8880);
  margin: 0 0 12px;
}

/* Calendar */
.db-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.db-cal-nav b {
  font: 600 15px/1.2 var(--font-sans, system-ui);
  letter-spacing: -0.01em;
}
.db-cal-nav button {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--border, #333);
  background: var(--surface-muted, #282828);
  color: var(--fg, #F2F0EC);
  cursor: pointer;
  display: grid; place-items: center;
}
.db-cal-nav button:hover { border-color: var(--border-strong, #474747); background: #303030; }
.db-cal-nav button:disabled { opacity: 0.35; cursor: not-allowed; }
.db-cal-nav button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.db-dow {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  margin-bottom: 6px;
}
.db-dow span {
  text-align: center;
  font: 600 11px/1 var(--font-sans, system-ui);
  letter-spacing: 0.04em;
  color: var(--fg-subtle, #8B8880);
  padding: 6px 0;
}
.db-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.db-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg, #F2F0EC);
  font: 500 13.5px/1 var(--font-sans, system-ui);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.db-day:hover:not(:disabled):not(.on) { background: var(--surface-muted, #282828); }
.db-day.mute { color: var(--fg-subtle, #8B8880); opacity: 0.45; }
.db-day:disabled { opacity: 0.28; cursor: not-allowed; }
.db-day.on {
  background: var(--primary, #6F8140);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px -8px rgb(111 129 64 / 0.7);
}
.db-day.today:not(.on) {
  box-shadow: inset 0 0 0 1.5px var(--olive-400, #8A9A58);
}

/* Sliding calendar → time slots (within phase 1) */
.db-slide { overflow: hidden; width: 100%; }
.db-slide-track {
  display: flex;
  width: 200%;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.db-slide-track.show-slots { transform: translateX(-50%); }
.db-slide-pane {
  width: 50%;
  flex: none;
  box-sizing: border-box;
  padding-right: 4px;
}
.db-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--olive-300, #A9B57C);
  font: 500 13.5px/1.3 var(--font-sans, system-ui);
  cursor: pointer;
}
.db-back:hover { color: var(--fg, #F2F0EC); }
.db-back svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.db-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: min(380px, 46vh);
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}
@media (max-width: 520px) { .db-slots { grid-template-columns: repeat(2, 1fr); max-height: none; } }
.db-slot {
  height: 48px;
  border-radius: 11px;
  border: 1px solid var(--border, #333);
  background: var(--surface-sunken, #0E0E0E);
  color: var(--fg-muted, #B2AFA8);
  font: 500 15px/1 var(--font-sans, system-ui);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.db-slot:hover { border-color: var(--border-strong, #474747); color: var(--fg, #F2F0EC); }
.db-slot.on {
  border-color: var(--primary, #6F8140);
  background: rgb(111 129 64 / 0.18);
  color: var(--olive-300, #A9B57C);
  font-weight: 600;
}
.db-slot:disabled { opacity: 0.3; cursor: not-allowed; }
.db-hint {
  margin: 10px 0 0;
  font: 400 12.5px/1.4 var(--font-sans, system-ui);
  color: var(--fg-subtle, #8B8880);
}
@media (prefers-reduced-motion: reduce) {
  .db-slide-track { transition: none; }
}

/* Form (phase 2) */
.db-fld { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.db-fld label {
  font: 600 12.5px/1 var(--font-sans, system-ui);
  letter-spacing: 0.02em;
  color: var(--fg, #F2F0EC);
}
.db-fld label small { font-weight: 400; color: var(--fg-subtle, #8B8880); }
.db-fld input, .db-fld textarea {
  appearance: none;
  background: var(--surface-sunken, #0E0E0E);
  border: 1px solid var(--border, #333);
  border-radius: var(--r-md, 12px);
  color: var(--fg, #F2F0EC);
  font: 400 15px/1.4 var(--font-sans, system-ui);
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.db-fld input:focus, .db-fld textarea:focus {
  outline: none;
  border-color: var(--olive-400, #8A9A58);
  box-shadow: 0 0 0 3px rgb(169 181 124 / 0.18);
}
.db-fld textarea { min-height: 88px; resize: vertical; }
.db-pick {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgb(111 129 64 / 0.12);
  border: 1px solid rgb(111 129 64 / 0.28);
  font: 500 13.5px/1.4 var(--font-sans, system-ui);
  color: var(--olive-300, #A9B57C);
  min-height: 44px;
  display: flex; align-items: center;
}
.db-pick.empty {
  color: var(--fg-subtle, #8B8880);
  background: var(--surface-muted, #282828);
  border-color: var(--border, #333);
}

.db-foot {
  border-top: 1px solid var(--border, #333);
  padding: 14px 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.db-avs { display: flex; flex: none; }
.db-avs .av {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--surface, #202020);
  overflow: hidden; background: #6F8140;
}
.db-avs .av + .av { margin-left: -10px; }
.db-avs .av:nth-child(2) { background: #A9713F; }
.db-avs .av:nth-child(3) { background: #58656E; }
.db-avs .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.db-blurb p {
  margin: 0;
  font: 400 13px/1.4 var(--font-sans, system-ui);
  color: var(--fg-muted, #B2AFA8);
  text-wrap: pretty;
}
.db-blurb p b { color: var(--fg, #F2F0EC); font-weight: 600; }

/* Footer actions */
.db-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 14px;
  width: 100%;
}
.db-actions[hidden] { display: none !important; }
/* Phase 2: captcha left, submit right */
#dbActions2 {
  justify-content: space-between;
}
.db-ts {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  flex: none;
  margin-right: auto;
}
.db-ts .cf-turnstile,
.db-ts iframe {
  margin: 0 !important;
}
.db-err {
  display: none;
  margin: 0;
  order: 3;
  width: 100%;
  text-align: right;
  font: 500 13px/1.4 var(--font-sans, system-ui);
  color: #E5484D;
}
.db-err.show { display: block; }
.db-submit {
  height: 48px;
  min-width: 160px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-md, 12px);
  background: var(--primary, #6F8140);
  color: #fff;
  font: 500 15px/1 var(--font-sans, system-ui);
  cursor: pointer;
  box-shadow: var(--shadow-md, 0 8px 20px -10px rgb(0 0 0 / 0.5));
  transition: background 0.15s, transform 0.15s;
  flex: none;
}
.db-submit:hover:not(:disabled) { background: var(--primary-hover, #596A32); transform: translateY(-1px); }
.db-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
@media (max-width: 520px) {
  #dbActions2 { justify-content: stretch; }
  .db-submit { flex: 1; min-width: 0; width: 100%; }
  .db-ts { width: 100%; margin-right: 0; }
  .db-err { text-align: center; }
}

/* Thanks state */
.db-main[hidden], .db-thanks[hidden] { display: none !important; }
.db-thanks {
  padding: 48px 28px 40px;
  text-align: center;
}
.db-thanks .ck {
  width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--primary-soft, #23281A);
  color: var(--olive-300, #A9B57C);
  display: grid; place-items: center;
}
.db-thanks .ck svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.db-thanks h3 {
  margin: 0 0 10px;
  font: 600 24px/1.2 var(--font-display, Georgia, serif);
}
.db-thanks p {
  margin: 0 auto 22px;
  max-width: 380px;
  font: 400 15px/1.55 var(--font-sans, system-ui);
  color: var(--fg-muted, #B2AFA8);
}
.db-thanks .db-close-btn {
  height: 46px; padding: 0 22px;
  border-radius: var(--r-md, 12px);
  border: 1px solid var(--border-strong, #474747);
  background: var(--surface-muted, #282828);
  color: var(--fg, #F2F0EC);
  font: 500 14.5px/1 var(--font-sans, system-ui);
  cursor: pointer;
}
.db-thanks .db-close-btn:hover { background: #303030; }

.db-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

body.db-open { overflow: hidden; }
