:root {
  --calendly-border: rgba(0, 100, 200, 0.14);
  --calendly-bg: rgba(255, 255, 255, 0.92);
  --calendly-muted: #5a6677;
}

.calendly-booking-panel {
  border: 1px solid var(--calendly-border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--calendly-bg);
  backdrop-filter: blur(10px);
}

.calendly-inline-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.calendly-inline-card-head h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.4px;
}

.calendly-inline-card-head p {
  color: var(--calendly-muted);
  font-size: 0.95rem;
}

.calendly-inline-embed,
.calendly-popup-inline-embed {
  --calendly-embed-height: 760px;
  width: 100%;
  height: var(--calendly-embed-height);
  position: relative;
  background: #fff;
  border: 1px solid var(--calendly-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.calendly-inline-embed {
  min-height: 560px;
}

.calendly-popup-inline-embed {
  min-height: 560px;
}

.calendly-inline-embed iframe,
.calendly-popup-inline-embed iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.calendly-popup-button {
  width: 100%;
  justify-content: center;
}

.calendly-widget-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 100, 200, 0.05) 25%,
    rgba(0, 100, 200, 0.1) 37%,
    rgba(0, 100, 200, 0.05) 63%
  );
  background-size: 400% 100%;
  animation: calendlySkeleton 1.4s ease infinite;
}

@keyframes calendlySkeleton {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

.calendly-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 18, 34, 0.56);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

.calendly-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.24s ease;
}

.calendly-modal-dialog {
  width: min(1120px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--calendly-border);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

.calendly-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid rgba(0, 100, 200, 0.12);
  background: rgba(244, 249, 255, 0.95);
}

.calendly-modal-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.calendly-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(0, 100, 200, 0.22);
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.calendly-modal-close:hover {
  background: #ecf5ff;
  border-color: rgba(0, 119, 230, 0.4);
}

.calendly-modal-close:focus-visible {
  outline: 2px solid rgba(0, 119, 230, 0.6);
  outline-offset: 2px;
}

body.calendly-modal-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 768px) {
  .calendly-inline-embed,
  .calendly-popup-inline-embed {
    --calendly-embed-height: 700px;
    min-height: 620px;
  }

  .calendly-booking-panel {
    padding: 18px;
  }

  .calendly-modal {
    padding: 0.5rem;
  }

  .calendly-modal-dialog {
    width: 100%;
    max-height: 96vh;
    border-radius: 0.85rem;
  }
}