/* Book-a-call Calendly modal — cross-fades in over the page. */
.ac-cal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 23, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.ac-cal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

.ac-cal-modal {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: min(90vh, 720px);
  background: var(--bg-2, #0D1117);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.ac-cal-overlay.is-open .ac-cal-modal { transform: none; }

/* Scoped + !important so Astra's global button styles can't bleed in. */
#ac-cal-overlay .ac-cal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: none !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: none !important;
  line-height: 1 !important;
  transition: background 0.2s;
}
#ac-cal-overlay .ac-cal-close:hover { background: rgba(0, 0, 0, 0.75) !important; }
#ac-cal-overlay .ac-cal-close svg { display: block; width: 18px; height: 18px; stroke: #fff !important; }

.ac-cal-embed {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-2, #0D1117);
}
/* Loading spinner sits behind the iframe until Calendly paints over it. */
.ac-cal-embed::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--cyan, #06B6D4);
  border-radius: 50%;
  animation: ac-cal-spin 0.8s linear infinite;
}
@keyframes ac-cal-spin { to { transform: rotate(360deg); } }

.ac-cal-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ac-cal-overlay,
  .ac-cal-modal { transition: none; }
}
