/* =========================================================
   IPCO — BANNERS LATERAIS LAZY-LOADED
   ========================================================= */

.widget_ipco_sidebar_promotion,
.widget_ipco_sidebar_promotion * {
    box-sizing: border-box;
}

.widget_ipco_sidebar_promotion {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.ipco-sidebar-promotion-slot {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: var(--ipco-sidebar-placeholder-height, 380px);
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
    isolation: isolate;
    contain: layout paint;
    transform: translateZ(0);
    transition: min-height .25s ease, opacity .2s ease;
}

.ipco-sidebar-promotion-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: inherit;
    background: #e8ebee;
    opacity: 1;
    transition: opacity .22s ease;
}

.ipco-sidebar-promotion-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgba(255,255,255,0) 20%,
        rgba(255,255,255,.42) 48%,
        rgba(255,255,255,0) 76%
    );
    transform: translateX(-100%);
    animation: ipco-sidebar-promotion-shimmer 1.6s ease-in-out infinite;
}

@keyframes ipco-sidebar-promotion-shimmer {
    to { transform: translateX(100%); }
}

.ipco-sidebar-promotion-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

/*
 * O banner pode conter CSS próprio, inclusive regras pensadas para full-width.
 * Estas regras externas são deliberadamente fortes para impedir que ele ultrapasse
 * a largura real da barra lateral.
 */
.ipco-sidebar-promotion-content > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.ipco-sidebar-promotion-content img,
.ipco-sidebar-promotion-content video,
.ipco-sidebar-promotion-content iframe,
.ipco-sidebar-promotion-content svg,
.ipco-sidebar-promotion-content canvas,
.ipco-sidebar-promotion-content picture {
    max-width: 100% !important;
}

.ipco-sidebar-promotion-content img,
.ipco-sidebar-promotion-content video {
    height: auto;
}

.ipco-sidebar-promotion-content iframe {
    width: 100% !important;
    border: 0;
}

.ipco-sidebar-promotion-slot.is-loaded {
    min-height: 0;
    contain: layout paint style;
}

.ipco-sidebar-promotion-slot.is-loaded .ipco-sidebar-promotion-placeholder {
    opacity: 0;
    pointer-events: none;
}

.ipco-sidebar-promotion-slot.is-loaded .ipco-sidebar-promotion-content {
    display: block;
}

.ipco-sidebar-promotion-slot.is-error {
    min-height: 0;
    height: 0;
    opacity: 0;
}

@media (max-width: 767px) {
    .ipco-sidebar-promotion-slot {
        border-radius: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ipco-sidebar-promotion-placeholder::after {
        animation: none;
        display: none;
    }

    .ipco-sidebar-promotion-slot,
    .ipco-sidebar-promotion-placeholder {
        transition: none;
    }
}
