/* =========================================
   Diagnostic 360 — Calendar Section
   Depende de: site-styles.css
   ========================================= */

#calendar {

  & .calendar__container {
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
    border-radius: 20px;
    border: none;
    outline: none;
    overflow: hidden;
    min-height: 280px;

    /* ---- Estado bloqueado ---- */
    & .calendar__locked {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 16px;
      padding: 64px 40px;
      text-align: center;
      min-height: 280px;
      border: 2px dashed var(--stb-border-gray);
      border-radius: 20px;
      background-color: #ffffff;
      transition: opacity 0.3s ease;

      &.is-hidden {
        display: none;
      }

      & .calendar__lock-icon {
        color: var(--stb-border-gray);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        height: 64px;
        border-radius: 50%;
        background-color: #f5f5f5;

        svg {
          width: 32px;
          height: 32px;
          stroke: var(--stb-border-gray);
          fill: none;
        }
      }

      h2 {
        color: var(--stb-gray);
        font-size: clamp(1.4rem, 2vw, 1.75rem);
        font-weight: 700;
      }

      p {
        font-size: 0.95rem;
        color: var(--stb-border-gray);
        line-height: 1.6;
      }
    }

    /* ---- Estado desbloqueado ---- */
    & .calendar__unlocked {
      display: none;
      flex-direction: column;
      gap: 24px;
      padding: 48px 40px 40px;
      background-color: #ffffff;
      border-radius: 20px;
      box-shadow: 0 8px 48px rgba(0, 0, 0, 0.08);
      opacity: 0;
      transform: translateY(16px);
      transition: opacity 0.4s ease, transform 0.4s ease;

      &.is-visible {
        display: flex;
        opacity: 1;
        transform: translateY(0);
      }

      & .calendar__header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;

        h2 {
          font-size: clamp(1.5rem, 2vw, 1.875rem);
          font-weight: 700;
          color: var(--stb-dark-gray);
        }

        p {
          font-size: 0.95rem;
          color: var(--stb-gray);
        }
      }

      & .calendar__step-badge {
        display: inline-block;
        background: var(--stb-gradient-pink-to-yellow-orange);
        color: #ffffff;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        padding: 4px 14px;
        border-radius: 20px;
      }

      /*
       * Calendly inyecta un iframe con height fija pequeña (~630px).
       * Al forzar height en el iframe se elimina el scroll interno.
       * 1050px cubre el flujo completo (selector de fecha + hora + confirmación).
       * Si tu evento tiene pasos extra (preguntas, etc.) sube este valor.
       */
      & .calendly-embed {
        width: 100%;
        border-radius: 12px;

        & iframe {
          display: block;
          width: 100% !important;
          height: 850px;
          border: none;
        }
      }
    }
  }
}