/* OMT Ads — Frontend Styles */

.omt-ad {
    width: 100%;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    line-height: 0;
}

.omt-ad a {
    display: block;
    line-height: 0;
}

.omt-ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* Slider */
.omt-ad--slider {
    position: relative;
}

.omt-ad__slides {
    position: relative;
    width: 100%;
}

.omt-ad__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.omt-ad__slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* Dots */
.omt-ad__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.omt-ad__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.omt-ad__dot.is-active {
    background: #fff;
}

/* Sidebar specific */
.omt-ad--sidebar {
    margin: 1rem 0;
}

/* Content specific (in-article) */
.omt-ad--content {
    margin: 2rem auto;
}

/* Section specific (full width in content area) */
.omt-ad--section {
    margin: 1.5rem 0;
    width: 100%;
}

.omt-ad-fullwidth {
    width: 100%;
    margin-bottom: 2rem;
}

.omt-ad-fullwidth .omt-ad {
    margin-top: 0;
    margin-bottom: 0;
    /* margin-left/right deliberadamente não zerados:
       anúncios com formato fixo (ex: topo 970px) usam
       margin-left:auto + margin-right:auto para centralizar */
}

/* Responsive */
@media (max-width: 768px) {
    .omt-ad {
        border-radius: 0;
        margin: 1rem 0;
    }
}

/* ============================================
   Formatos com dimensões exatas (mídia kit)
   — Wrapper com px fixos; imagem preenche
     todo o espaço como canvas (object-fit: cover)
   ============================================ */

/* Propagação de altura para sliders dentro de formatos dimensionados.
   Garante que .omt-ad__slides e .omt-ad__slide herdem a altura do
   wrapper fixo, para que a imagem interna resolva height:100% corretamente. */
.omt-ad--topo .omt-ad__slides,
.omt-ad--super .omt-ad__slides,
.omt-ad--medio .omt-ad__slides,
.omt-ad--rect-800 .omt-ad__slides,
.omt-ad--rect-600 .omt-ad__slides {
    height: 100%;
}

.omt-ad--topo .omt-ad__slide,
.omt-ad--super .omt-ad__slide,
.omt-ad--medio .omt-ad__slide,
.omt-ad--rect-800 .omt-ad__slide,
.omt-ad--rect-600 .omt-ad__slide {
    height: 100%;
}

/* Topo — 970×90px */
.omt-ad--topo {
    width: 970px;
    height: 90px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.omt-ad--topo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Super Banner — 728×90px */
.omt-ad--super {
    width: 728px;
    height: 90px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.omt-ad--super img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Médio Banner — 670×90px */
.omt-ad--medio {
    width: 670px;
    height: 90px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.omt-ad--medio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Retângulo sidebar — 300×800px */
.omt-ad--rect-800 {
    width: 300px;
    height: 800px;
    max-width: 100%;
}
.omt-ad--rect-800 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Retângulo sidebar — 300×600px */
.omt-ad--rect-600 {
    width: 300px;
    height: 600px;
    max-width: 100%;
}
.omt-ad--rect-600 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Pop-ups
   ============================================ */

.omt-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.omt-popup__box {
    position: relative;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.omt-popup--600x600 .omt-popup__box {
    width: 600px;
    height: 600px;
    max-width: 95vw;
    max-height: 95vh;
}

.omt-popup--600x400 .omt-popup__box {
    width: 600px;
    height: 400px;
    max-width: 95vw;
    max-height: 95vh;
}

.omt-popup__box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.omt-popup__box a {
    display: block;
    line-height: 0;
    width: 100%;
    height: 100%;
}

.omt-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    z-index: 2;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.omt-popup__close:hover {
    background: rgba(0, 0, 0, 0.85);
}

@media (max-width: 640px) {
    .omt-popup--600x600 .omt-popup__box,
    .omt-popup--600x400 .omt-popup__box {
        width: 95vw;
        height: auto;
        aspect-ratio: auto;
    }
    .omt-popup--600x600 .omt-popup__box {
        aspect-ratio: 1 / 1;
    }
    .omt-popup--600x400 .omt-popup__box {
        aspect-ratio: 3 / 2;
    }
}
