/* =================== OVERLAY PRE-INSCRIPCION · AYG Clab =================== */
/* Overlay "estamos preparando la próxima sesión" con captura de email.       */
/* Estilos aislados para que se puedan eliminar cuando se desactive el aviso. */
/* ========================================================================== */

.overlay-preinscripcion {
    position: fixed;
    inset: 0;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    font-family: "Montserrat", sans-serif;
}

.overlay-preinscripcion__inner {
    width: 100%;
    max-width: 520px;
    text-align: center;
    color: #ffffff;
    padding: 32px 16px;
}

.overlay-preinscripcion__logo {
    display: block;
    margin: 0 auto 36px;
    max-width: 220px;
    height: auto;
    filter: brightness(0) invert(1);
    -webkit-filter: brightness(0) invert(1);
}

.overlay-preinscripcion__mensaje {
    font-family: "Domine", serif;
    font-size: 1.15em;
    line-height: 1.45em;
    color: #ffffff;
    margin: 0 0 32px;
    text-wrap: balance;
}

.overlay-preinscripcion__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 auto;
}

.overlay-preinscripcion__field input[type="text"],
.overlay-preinscripcion__field input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-size: 1em;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.overlay-preinscripcion__field input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.overlay-preinscripcion__field input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
}

.overlay-preinscripcion__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.overlay-preinscripcion__submit-wrap {
    margin-top: 8px;
}

.overlay-preinscripcion__submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 13px 32px;
    background: #6d96aa;
    border: 1px solid #6d96aa;
    border-radius: 4px;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
}

.overlay-preinscripcion__submit:hover {
    background: #5a8294;
    border-color: #5a8294;
}

.overlay-preinscripcion__submit:disabled,
.overlay-preinscripcion__submit.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.overlay-preinscripcion__submit .overlay-preinscripcion__spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    -webkit-animation: overlay-preinsc-spin 0.7s linear infinite;
    animation: overlay-preinsc-spin 0.7s linear infinite;
}

.overlay-preinscripcion__submit.is-loading .overlay-preinscripcion__spinner {
    display: inline-block;
}

@-webkit-keyframes overlay-preinsc-spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes overlay-preinsc-spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

.overlay-preinscripcion__error {
    display: none;
    margin: 12px 0 0;
    color: #ffb4b4;
    font-size: 0.9em;
    line-height: 1.35em;
}

.overlay-preinscripcion__success {
    display: none;
    margin-top: 16px;
    opacity: 0;
    -webkit-transition: opacity 400ms ease;
    transition: opacity 400ms ease;
}

.overlay-preinscripcion__success.is-visible {
    display: block;
    opacity: 1;
}

.overlay-preinscripcion__success-text {
    font-family: "Domine", serif;
    font-size: 1.1em;
    line-height: 1.5em;
    color: #ffffff;
    margin: 0;
}

/* Móvil */
@media (max-width: 600px) {
    .overlay-preinscripcion {
        padding: 16px;
    }
    .overlay-preinscripcion__inner {
        padding: 16px 4px;
    }
    .overlay-preinscripcion__logo {
        max-width: 170px;
        margin-bottom: 24px;
    }
    .overlay-preinscripcion__mensaje {
        font-size: 1em;
        margin-bottom: 24px;
    }
    .overlay-preinscripcion__submit {
        width: 100%;
    }
}

/* Fallback navegadores sin backdrop-filter */
@supports not ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
    .overlay-preinscripcion {
        background: rgba(0, 0, 0, 0.88);
    }
}
