/* ============================================================
   calendly.css — Pureframe Labs
   Calendly booking widget, popup modal, confirmation overlay
   ============================================================ */

/* ── CALENDLY POPUP MODAL OVERLAY ── */
.calendly-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0.35s;
}

.calendly-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0s;
}

/* ── MODAL CONTAINER ── */
.calendly-modal {
  position: relative;
  width: 90vw;
  max-width: 1080px;
  height: 85vh;
  max-height: 720px;
  background: var(--bg);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.92) translateY(24px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.calendly-modal-overlay.active .calendly-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.05s;
}

/* ── MODAL CLOSE BUTTON ── */
.calendly-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  color: var(--text2);
  font-size: 20px;
  line-height: 1;
}

.calendly-modal-close:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--error);
  transform: rotate(90deg);
}

.calendly-modal-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── MODAL LOADING STATE ── */
.calendly-modal-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 5;
  background: var(--bg);
  transition: opacity 0.4s ease;
}

.calendly-modal-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.calendly-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: calendly-spin 0.8s linear infinite;
}

@keyframes calendly-spin {
  to {
    transform: rotate(360deg);
  }
}

.calendly-modal-loader p {
  font-size: 15px;
  color: var(--text2);
  font-weight: 500;
}

/* ── MODAL IFRAME ── */
.calendly-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── INLINE EMBED WRAPPER (Contact Section) ── */
.calendly-inline-wrapper {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  min-height: 680px;
}

.calendly-inline-wrapper:hover {
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.15);
}

.calendly-inline-wrapper .calendly-embed-widget {
  min-width: 100%;
  height: 680px;
}

.calendly-inline-wrapper iframe {
  border-radius: 20px;
}

/* Inline loading state */
.calendly-inline-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg);
  z-index: 2;
  transition: opacity 0.5s ease;
  border-radius: 20px;
}

.calendly-inline-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.calendly-inline-loader .calendly-spinner {
  width: 36px;
  height: 36px;
}

.calendly-inline-loader p {
  font-size: 14px;
  color: var(--text2);
  font-weight: 500;
}

/* ── ERROR STATE ── */
.calendly-error {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
}

.calendly-error.visible {
  display: flex;
}

.calendly-error-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.calendly-error h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.calendly-error p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 360px;
}

.calendly-error .btn-retry {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.calendly-error .btn-retry:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* ── BOOKING CONFIRMATION OVERLAY ── */
.booking-confirmation-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0.35s;
}

.booking-confirmation-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0s;
}

/* ── CONFIRMATION CARD ── */
.booking-confirmation {
  background: var(--bg);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
}

.booking-confirmation-overlay.active .booking-confirmation {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.08s;
}

/* ── SUCCESS CHECKMARK ── */
.confirmation-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: confirmPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

@keyframes confirmPop {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirmation-check svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.4s ease 0.5s forwards;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.booking-confirmation h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.booking-confirmation .confirm-subtitle {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── CONFIRMATION DETAILS ── */
.confirm-details {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.confirm-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.confirm-detail-row .detail-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.confirm-detail-row .detail-text {
  color: var(--text);
  font-weight: 500;
}

/* ── CONFIRMATION ACTIONS ── */
.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.confirm-actions .btn-primary {
  font-size: 15px;
  padding: 12px 28px;
}

.confirm-actions .btn-secondary {
  font-size: 15px;
  padding: 12px 28px;
}

/* ── CONTACT SECTION ENHANCED LAYOUT ── */
.contact-section-enhanced {
  padding: 120px 0;
}

.contact-enhanced-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.contact-enhanced-header .section-sub {
  margin: 0 auto;
}

/* ── MEETING TYPES GRID ── */
.meeting-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.meeting-type-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.meeting-type-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.06);
  transform: translateY(-2px);
}

.meeting-type-card.active {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.02);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.meeting-type-card .mt-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.meeting-type-card .mt-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meeting-type-card .mt-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.meeting-type-card .mt-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
}

.meeting-type-card .mt-check {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--primary);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
}

.meeting-type-card.active .mt-check {
  opacity: 1;
  transform: scale(1);
}

/* ── FULL WIDTH CALENDLY WRAPPER ── */
.calendly-full-wrapper {
  margin-bottom: 40px;
}

/* ── SOCIAL & INFO BAR ── */
.contact-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-info-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  text-decoration: none;
  transition: all var(--transition-smooth);
  flex: 1;
  min-width: 200px;
}

.contact-info-chip:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.contact-info-chip .chip-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.chip-icon-email {
  background: rgba(37, 99, 235, 0.08);
}

.chip-icon-linkedin {
  background: rgba(10, 102, 194, 0.08);
}

.chip-icon-github {
  background: rgba(15, 23, 42, 0.08);
}

.chip-icon-phone {
  background: rgba(16, 185, 129, 0.08);
}

.contact-info-chip .chip-text {
  display: flex;
  flex-direction: column;
}

.contact-info-chip .chip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-info-chip .chip-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ── RIGHT COLUMN: CALENDLY ── */
.contact-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendly-embed-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendly-embed-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.calendly-embed-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.calendly-embed-header p {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}

/* ── OR DIVIDER ── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.or-divider span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── HERO SCHEDULE BUTTON ── */
.btn-schedule {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 14px 28px;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-schedule::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
  border-radius: 32px;
}

.btn-schedule:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.btn-schedule:hover::before {
  transform: scaleX(1);
}

.btn-schedule-icon {
  display: inline-flex;
  transition: transform 0.3s ease;
}

.btn-schedule:hover .btn-schedule-icon {
  transform: rotate(15deg);
}

/* ── NAV "BOOK A CALL" BUTTON ── */
.btn-nav-calendly {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border: none;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-nav-calendly::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-nav-calendly:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-nav-calendly:hover::before {
  opacity: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .meeting-types-grid {
    grid-template-columns: 1fr 1fr;
  }

  .calendly-inline-wrapper {
    min-height: 600px;
  }

  .calendly-inline-wrapper .calendly-inline-widget {
    height: 600px;
  }

  .calendly-modal {
    width: 95vw;
    max-width: 800px;
    height: 80vh;
  }
}

@media (max-width: 768px) {
  .btn-nav-calendly {
    display: none;
  }

  .contact-section-enhanced {
    padding: 60px 0;
  }

  .contact-enhanced-header {
    margin-bottom: 40px;
  }

  .meeting-types-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-bar {
    flex-direction: column;
  }

  .contact-info-chip {
    min-width: unset;
  }

  .calendly-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .calendly-modal-close {
    top: 12px;
    right: 12px;
  }

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

  .calendly-inline-wrapper .calendly-inline-widget {
    height: 560px;
  }

  .booking-confirmation {
    padding: 36px 28px;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions .btn-primary,
  .confirm-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .booking-confirmation h3 {
    font-size: 20px;
  }

  .calendly-inline-wrapper {
    min-height: 500px;
  }

  .calendly-inline-wrapper .calendly-inline-widget {
    height: 500px;
  }
}