/* =========================================================
   iAdvice — Booking modal (Calendly integration)
   Loads after styles.css; uses brand tokens from :root
   ========================================================= */

.booking-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(5,16,21,.74);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.booking-overlay.open { opacity: 1; visibility: visible; }
body.bk-lock { overflow: hidden; }

.booking-modal {
  position: relative;
  width: min(980px, 100%);
  max-height: min(860px, 94vh);
  display: grid; grid-template-columns: 312px 1fr;
  background: var(--ink-2);
  border: 1px solid var(--hair);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,.7);
  transform: translateY(18px) scale(.985);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.booking-overlay.open .booking-modal { transform: none; opacity: 1; }

/* ---- aside ---- */
.bk-aside {
  position: relative;
  padding: 38px 32px;
  background:
    radial-gradient(120% 60% at 80% 0%, rgba(200,162,74,.16), transparent 60%),
    linear-gradient(165deg, var(--ink-3) 0%, var(--ink) 100%);
  border-right: 1px solid var(--hair);
  display: flex; flex-direction: column;
}
.bk-aside .overline { margin-bottom: 18px; }
.bk-aside h2 {
  font-size: 27px; font-weight: 300; line-height: 1.16; letter-spacing: -.02em;
  color: var(--cream); margin-bottom: 26px;
}
.bk-aside h2 em { font-style: italic; color: var(--gold-bright); }
.bk-points { list-style: none; display: flex; flex-direction: column; gap: 15px; margin: 0; padding: 0; }
.bk-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: rgba(239,233,220,.82); line-height: 1.4; }
.bk-points .tick {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: rgba(200,162,74,.16); color: var(--gold-bright);
  display: grid; place-items: center;
}
.bk-points .tick svg { width: 11px; height: 11px; }
.bk-aside .aside-foot {
  margin-top: auto; padding-top: 26px;
}
.bk-rating { display: flex; align-items: center; gap: 10px; padding-top: 22px; border-top: 1px solid var(--hair); }
.bk-rating .stars { color: var(--gold-bright); font-size: 13px; letter-spacing: 1px; }
.bk-rating span { font-size: 13px; color: var(--muted-d); }
.bk-rating b { color: var(--cream); font-weight: 600; }

/* ---- main ---- */
.bk-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.bk-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 68px 18px 26px; border-bottom: 1px solid var(--hair); flex: none;
}
.bk-head .bk-title { font-size: 17px; font-weight: 600; color: var(--cream); }
.bk-head .bk-step-of { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.bk-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--hair); background: rgba(239,233,220,.04); color: var(--cream);
  display: grid; place-items: center; cursor: pointer;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.bk-close:hover { background: rgba(239,233,220,.1); border-color: rgba(239,233,220,.4); transform: rotate(90deg); }
.bk-close svg { width: 15px; height: 15px; }

.bk-body { padding: 26px; overflow-y: auto; flex: 1; min-height: 0; }

/* ---- steps ---- */
.bk-step { display: none; }
.bk-step.active { display: block; animation: bkFade .45s var(--ease); }
@keyframes bkFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.bk-lead { font-size: 14.5px; color: var(--muted-d); margin-bottom: 22px; line-height: 1.55; }

/* format cards */
.bk-formats { display: flex; flex-direction: column; gap: 14px; }
.bk-format {
  display: flex; align-items: center; gap: 18px; text-align: left;
  width: 100%; cursor: pointer; font-family: var(--sans);
  padding: 20px 22px; border-radius: 8px;
  border: 1px solid var(--hair); background: rgba(239,233,220,.018);
  transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.bk-format:hover { border-color: var(--gold); background: var(--ink-3); transform: translateY(-2px); }
.bk-format .fico {
  flex: none; width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(150deg, var(--teal-soft), var(--ink)); color: var(--gold-bright);
  display: grid; place-items: center; border: 1px solid var(--hair);
}
.bk-format .fico svg { width: 24px; height: 24px; }
.bk-format .ftext { flex: 1; min-width: 0; }
.bk-format .ftext .fname { display: flex; align-items: center; gap: 10px; }
.bk-format .ftext b { font-size: 17px; font-weight: 600; color: var(--cream); }
.bk-format .ftext .dur { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: #20180a; background: var(--gold); padding: 3px 8px; border-radius: 100px; }
.bk-format .ftext p { font-size: 13.5px; color: var(--muted-d); margin-top: 5px; line-height: 1.4; }
.bk-format .fgo { flex: none; color: var(--gold-bright); transition: transform .4s var(--ease); }
.bk-format:hover .fgo { transform: translateX(4px); }

/* schedule step header */
.bk-sched-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.bk-back {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: none; border: none; font-family: var(--sans);
  font-size: 13.5px; font-weight: 600; color: var(--muted-d); padding: 0;
  transition: color .3s var(--ease);
}
.bk-back:hover { color: var(--gold-bright); }
.bk-back svg { width: 14px; height: 14px; }
.bk-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--hair); border-radius: 100px; }
.bk-seg button {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: var(--muted-d); background: none; border: none; padding: 7px 14px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .3s var(--ease), background .3s var(--ease);
}
.bk-seg button svg { width: 13px; height: 13px; }
.bk-seg button.on { color: #20180a; background: var(--gold); }

/* Calendly inline mount */
/* Calendly inline embed — must be free to auto-resize; a fixed height + overflow:hidden
   clips it to a blank ~150px frame. Give it room and let Calendly fill it. */
.bk-cal { min-height: 700px; border-radius: 8px; }
.bk-cal .calendly-inline-widget { width: 100%; min-width: 0; min-height: 700px; }
.bk-cal iframe { width: 100%; min-height: 700px; border: 0; border-radius: 8px; }

/* loading shimmer */
.bk-loading { min-height: 700px; display: grid; place-items: center; }
.bk-spin { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--hair); border-top-color: var(--gold); animation: bkSpin .8s linear infinite; }
@keyframes bkSpin { to { transform: rotate(360deg); } }

