/**
 * Advanced Ads System Styles - أنماط نظام الإعلانات المتطور
 * @package Lahzat_News
 * @version 1.0
 */

/* ===== الإعلانات العامة ===== */
.nl7za-ad {
    margin: 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.nl7za-ad:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nl7za-ad::before,
.nl7za-ad::after {
    display: none;
}

/* ===== مواقع الإعلانات المختلفة ===== */

/* أعلى الهيدر */
.nl7za-ad-header-top {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* إخفاء النصوص التجريبية عندما يكون الإعلان مفعل */
.nl7za-ad-header-top:not(:empty)::before,
.nl7za-ad-header-top:not(:empty)::after {
    display: none !important;
}


/* أسفل الهيدر - تم تحديثه أعلاه */

/* أعلى المحتوى */
.nl7za-ad-content-top {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* وسط المحتوى */
.nl7za-ad-content-middle {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* أسفل المحتوى */
.nl7za-ad-content-bottom {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* الشريط الجانبي */
.nl7za-ad-sidebar-top,
.nl7za-ad-sidebar-middle,
.nl7za-ad-sidebar-bottom {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* بين أقسام الصفحة الرئيسية */
.nl7za-ad-homepage-between-sections {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* أعلى الفوتر */
.nl7za-ad-footer-top {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* ===== الإعلان اللاصق للموبايل ===== */
.nl7za-ad-mobile-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0;
    text-align: center;
    display: none;
}


/* ===== النافذة المنبثقة ===== */
.nl7za-ad-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}



/* ===== AdSense ===== */
.adsbygoogle {
    display: block !important;
    margin: 0 auto;
    text-align: center;
}

.adsbygoogle[data-ad-status="unfilled"] {
    display: none;
}


/* ===== الإعلانات الطبيعية ===== */
.nl7za-ad {
    display: block;
    margin: 20px auto;
    text-align: center;
}

/* مربع محجوز للإعلانات */
.nl7za-ad-header-bottom {
    margin: 0;
    padding: 0;
    display: block;
    text-align: center;
    position: relative;
    width: 100%;
}


/* إخفاء النصوص التجريبية عندما يكون الإعلان مفعل */
.nl7za-ad-header-bottom:not(:empty)::before,
.nl7za-ad-header-bottom:not(:empty)::after {
    display: none !important;
}


/* تحسين إعلان أسفل الهيدر */

/* ضمان ظهور الإعلان */
.nl7za-ad-header-bottom * {
    max-width: none !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

/* إخفاء النصوص التجريبية لجميع الإعلانات عندما تكون مفعلة */
.nl7za-ad:not(:empty)::before,
.nl7za-ad:not(:empty)::after {
    display: none !important;
}

/* إزالة الخلفيات الملونة من جميع الإعلانات */
.nl7za-ad {
    background: transparent !important;
    color: inherit !important;
}

/* إزالة جميع الخلفيات الملونة من مواقع الإعلانات */
.nl7za-ad-header-top,
.nl7za-ad-header-bottom,
.nl7za-ad-content-top,
.nl7za-ad-content-middle,
.nl7za-ad-content-bottom,
.nl7za-ad-sidebar-top,
.nl7za-ad-sidebar-middle,
.nl7za-ad-sidebar-bottom,
.nl7za-ad-homepage-between-sections,
.nl7za-ad-footer-top,
.nl7za-ad-mobile-sticky,
.nl7za-ad-popup-overlay {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
    box-shadow: none !important;
}

/* إزالة جميع النصوص التجريبية */
.nl7za-ad *::before,
.nl7za-ad *::after {
    display: none !important;
}


/* على الموبايل */
@media (max-width: 768px) {
    .nl7za-ad-header-bottom {
        margin: 15px 10px;
        padding: 10px;
        min-height: 70px;
    }
    
    .nl7za-ad-header-bottom:empty::before {
        font-size: 12px;
    }
    
    .nl7za-ad-header-bottom:empty::after {
        font-size: 20px;
        margin-top: 5px;
    }
    
    /* إزالة جميع النصوص التجريبية على الموبايل */
    .nl7za-ad:not(:empty)::before,
    .nl7za-ad:not(:empty)::after {
        display: none !important;
    }
    
    /* إزالة الخلفيات الملونة على الموبايل */
    .nl7za-ad {
        background: transparent !important;
        color: inherit !important;
    }
}

/* ===== الإعلانات المخصصة ===== */
.custom-ad-wrapper {
    display: block;
    margin: 0 auto;
    text-align: center;
}

.custom-ad-wrapper:empty {
    display: none;
}

/* الإعلانات المخصصة تعمل بشكل طبيعي */

/* AdSense طبيعي */
.adsbygoogle {
    display: block;
    margin: 0 auto;
    text-align: center;
}

/* الإعلانات تعمل بشكل طبيعي على جميع الأجهزة */

/* تحسينات AdSense */

.nl7za-ad-header-top,
.nl7za-ad-header-bottom {
    margin: 15px 0;
}

.nl7za-ad-content-top,
.nl7za-ad-content-bottom {
    margin: 25px 0;
}

.nl7za-ad-content-middle {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.nl7za-ad-sidebar-top {
    margin: 20px 0;
}

.nl7za-ad-homepage-between-sections {
    margin: 40px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.nl7za-ad-mobile-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nl7za-ad-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nl7za-ad-popup-overlay .adsbygoogle {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
}

/* ===== إعلانات المحتوى ===== */
.content-ad-middle {
    display: none;
}

/* ===== إعلانات الشريط الجانبي ===== */
.sidebar-ad-top {
    margin-bottom: 20px;
}

/* ===== إعلانات بين الأقسام ===== */
.between-sections-ad {
    margin: 40px 0;
    text-align: center;
}


/* ===== التحكم في عرض الإعلانات حسب الجهاز ===== */
.nl7za-ad[data-device="desktop"] {
    display: none;
}

.nl7za-ad[data-device="mobile"] {
    display: none;
}

.nl7za-ad[data-device="all"] {
    display: block;
}

/* ===== التصميم المتجاوب ===== */
@media (max-width: 768px) {
    .nl7za-ad {
        margin: 15px 0;
        padding: 10px;
    }
    
    .nl7za-ad-header_top,
    .nl7za-ad-header_bottom,
    .nl7za-ad-content_top,
    .nl7za-ad-content_bottom,
    .nl7za-ad-footer_top {
        padding: 10px;
    }
    
    .nl7za-ad-content_middle {
        padding: 15px;
        margin: 20px 0;
    }
    
    .nl7za-ad-homepage_between_sections {
        padding: 15px;
        margin: 20px 0;
    }
    
    /* إظهار الإعلان اللاصق للموبايل */
    .nl7za-ad-mobile_sticky {
        display: block;
    }
    
    /* إخفاء الإعلانات الكبيرة في الموبايل */
    .nl7za-ad::after {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    /* تحسينات AdSense للموبايل */
    .adsbygoogle {
        min-height: 50px;
        padding: 5px;
    }
    
    .adsbygoogle[data-ad-status="unfilled"] {
        font-size: 12px;
    }
    
    /* التحكم في عرض الإعلانات للموبايل */
    .nl7za-ad[data-device="desktop"] {
        display: none !important;
    }
    
    .nl7za-ad[data-device="mobile"] {
        display: block !important;
    }
    
    .nl7za-ad[data-device="all"] {
        display: block !important;
    }
}

@media (min-width: 769px) {
    /* التحكم في عرض الإعلانات للكمبيوتر */
    .nl7za-ad[data-device="desktop"] {
        display: block !important;
    }
    
    .nl7za-ad[data-device="mobile"] {
        display: none !important;
    }
    
    .nl7za-ad[data-device="all"] {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .nl7za-ad {
        margin: 10px 0;
        padding: 8px;
    }
    
    .nl7za-ad::after {
        font-size: 7px;
        padding: 1px 3px;
        top: 5px;
        right: 5px;
    }
    
    .popup-content {
        padding: 15px;
        margin: 10px;
    }
    
    /* تحسينات AdSense للموبايل */
    .adsbygoogle {
        min-height: 50px;
        padding: 3px;
    }
    
    .adsbygoogle[data-ad-status="unfilled"] {
        font-size: 12px;
    }
}

/* ===== تأثيرات التحميل ===== */
.nl7za-ad[data-ad-loaded="false"] {
    opacity: 0.7;
    background: #f8f9fa;
}

.nl7za-ad[data-ad-loaded="true"] {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* ===== رسائل AdBlocker ===== */
.adblocker-message {
    display: none;
}

.adblocker-message h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.adblocker-message p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* ===== إحصائيات الإعلانات ===== */
.ads-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.ads-stats h4 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 16px;
}

.ads-stats .stat-item {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 14px;
}

.ads-stats .stat-value {
    font-weight: 600;
    color: #28a745;
}

/* ===== تحسينات الأداء ===== */
.nl7za-ad.lazy-loading {
    min-height: 200px;
    display: none;
}


/* ===== إخفاء الإعلانات في وضع التطوير ===== */
.wp-admin .nl7za-ad,
.debug-mode .nl7za-ad {
    display: none !important;
}
