/* Campañas internas (adxs) — nombres neutrales para evitar bloqueadores */

.adxs-slot {
    display: block;
    margin: 1rem 0;
    text-align: center;
    line-height: 0;
}

.adxs-slot--inline {
    margin: 0 auto;
    max-width: 100%;
}

/* Embebida en notas — marco y etiqueta */
.adxs-inline-frame {
    clear: both;
    margin: 1.75rem 0;
    padding: .65rem .85rem .85rem;
    max-width: 100%;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 8px;
    background: var(--color-bg, #fafafa);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    text-align: center;
}

.article-content .adxs-inline-frame {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.adxs-inline-frame__label {
    display: block;
    margin-bottom: .6rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid var(--color-border, #e5e5e5);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text-muted, #888);
    line-height: 1.2;
}

.adxs-inline-frame .adxs-slot {
    margin: 0;
}

.adxs-slot--sidebar .adxs-media {
    max-width: 100%;
    height: auto;
}

.adxs-slot--portada {
    padding: 1rem 0;
}

.adxs-link {
    display: inline-block;
    max-width: 100%;
    text-decoration: none;
}

.adxs-media {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.adxs-media--mobile {
    display: none;
}

@media (max-width: 767px) {
    .adxs-media--desktop {
        display: none;
    }
    .adxs-media--mobile {
        display: block;
    }
    video.adxs-media--mobile {
        display: block;
    }
}

/* Sticky bottom (ancla) — respeta player radio y menú mobile */
:root {
    --adxs-sticky-bottom: 0px;
    --adxs-sticky-height: 90px;
}

@media (max-width: 768px) {
    :root {
        /* Misma referencia que body padding-bottom en mobile (menú inferior) */
        --adxs-sticky-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 769px) {
    body.has-radio-player {
        --adxs-sticky-bottom: 72px;
    }
    body.has-radio-player.has-live-program {
        --adxs-sticky-bottom: 80px;
    }
}

.adxs-sticky-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--adxs-sticky-bottom, 0px);
    z-index: 260;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    transition: bottom 0.2s ease;
}

.adxs-sticky-wrap .adxs-slot--sticky {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

.adxs-sticky-wrap .adxs-slot--sticky .adxs-link {
    display: block;
    width: 100%;
}

.adxs-sticky-wrap .adxs-slot--sticky .adxs-media {
    width: 100%;
    max-height: 90px;
    object-fit: contain;
}

.adxs-sticky-wrap .adxs-slot--sticky video.adxs-media {
    max-height: 90px;
    width: 100%;
    object-fit: contain;
}

.adxs-sticky-close {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease;
}

.adxs-sticky-close:hover {
    background: rgba(0, 0, 0, 0.75);
}

body.adxs-has-sticky {
    padding-bottom: calc(
        var(--adxs-sticky-bottom, 0px) + var(--adxs-sticky-height, 90px)
    ) !important;
}

/* Emergente */
.adxs-emergente-wrap {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 1rem;
}

.adxs-emergente-wrap[hidden] {
    display: none !important;
}

.adxs-emergente-wrap .adxs-slot {
    margin: 0;
    max-width: min(520px, 92vw);
}

.adxs-emergente-countdown {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.adxs-emergente-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.adxs-emergente-close[hidden],
.adxs-emergente-countdown[hidden] {
    display: none !important;
}
