/*
 * AI Publisher Theme - Ads CSS
 */

/* Contenedor principal de anuncios */
.ai-ad-slot {
    margin: 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 50px; /* Previene CLS agresivo */
    clear: both;
}

/* Etiqueta de publicidad */
.ai-ad-label {
    display: block;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

/* Control de visibilidad por dispositivo */
@media (max-width: 1023px) {
    .ai-desktop-only {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .ai-mobile-only {
        display: none !important;
    }
}

/* Anuncio Flotante Bottom en Móvil */
.ai-ad-mobile_sticky_bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Botón de cierre para sticky */
.ai-close-sticky {
    position: absolute;
    top: -30px;
    right: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50% 50% 0 0;
    border-bottom: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.ai-close-sticky:hover {
    background: #f4f4f4;
}

/* Vista previa para administradores (oculto por defecto a menos que se fuerce con una clase en admin o inspeccionador) */
.admin-bar .ai-ad-slot:empty {
    border: 1px dashed #ccc;
    background: #f9f9f9;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-bar .ai-ad-slot:empty::before {
    content: "Espacio para anuncio: " attr(class);
    font-size: 12px;
    color: #888;
}
