/* ============================================================
   AG8NTIFY — Booking modal (Cal.com discovery call)
   Obsidian panel · Singularity gold · matches .qual styling
   ============================================================ */

.book-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.book-modal.open { display: grid; place-items: center; padding: 20px; }

.book-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(4, 4, 5, 0.74);
  backdrop-filter: blur(9px) saturate(1.1);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.book-modal.open .book-modal-overlay { opacity: 1; }

.book-modal-panel {
  position: relative; z-index: 1;
  width: min(640px, 100%);
  max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, var(--bg-3), #0a0a0d);
  border: 1px solid var(--line-2); border-radius: 22px;
  box-shadow: 0 60px 120px -50px rgba(0,0,0,0.9), 0 0 90px -44px var(--gold-glow);
  overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(0.97);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.book-modal.open .book-modal-panel { opacity: 1; transform: none; }

.book-modal-x {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s;
}
.book-modal-x:hover { color: var(--white); border-color: var(--gold-deep); background: rgba(255,255,255,0.08); transform: rotate(90deg); }

/* ---- duration chooser ---- */
.book-choose { padding: 42px 36px 36px; }
.book-choose .eyebrow { margin-bottom: 18px; }
.book-choose h3.display { font-size: clamp(26px, 5vw, 38px); margin-bottom: 12px; }
.book-sub { font-size: 14.5px; color: var(--muted); max-width: 46ch; margin-bottom: 28px; }

.book-durations { display: flex; flex-direction: column; gap: 13px; }
.book-dur {
  display: flex; flex-direction: column; gap: 9px; text-align: left; width: 100%;
  border: 1px solid var(--line-2); border-radius: 16px; padding: 20px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  transition: border-color 0.3s var(--ease), background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.book-dur:hover, .book-dur:focus-visible {
  border-color: var(--gold); transform: translateY(-3px); outline: none;
  box-shadow: 0 24px 56px -32px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,0.05);
}
.book-dur .bd-row { display: flex; align-items: center; gap: 12px; }
.book-dur .bd-time { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--white); line-height: 1; letter-spacing: -0.02em; }
.book-dur .bd-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-deep); border-radius: 100px; padding: 4px 11px;
}
.book-dur .bd-desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.book-dur .bd-go { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--gold-bright); margin-top: 2px; }
.book-dur .bd-go .arr { transition: transform 0.3s var(--ease); }
.book-dur:hover .bd-go .arr, .book-dur:focus-visible .bd-go .arr { transform: translateX(4px); }

/* ---- calendar view ---- */
.book-choose[hidden], .book-cal[hidden] { display: none; }
.book-cal { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.book-cal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 58px 18px 22px; border-bottom: 1px solid var(--line); flex: none;
}
.book-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted); padding: 7px 12px; border-radius: 100px;
  border: 1px solid var(--line); transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.book-back:hover { color: var(--white); border-color: var(--gold-deep); background: var(--surface-2); }
.book-back .arr-b { transition: transform 0.3s var(--ease); }
.book-back:hover .arr-b { transform: translateX(-3px); }
.book-cal-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--gold); }

.book-cal-mount { flex: 1; min-height: 540px; overflow: auto; background: #060608; }
.book-cal-mount > [data-dur] { width: 100%; min-height: 540px; }
.book-cal-mount [data-dur][hidden] { display: none; }

/* Cal.com iframe fills the mount */
.book-cal-mount iframe { width: 100% !important; border: 0; }

/* ---- placeholder (shown until a real Cal.com link is configured) ---- */
.book-cal-ph {
  min-height: 540px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 40px 32px;
}
.book-cal-ph .bph-ic {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: var(--gold);
  border: 1px solid var(--gold-deep); background: linear-gradient(155deg, rgba(217,164,65,0.16), rgba(217,164,65,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 28px -10px var(--gold-glow);
}
.book-cal-ph .bph-ic svg { width: 26px; height: 26px; }
.book-cal-ph .bph-t { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--white); }
.book-cal-ph .bph-d { font-size: 13.5px; color: var(--muted); max-width: 42ch; line-height: 1.6; }
.book-cal-ph .bph-d code { font-family: var(--mono); font-size: 12px; color: var(--gold-bright); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.book-cal-ph .bph-slug {
  margin-top: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--muted-2);
  border: 1px dashed var(--line-2); border-radius: 100px; padding: 8px 16px;
}
.book-cal-ph .bph-slug b { color: var(--gold); }

@media (max-width: 560px) {
  .book-choose { padding: 36px 22px 26px; }
  .book-cal-mount, .book-cal-mount > [data-dur], .book-cal-ph { min-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  .book-modal-overlay, .book-modal-panel, .book-modal-x, .book-dur, .book-back, .arr, .arr-b { transition: none !important; }
  .book-modal-panel { transform: none !important; }
}
