/**
 * PPNV2 Ads Manager — Estilos Públicos
 * Controla visibilidade responsiva dos slots e o banner adesivo mobile.
 *
 * @package PPNV2_Ads_Manager
 * @version 2.1.0
 */

/* =============================================================
   1. UTILITÁRIOS DE VISIBILIDADE (Device Targeting)
   Aplicados via PHP na função ppnv2_ad_slot().
   Cache-safe: a decisão de exibir é feita pelo navegador do cliente.
   ============================================================= */

/* Oculta no mobile (< 768px): sidebars, etc. */
.ppnv2-ad-desktop-only {
    display: block;
}
@media (max-width: 767px) {
    .ppnv2-ad-desktop-only {
        display: none !important;
    }
}

/* Oculta no desktop (>= 768px): anchor-mobile, etc. */
.ppnv2-ad-mobile-only {
    display: none;
}
@media (max-width: 767px) {
    .ppnv2-ad-mobile-only {
        display: block;
    }
}

/* Evita que o banner de rodapé mobile empurre o conteúdo */
@media (max-width: 767px) {
    body.ppnv2-has-anchor-ad {
        padding-bottom: 70px;
    }
}

/* =============================================================
   2. BANNER ADESIVO DE RODAPÉ (Anchor Mobile)
   Slot `anchor-mobile` — visível apenas em celulares.
   ============================================================= */
.ppnv2-ad-anchor-wrapper {
    display: none; /* hidden por padrão, ativado pelo media query */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    padding: 4px 0;
    /* Garante que o botão fechar fique dentro do fluxo */
    padding-top: 20px;
}

@media (max-width: 767px) {
    .ppnv2-ad-anchor-wrapper {
        display: block;
    }
}

/* Botão de fechar */
.ppnv2-ad-anchor-close {
    position: absolute;
    top: 0;
    right: 8px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    border-radius: 0 0 4px 4px;
    cursor: pointer;
    border: none;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.ppnv2-ad-anchor-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Conteúdo do banner adesivo */
.ppnv2-ad-anchor-wrapper .ppnv2-ad-slot-wrapper {
    max-width: 320px;
    margin: 0 auto;
}

/* =============================================================
   3. ESTILOS GERAIS DOS WRAPPERS DE ANÚNCIO
   ============================================================= */
.ppnv2-ad-slot-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Carrossel: garante que o slot não quebre o layout */
.ppnv2-ad-slot-wrapper.swiper {
    overflow: hidden;
}
