/* STEP176 — isolated, responsive Adsterra banner positions. */
.adsterra-slot {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 26px auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    contain: layout paint;
}

.adsterra-slot--home {
    clear: both;
}

.adsterra-slot--article {
    margin: 28px auto;
}

.adsterra-slot[data-adsterra-state="disabled"] {
    display: none;
    min-height: 0;
    margin: 0;
}

/* Do not show a large blank advert-shaped hole before the visitor has made a
   consent choice.  Space is reserved as soon as a real request starts. */
.adsterra-slot[data-adsterra-state="pending"],
.adsterra-slot[data-adsterra-state="error"] {
    display: none;
    min-height: 0;
    margin: 0;
}

.adsterra-slot[data-adsterra-size="desktop"] {
    min-height: 90px;
}

.adsterra-slot[data-adsterra-size="mobile"] {
    min-height: 250px;
}

.adsterra-slot iframe {
    display: block;
    flex: 0 0 auto;
    max-width: 100%;
    border: 0;
    background: transparent;
}

@media (min-width: 768px) {
    .adsterra-slot:not([data-adsterra-size]) {
        min-height: 90px;
    }
}

@media (max-width: 767px) {
    .adsterra-slot,
    .adsterra-slot--article,
    .adsterra-slot--home {
        min-height: 250px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

@media print {
    .adsterra-slot {
        display: none !important;
    }
}

/* STEP179: mobile breakpoint must not override the hidden consent/error states. */
@media (max-width: 767px) {
    .adsterra-slot[data-adsterra-state="disabled"],
    .adsterra-slot[data-adsterra-state="pending"],
    .adsterra-slot[data-adsterra-state="error"] {
        display: none;
        min-height: 0;
        margin: 0;
    }
}
