/**
 * Dark Mode Styles
 * 
 * أنماط الوضع الليلي للموقع
 * 
 * @package AuctionSystem
 * @version 1.0.0
 */

/* ===== متغيرات الوضع الليلي ===== */
:root {
    --dark-bg-primary: #1a1a1a;
    --dark-bg-secondary: #2d2d2d;
    --dark-text-primary: #ffffff;
    --dark-text-secondary: #cccccc;
    --dark-border: #404040;
    --dark-accent: #0073aa;
}

/* ===== أنماط الشعار - الوضع العادي هو الافتراضي ===== */

/* الوضع العادي (الافتراضي) - عرض الشعار الأصلي */
.site-logo img,
#mobile-header .site-logo img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.site-logo a,
#mobile-header .site-logo a {
    text-indent: 0 !important;
}

/* الوضع الليلي فقط - عرض شعار الوضع الليلي */
body.dark-mode .site-logo a,
body.dark-mode #mobile-header .site-logo a {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: block;
    text-indent: -9999px;
    overflow: hidden;
    width: 250px;
    height: 80px;
}

/* إخفاء الشعار الأصلي فقط في الوضع الليلي */
body.dark-mode .site-logo img,
body.dark-mode #mobile-header .site-logo img {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ===== حماية قوية للوضع العادي (الافتراضي) ===== */

/* التأكد من عدم ظهور أي background في الوضع العادي */
body:not(.dark-mode) .site-logo a,
body:not(.dark-mode) #mobile-header .site-logo a,
body:not(.dark-mode) .site-logo a::before,
body:not(.dark-mode) #mobile-header .site-logo a::before,
body:not(.dark-mode) .site-logo a::after,
body:not(.dark-mode) #mobile-header .site-logo a::after {
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    text-indent: 0 !important;
    display: inline !important;
}

/* التأكد من ظهور الشعار الأصلي في جميع الحالات العادية */
body:not(.dark-mode) .site-logo img,
body:not(.dark-mode) #mobile-header .site-logo img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
}

/* حماية إضافية ضد media queries */
@media (prefers-color-scheme: light) {
    body:not(.dark-mode) .site-logo a,
    body:not(.dark-mode) #mobile-header .site-logo a {
        background: none !important;
        background-image: none !important;
        text-indent: 0 !important;
    }
}

/* حماية ضد أي media query أخرى */
@media screen {
    body:not(.dark-mode) .site-logo a,
    body:not(.dark-mode) #mobile-header .site-logo a {
        background: none !important;
        background-image: none !important;
        text-indent: 0 !important;
    }
}

/* ===== أنماط عامة للوضع الليلي (اختيارية) ===== */

/* يمكن إضافة المزيد من الأنماط هنا لاحقاً */
/*
body.dark-mode {
    background-color: var(--dark-bg-primary);
    color: var(--dark-text-primary);
}

body.dark-mode .site-header {
    background-color: var(--dark-bg-secondary);
    border-bottom: 1px solid var(--dark-border);
}

body.dark-mode .site-content {
    background-color: var(--dark-bg-primary);
}

body.dark-mode .widget {
    background-color: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
}

body.dark-mode a {
    color: var(--dark-accent);
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: var(--dark-text-primary);
}

body.dark-mode p,
body.dark-mode span,
body.dark-mode div {
    color: var(--dark-text-secondary);
}
*/

/* ===== تحسينات للأجهزة المختلفة ===== */

/* الأجهزة المتوسطة */
@media (max-width: 768px) {
    body.dark-mode .site-logo a,
    body.dark-mode #mobile-header .site-logo a {
        width: 160px;
        height: 60px;
    }
}

/* الأجهزة الصغيرة */
@media (max-width: 480px) {
    body.dark-mode .site-logo a,
    body.dark-mode #mobile-header .site-logo a {
        width: 160px;
        height: 50px;
    }
}

/* ===== انتقالات سلسة ===== */
.site-logo a,
#mobile-header .site-logo a {
    transition: all 0.3s ease;
}

/* ===== تحسينات الأداء ===== */
body.dark-mode .site-logo a,
body.dark-mode #mobile-header .site-logo a {
    will-change: background-image;
    transform: translateZ(0); /* تفعيل تسريع الأجهزة */
}

/* ===== حالات خاصة ===== */

/* عندما يكون الشعار داخل sticky header */
body.dark-mode .sticky-header .site-logo a {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

/* عندما يكون الشعار في navigation */
body.dark-mode .navigation-logo .site-logo a {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

/* ===== تصحيحات للثيمات المختلفة ===== */

/* GeneratePress specific */
body.dark-mode .main-navigation .site-logo a {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

/* تأكد من عدم تأثير أي أنماط أخرى */
body.dark-mode .site-logo a * {
    display: none;
}

body.dark-mode .site-logo a::before,
body.dark-mode .site-logo a::after {
    display: none;
}
