/* === Fondo del pop-up ================================================ */
.ac_download_pop_up_bg {
    position: fixed;
    inset: 0; /* top/right/bottom/left: 0 */
    width: 100%;
    height: 100%;
    display: none;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);

    /* Solo usamos el scroll del modal, el fondo NO scrollea */
    overflow: hidden;
    padding: 20px 10px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.ac_download_pop_up_bg.opened {
    display: flex;
}

.ac_download_pop_up_bg p.email-storage-message {
    font-size: 12px !important;
    line-height: normal !important;
    margin: 10px !important;
}

/* Cuando el modal está abierto, bloqueamos scroll en body */
body.ac-download-modal-open {
    overflow: hidden;
}

/* === Contenido del pop-up ============================================ */
.ac_download_pop_up {
    background-color: #ffffff;
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 8px;
    text-align: left;

    /* Aquí está la ÚNICA barra de scroll */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

/* Botón de cierre */
.ac_download_pop_up .pop-up-close {
    position: absolute;
    top: 12px;
    right: 12px;
    float: none;
    margin-left: 0;
    color: #000;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
}

/* Título */
.ac_download_pop_up h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    line-height: 1.3;
}

/* Texto introductorio */
.ac_download_innerform > p:first-child {
    margin-top: 0;
    margin-bottom: 15px;
}

/* === Formulario ====================================================== */
.ac_download_form {
    margin-top: 10px;
}

.ac_download_form input[type="text"],
.ac_download_form input[type="email"],
.ac_download_form input[type="password"],
.ac_download_form select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.ac_download_form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #e30613; /* rojo SPRI aprox */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}

.ac_download_form button[type="submit"].is-loading {
    cursor: wait;
    opacity: 0.85;
}

.ac_download_form button[type="submit"].is-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    animation: doc_download_btn_spin 0.8s linear infinite;
    vertical-align: middle;
}

.ac_download_form button[type="submit"]:hover {
    background-color: #b9040f;
}

/* Checkbox de privacidad / updates */
.ac_download_form .form_cb {
    margin: 10px 0;
    font-size: 13px;
    text-align: left;
}

.ac_download_form .form_cb input[type="checkbox"] {
    margin-right: 6px;
}

/* reCAPTCHA centrado */
.doc_download_recaptcha_wrapper {
    margin: 15px 0;
    text-align: center;
}

/* === Mensaje de respuesta ============================================ */
.ac_download_response {
    margin-top: 20px;
    font-size: 14px;
    color: #333;
}

@keyframes doc_download_btn_spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enlace de descarga opcional */
.btn-download1 {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.btn-download1:hover {
    background-color: #005177;
}

/* === Responsive ====================================================== */

/* Móvil */
@media (max-width: 768px) {
    .ac_download_pop_up_bg {
        padding: 0px !important;
        margin: 0px !important;
    }
    .ac_download_pop_up {
        padding: 40px 15px;
        max-height: calc(100vh - 30px);
    }

    .ac_download_pop_up h3 {
        font-size: 18px;
    }

    .ac_download_form input[type="text"],
    .ac_download_form input[type="email"],
    .ac_download_form input[type="password"],
    .ac_download_form select {
        font-size: 13px;
        padding: 8px 10px;
    }

    .ac_download_form button[type="submit"] {
        font-size: 14px;
        padding: 10px;
    }

    .ac_download_form .form_cb {
        font-size: 12px;
    }
}

/* Escritorio ancho */
@media (min-width: 1024px) {
    .ac_download_pop_up {
        max-width: 640px;
        padding: 32px 36px;
        max-height: calc(100vh - 80px);
    }
}
