/* Popup de Calendly (adaptado de react-calendly / widget.css de Calendly) */

.calendly-abierto { overflow: hidden; }

.calendly-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background-color: rgba(58, 24, 56, 0.55);
}

.calendly-close-overlay {
  position: absolute;
  inset: 0;
}

.calendly-popup {
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  min-width: 900px;
  max-width: 1000px;
  height: 90%;
  max-height: 680px;
  border-radius: 24px;
  overflow: hidden;
  background-color: #FFF7F9;
  box-shadow: 0 24px 60px rgba(58, 24, 56, 0.35);
}

.calendly-popup-content {
  position: relative;
  height: 100%;
}

.calendly-popup-content iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.calendly-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background-color: #FFF7F9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A1838' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
}

.calendly-popup-close:focus-visible {
  outline: 3px solid #FF94FE;
  outline-offset: 2px;
}

@media (max-width: 975px) {
  .calendly-popup {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    height: auto;
    min-width: 0;
    max-height: none;
    border-radius: 24px 24px 0 0;
  }
  .calendly-popup-close {
    top: 10px;
    right: 12px;
  }
}

.calendly-spinner {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
}

.calendly-spinner > div {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0 3px;
  border-radius: 50%;
  background-color: #F78A8A;
  animation: calendly-bouncedelay 1.4s infinite ease-in-out both;
}

.calendly-spinner .calendly-bounce1 { animation-delay: -0.32s; }
.calendly-spinner .calendly-bounce2 { animation-delay: -0.16s; }

@keyframes calendly-bouncedelay {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .calendly-spinner > div { animation: none; }
}