/* ---- preview scheduler (until Calendly connected) ---- */
.bk-preview { display: flex; flex-direction: column; gap: 22px; }
.bk-preview-tag {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold-bright); background: rgba(200,162,74,.1); border: 1px solid rgba(200,162,74,.28);
  padding: 6px 12px; border-radius: 100px;
}
.bk-preview-tag .pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-bright); }
.bk-pv-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.bk-dates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.bk-date {
  cursor: pointer; font-family: var(--sans); text-align: center;
  padding: 12px 6px; border-radius: 7px; border: 1px solid var(--hair);
  background: rgba(239,233,220,.02); transition: border-color .3s var(--ease), background .3s var(--ease);
}
.bk-date:hover { border-color: rgba(239,233,220,.35); }
.bk-date.on { border-color: var(--gold); background: var(--ink-3); }
.bk-date .dow { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-d); }
.bk-date .dnum { display: block; font-size: 21px; font-weight: 300; color: var(--cream); margin-top: 3px; }
.bk-date .dmon { display: block; font-size: 11px; color: var(--muted-d); margin-top: 2px; }
.bk-date.on .dnum { color: var(--gold-bright); }

.bk-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.bk-time {
  cursor: pointer; font-family: var(--sans); font-size: 14.5px; font-weight: 500;
  color: var(--cream); padding: 12px 8px; border-radius: 7px;
  border: 1px solid var(--hair); background: rgba(239,233,220,.02);
  font-variant-numeric: tabular-nums;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.bk-time:hover { border-color: rgba(239,233,220,.35); }
.bk-time.on { border-color: var(--gold); background: var(--gold); color: #20180a; }
.bk-tz { font-size: 12.5px; color: var(--muted-d); text-align: center; }

.bk-confirm-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; border-top: 1px solid var(--hair); flex-wrap: wrap;
}
.bk-confirm-bar .summary { font-size: 13.5px; color: var(--muted-d); }
.bk-confirm-bar .summary b { color: var(--cream); font-weight: 600; }
.bk-confirm-bar .btn[disabled] { opacity: .4; pointer-events: none; }

/* confirmation state */
.bk-confirm { text-align: center; padding: 30px 10px; display: none; }
.bk-confirm.show { display: block; animation: bkFade .5s var(--ease); }
.bk-confirm .seal {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%;
  background: rgba(200,162,74,.14); color: var(--gold-bright); display: grid; place-items: center;
  border: 1px solid rgba(200,162,74,.3);
}
.bk-confirm .seal svg { width: 30px; height: 30px; }
.bk-confirm h3 { font-size: 24px; font-weight: 400; color: var(--cream); margin-bottom: 12px; letter-spacing: -.01em; }
.bk-confirm p { font-size: 15px; color: var(--muted-d); max-width: 40ch; margin: 0 auto 6px; line-height: 1.55; }
.bk-confirm .recap {
  margin: 24px auto 0; max-width: 360px; text-align: left;
  border: 1px solid var(--hair); border-radius: 8px; overflow: hidden;
}
.bk-confirm .recap .rrow { display: flex; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--hair); }
.bk-confirm .recap .rrow:last-child { border-bottom: none; }
.bk-confirm .recap .rk { width: 76px; flex: none; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.bk-confirm .recap .rv { font-size: 14.5px; color: var(--cream); }
.bk-confirm .bk-confirm-cta { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* dev hint (subtle) */
.bk-devnote { margin-top: 18px; font-size: 12px; color: rgba(239,233,220,.4); line-height: 1.5; text-align: center; }
.bk-devnote code { color: var(--gold-bright); font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11.5px; }

/* ---- responsive ---- */
@media (max-width: 760px) {
  .booking-modal { grid-template-columns: 1fr; max-height: 94vh; }
  .bk-aside {
    padding: 26px 24px 22px; border-right: none; border-bottom: 1px solid var(--hair);
  }
  .bk-aside h2 { font-size: 22px; margin-bottom: 18px; }
  .bk-points { flex-direction: row; flex-wrap: wrap; gap: 10px 18px; }
  .bk-points li { font-size: 13px; }
  .bk-aside .aside-foot { display: none; }
}
@media (max-width: 480px) {
  .booking-overlay { padding: 0; }
  .booking-modal { max-height: 100vh; height: 100%; border-radius: 0; border: none; }
  .bk-points { display: none; }
  .bk-aside { padding: 22px 22px 18px; }
  .bk-aside h2 { margin-bottom: 0; }
  .bk-dates { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .bk-date { padding: 10px 3px; }
  .bk-date .dnum { font-size: 18px; }
  .bk-times { grid-template-columns: repeat(2, 1fr); }
  .bk-format { padding: 16px 16px; gap: 14px; }
  .bk-format .fico { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .booking-overlay, .booking-modal, .bk-step, .bk-confirm, .bk-spin { transition: none !important; animation: none !important; }
}
