/**
 * حظر الإعلانات داخل iframe بواسطة CSS
 * يتم تطبيقه على المستوى العام
 */

/* إخفاء جميع أنواع الإعلانات الشائعة */
[class*="ad-"],
[class*="ads-"],
[class*="adv-"],
[id*="ad-"],
[id*="ads-"],
[id*="adv-"],
.advertisement,
.adsbox,
.ad_container,
.ads_container,
.banner-ad,
.ad-banner,
.google-ad,
.adsbygoogle,
ins.adsbygoogle,
.ad-placement,
.ad-slot,
.commercial,
.sponsored,
.sponsor,
.popup-ad,
.overlay-ad,
[data-ad],
[data-ads] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* إخفاء iframe الإعلانية */
iframe[src*="doubleclick"],
iframe[src*="googlesyndication"],
iframe[src*="googleadservices"],
iframe[src*="advertising"],
iframe[src*="adserver"],
iframe[src*="/ads/"],
iframe[src*="ad."],
iframe[src*="ads."],
iframe[id*="google_ads"],
iframe[id*="aswift"],
iframe[class*="ad-"],
iframe[class*="ads-"] {
    display: none !important;
    visibility: hidden !important;
}

/* حظر العناصر ذات z-index عالي (overlays) */
div[style*="z-index: 999"],
div[style*="z-index: 9999"],
div[style*="z-index:999"],
div[style*="z-index:9999"],
div[style*="position: fixed"][style*="top: 0"][style*="left: 0"] {
    display: none !important;
}

/* إخفاء popups مشبوهة */
div[style*="position: fixed"],
div[style*="position: absolute"] {
    /* فقط إذا كانت تغطي الشاشة كاملة */
}

div[style*="position: fixed"][style*="width: 100%"][style*="height: 100%"] {
    pointer-events: none !important;
}

/* منع video overlays الإعلانية */
video + div[style*="position: absolute"],
video ~ div[class*="overlay"] {
    display: none !important;
}

/* حظر buttons الإعلانية */
button[onclick*="window.open"],
a[onclick*="window.open"],
div[onclick*="window.open"] {
    pointer-events: none !important;
    opacity: 0 !important;
}

/* إخفاء countdown timers للإعلانات */
[class*="countdown"],
[id*="countdown"],
[class*="skip-ad"],
[id*="skip-ad"] {
    display: none !important;
}

/* منع pre-roll ads */
[class*="preroll"],
[id*="preroll"],
[class*="pre-roll"],
[id*="pre-roll"] {
    display: none !important;
}
