.criativa-pub-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.criativa-pub-container a {
    display: block;
    width: 100%;
    text-align: center;
}

.criativa-pub-responsive-media {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

iframe.criativa-pub-responsive-media {
    aspect-ratio: 16/9;
    border: none;
}

/* Espaço reservado enquanto o JS sorteia/monta o banner (evita CLS) */
.criativa-pub-rotator,
.criativa-pub-slider {
    width: 100%;
    position: relative;
}

.criativa-pub-rotator { min-height: 50px; }
.criativa-pub-rotator > .criativa-pub-container { height: 100%; }

/* Fachada do YouTube */
.criativa-pub-yt {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.criativa-pub-yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.criativa-pub-yt::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    background: rgba(0, 173, 242, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 60% no-repeat;
}

/* Slider nativo (scroll-snap) */
.criativa-pub-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    height: 100%;
}
.criativa-pub-track::-webkit-scrollbar { display: none; }
.criativa-pub-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}
.criativa-pub-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}
.criativa-pub-dots button {
    pointer-events: auto;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
    cursor: pointer;
}
.criativa-pub-dots button[aria-current="true"] { background: #00adf2; }

/* Exibição responsiva (checkboxes de dispositivos) */
@media (min-width: 1025px) {
    .criativa-pub-hide-desktop { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .criativa-pub-hide-tablet { display: none !important; }
}

@media (max-width: 767px) {
    .criativa-pub-hide-mobile { display: none !important; }
}

.criativa-pub-expired { display: none !important; }

/* --- MODO POPUP --- */
.criativa-pub-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.criativa-pub-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.criativa-pub-popup-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: visible;
}

.criativa-pub-popup-overlay.active .criativa-pub-popup-content {
    transform: scale(1);
}

.criativa-pub-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000001;
    border: none;
    transition: transform 0.2s ease;
}

.criativa-pub-popup-close:hover {
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .criativa-pub-popup-content { width: 95%; }
    .criativa-pub-popup-close { top: 10px; right: 10px; }
}

/* --- MODO STICKY (faixa fixa no rodapé) --- */
.criativa-pub-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
    max-height: 28vh;
    display: flex;
    justify-content: center;
}
.criativa-pub-sticky .criativa-pub-rotator,
.criativa-pub-sticky .criativa-pub-container { max-width: 1290px; max-height: 28vh; }
.criativa-pub-sticky .criativa-pub-responsive-media { max-height: 28vh; width: auto; max-width: 100%; margin: 0 auto; }
.criativa-pub-sticky-close {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* Reserva espaço no fim da página enquanto a faixa fixa estiver aberta */
body:has(.criativa-pub-sticky){padding-bottom:min(28vh,130px)}
