/* ============================================================
   CALENDAR — in-page booking modal
   Opens with the same clean FLIP (scale + fade from the clicked
   button to center) as the AI Voice agent panel. Embeds the
   Cal.com booking flow inline so users never leave the site.
   ============================================================ */
#cal-modal { position: fixed; inset: 0; z-index: 9997; }
#cal-modal[hidden] { display: none; }

#cal-modal .cal-backdrop {
  position: fixed; inset: 0;
  background: rgba(12,12,14,.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .35s ease;
}
#cal-modal .cal-backdrop.cal-show { opacity: 1; }

#cal-modal .cal-panel {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(1040px, 94vw); height: min(760px, 90vh);
  background: #ffffff; border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 50px 120px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.06);
  will-change: transform, opacity;
}
#cal-modal .cal-panel[hidden] { display: none; }

/* slim header bar */
#cal-modal .cal-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #eee;
}
#cal-modal .cal-brand {
  font-weight: 700; letter-spacing: -0.04em; font-size: 20px; color: #0a0a0a; line-height: 1;
}
#cal-modal .cal-brand .lime-v { color: #BCF96D !important; }
#cal-modal .cal-brand sup { font-size: .42em; top: -1.1em; font-weight: 500; }
#cal-modal .cal-sub { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; color: #767676; margin-left: 12px; letter-spacing: .02em; }

#cal-modal .cal-close {
  width: 38px; height: 38px; flex: none; border: none; border-radius: 50%;
  background: #f0f0f0; color: #0a0a0a; font-size: 16px; cursor: pointer;
  display: grid; place-items: center; transition: background .25s, transform .25s;
}
#cal-modal .cal-close:hover { background: #e3e3e3; transform: rotate(90deg); }

/* embed area */
#cal-modal .cal-embed { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; background: #fff; }
#cal-modal .cal-embed iframe { width: 100% !important; height: 100% !important; border: 0; }

/* loading shimmer until Cal injects its iframe */
#cal-modal .cal-loading {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 16px;
  align-content: center; text-align: center; color: #767676;
  font-family: var(--mono, ui-monospace, monospace); font-size: 13px; letter-spacing: .04em;
}
#cal-modal .cal-loading .spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #ececec; border-top-color: #BCF96D; animation: cal-spin .8s linear infinite;
}
#cal-modal.cal-loaded .cal-loading { display: none; }
@keyframes cal-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  #cal-modal .cal-panel { width: 96vw; height: 92vh; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #cal-modal .cal-backdrop { transition: none; }
}
