/**
 * Aviso Emergente — frontend (capa superpuesta, no pop-up).
 */

.ae-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999; /* Respaldo; el valor definitivo va inline por aviso. */
    pointer-events: none; /* La capa completa no intercepta clics fuera del aviso. */
    opacity: 0;
    transition: opacity .3s ease;
}

.ae-overlay.ae-visible {
    opacity: 1;
}

/* Caja del aviso */
.ae-box {
    position: absolute;
    pointer-events: auto;
    max-width: 95vw;
    max-height: 90vh;
    overflow: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    padding: 24px;
    box-sizing: border-box;
}

/* Posiciones */
.ae-pos-center .ae-box {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.ae-pos-top .ae-box {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}
.ae-pos-bottom .ae-box {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}
.ae-pos-left .ae-box {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}
.ae-pos-right .ae-box {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}
.ae-pos-top-left .ae-box {
    top: 20px;
    left: 20px;
}
.ae-pos-top-right .ae-box {
    top: 20px;
    right: 20px;
}
.ae-pos-bottom-left .ae-box {
    bottom: 20px;
    left: 20px;
}
.ae-pos-bottom-right .ae-box {
    bottom: 20px;
    right: 20px;
}

/* Botón de cierre */
.ae-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 20px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}
.ae-close:hover {
    background: rgba(0, 0, 0, .8);
}

.ae-content {
    width: 100%;
    height: 100%;
}
.ae-content img {
    max-width: 100%;
    height: auto;
}

/* Enlace «No mostrar más» */
.ae-never {
    position: absolute;
    bottom: 6px;
    right: 10px;
    background: transparent;
    border: none;
    padding: 4px 6px;
    color: #999;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    z-index: 2;
}
.ae-never:hover {
    color: #ccc;
}

/* Multipágina: solo se muestra la página activa (la lógica va en el JS). */
.ae-content .aee-slider .aee-page {
    display: none;
}
.ae-content .aee-slider .aee-page.aee-active {
    display: block;
}

/* Responsive: en pantallas pequeñas el aviso ocupa casi todo el ancho. */
@media (max-width: 600px) {
    .ae-box {
        width: 92vw !important;
        max-width: 92vw;
    }
}
