/* ===== Theme bridge: Bootstrap data-bs-theme + Tailwind utilities ===== */

/* ألوان أساسية قابلة للتبديل */
:root {
    --c-bg: #ffffff; /* خلفية الصفحة */
    --c-text: #111827; /* لون النص الأساسي */
    --c-card: #ffffff; /* خلفية البطاقات/الصناديق */
    --c-muted: #6b7280; /* نص ثانوي */
    --c-border: #e5e7eb; /* حدود فاتحة */
    --c-primary: #4F46E5; /* بنفسجي */
}

html[data-bs-theme="dark"] {
    --c-bg: #0b1220;
    --c-text: #e5e7eb;
    --c-card: #0f172a;
    --c-muted: #94a3b8;
    --c-border: #1f2937;
    --c-primary: #818cf8; /* افتح شوية في الدارك */
}

/* جسم الصفحة + نص افتراضي */
html, body {
    background: var(--c-bg) !important;
    color: var(--c-text) !important;
}

/* بطاقات وصناديق شائعة عندك */
.bg-white,
.card,
.card-listing,
.sidebar-card,
.filter-modern,
.admin-ad-card,
.quick-tile,
.listing-card,
.navbar,
.dropdown-menu,
.modal-content {
    background: var(--c-card) !important;
    color: var(--c-text) !important;
    border-color: var(--c-border) !important;
}

/* حدود محايدة في الثيمين */
.border,
.table,
.table * {
    border-color: var(--c-border) !important;
}

/* نصوص Tailwind الرمادية تتحوّل تلقائيًا */
.text-gray-900, .text-gray-800, .text-gray-700 {
    color: var(--c-text) !important;
}

.text-gray-600, .text-gray-500, .text-muted {
    color: var(--c-muted) !important;
}

/* عناصر الإدخال */
input, select, textarea {
    background: var(--c-card) !important;
    color: var(--c-text) !important;
    border-color: var(--c-border) !important;
}

    input::placeholder, textarea::placeholder {
        color: var(--c-muted) !important;
    }

/* الأزرار الأساسية */
.btn-primary,
.bg-primary {
    background-color: var(--c-primary) !important;
    border-color: var(--c-primary) !important;
}

.text-primary {
    color: var(--c-primary) !important;
}

/* الظلال أغمق شوية في الدارك */
.shadow, .shadow-sm, .shadow-lg {
    box-shadow: 0 10px 20px rgba(0,0,0,.08) !important;
}

html[data-bs-theme="dark"] .shadow,
html[data-bs-theme="dark"] .shadow-sm,
html[data-bs-theme="dark"] .shadow-lg {
    box-shadow: 0 10px 24px rgba(0,0,0,.45) !important;
}

/* أيقونات Feather/Bootstrap Icons تتلوّن مع النص */
[data-feather], svg.feather, .bi {
    color: currentColor !important;
    stroke: currentColor !important; /* لرسومات الـFeather */
}

/* الروابط في الدارك أوضح */
a {
    color: var(--c-primary);
}

    a:hover {
        opacity: .9;
    }

/* صور/شعارات داكنة على خلفية داكنة (لو شعارك أسود فقط) */
img.logo-auto {
    filter: none;
    transition: filter .15s ease;
}

html[data-bs-theme="dark"] img.logo-auto {
    filter: invert(1) hue-rotate(180deg) saturate(.9);
}

/* هيدر Tailwind الجديد */
.nav-tail {
    background: var(--c-card) !important;
    border-bottom: 1px solid var(--c-border);
}

    .nav-tail a {
        color: var(--c-text) !important;
    }

        .nav-tail a:hover {
            color: var(--c-primary) !important;
        }

/* فووتر */
.footer-tail {
    background: #0b1220;
    color: #e5e7eb;
}

html[data-bs-theme="light"] .footer-tail {
    background: #0e1320;
    color: #f3f4f6;
}
/* يحافظ على تباين جميل حتى في اللايت */

/* بطاقات الإعلانات داخل Listings */
.card-listing .price {
    color: var(--c-text) !important;
}

.badge-soft {
    background: rgba(79,70,229,.12) !important;
    color: var(--c-primary) !important;
}

/* صور المصغرات الحدود وقت active */
.thumbs img.active {
    border-color: #0ea5e9 !important;
}

html[data-bs-theme="dark"] .thumbs img.active {
    border-color: #38bdf8 !important;
}

/* بواكب الـTailwind الرمادي في كل الثيمين */
.bg-gray-50 {
    background: color-mix(in oklab, var(--c-bg) 94%, var(--c-text)) !important;
}

.text-white {
    color: #ffffff !important;
}
/* لعنوانين الهيروأ القديم */
