/* DEFAULT: Allow Google ad container to size normally */
div[id^="google_ads_iframe_"] {
    min-height: 0 !important;
    height: auto !important;
}

/* HIDE when the ad is EMPTY (no iframe inside) */
div[id^="google_ads_iframe_"]:not(:has(iframe)) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* HIDE when iframe exists but Google returns NO-FILL (collapsed iframe) */
div[id^="google_ads_iframe_"]:has(iframe[style*="height: 0"]) {
    display: none !important;
}

/* Advanced Ads wrapper: hide only if no ad in it */
.advads-content:not(:has(ins.adsbygoogle)) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.ad-container:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.adsbygoogle:empty {
    display:none !important;
}
.adsbygoogle {
    display: block !important;
}

.adsbygoogle:empty,
.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
    height: 0 !important;
}

ins.adsbygoogle {
    display: block !important;
}

ins.adsbygoogle:empty {
    display: none !important;
}
[id^="advads-"]:not(:has(ins.adsbygoogle)) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.advads-ad-wrapper:empty {
    display: none !important;
    height: 0;
    padding: 0;
    margin: 0;
}
.advads-ad-wrapper:not(:has(ins.adsbygoogle)) {
    display:none !important;
}
.rb-ad:empty,
.widget-ads:empty,
.single-ads:empty,
.header-ads:empty {
    display: none !important;
}
.rb-ad:not(:has(ins.adsbygoogle)) {
    display:none !important;
}
.elementor-widget-html:empty,
.elementor-widget-shortcode:empty {
    display:none !important;
}
.elementor-widget-html:empty {
    padding:0 !important;
    margin:0 !important;
}
