/* static/css/style.css - Damascus Ride Theme */

/* استيراد الخطوط */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

/* متغيرات الألوان - Light Mode (الافتراضي) */
:root {
    --gold-primary: #D4AF37;
    --gold-light: #F4E4BC;
    --gold-dark: #AA8C2C;
    --gold-hover: #E5C156;
    
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #8b8282;
    --text-secondary: #c8ced3;
    --border-color: rgba(212, 175, 55, 0.3);
    --navbar-bg: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}


/* ==========================================
   إشعارات - Dropdown Fixes for RTL/LTR
   ========================================== */

/* القائمة المنسدلة للإشعارات */
.dropdown-menu {
    min-width: 280px;
    max-width: 350px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* RTL - عربي */
[lang="ar"] .dropdown-menu {
    right: 0 !important;
    left: auto !important;
    text-align: right;
}

/* LTR - English */
[lang="en"] .dropdown-menu {
    left: 0 !important;
    right: auto !important;
    text-align: left;
}

/* تحسين مظهر عناصر القائمة */
.dropdown-item {
    color: var(--text-primary);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-header {
    color: var(--gold-primary);
    font-weight: 700;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--gold-primary);
}

/* Badge الإشعارات */
#notif_count {
    font-size: 0.7rem;
    padding: 3px 6px;
    animation: pulse-red 2s infinite;
}

/* زر الإشعارات */
.btn-outline-gold.position-relative {
    position: relative;
}

/* Responsive - موبايل */
@media (max-width: 576px) {
    .dropdown-menu {
        min-width: 250px;
        max-width: 90vw;
        position: fixed !important;
        right: 10px !important;
        left: 10px !important;
        top: 60px !important;
    }
    
    [lang="en"] .dropdown-menu {
        left: 10px !important;
        right: 10px !important;
    }
}

/* تأثير النبض للعداد */
@keyframes pulse-red {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); 
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); 
    }
}


/* مؤشر تحميل الخريطة */
.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
}

.map-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--gold-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* تحسين أداء الخريطة */
.leaflet-container {
    background: var(--bg-secondary);
    z-index: 1;
}
/* ==========================================
   إصلاح ألوان النصوص في Dark Mode
   ========================================== */

/* النصوص الثانوية */
.text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

/* جميع النصوص داخل الكروت */
.card-body, .card-header, .card-footer {
    color: var(--text-primary);
}

.card-body p, .card-body span, .card-body div {
    color: var(--text-primary);
}

/* النصوص الصغيرة */
small {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] small {
    color: #adb5bd !important;
}

/* العناوين */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* الروابط */
a {
    color: var(--gold-primary);
}

a:hover {
    color: var(--gold-light);
}

/* الجداول */
.table {
    color: var(--text-primary);
}

.table td, .table th {
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* القوائم */
ul, ol, li {
    color: var(--text-primary);
}

/* النصوص داخل التنبيهات */
.alert {
    color: var(--text-primary);
}

/* Placeholder في حقول الإدخال */
::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

[data-theme="dark"] ::placeholder {
    color: #adb5bd;
    opacity: 0.8;
}



/* ==========================================
   Accordion Styles - Dark Mode Support
   ========================================== */

.accordion-button {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

.accordion-button:not(.collapsed) {
    background: var(--bg-secondary) !important;
    color: var(--gold-primary) !important;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.accordion-button:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.accordion-body {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .accordion-button::after {
    filter: invert(1);
}

/* Smooth Animation */
.accordion-collapse {
    transition: all 0.3s ease;
}

/* Hover Effect */
.accordion-button:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--gold-primary);
}

/* ==========================================
   Password Reset Pages
   ========================================== */

.auth-card {
    max-width: 450px;
    margin: 0 auto;
}

.reset-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.reset-step {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    margin: 0 5px;
    border-radius: 10px;
    color: var(--text-secondary);
}

.reset-step.active {
    background: var(--gold-primary);
    color: #1a1a1a;
    border-color: var(--gold-primary);
}

/* ==========================================
   إصلاحات إضافية للوضع الداكن
   ========================================== */



[data-theme="dark"] .navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .btn-light {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-success {
    background: #198754;
    color: #fff;
}

[data-theme="dark"] .btn-danger {
    background: #dc3545;
    color: #fff;
}

[data-theme="dark"] .btn-warning {
    background: #ffc107;
    color: #1a1a1a;
}

[data-theme="dark"] .btn-info {
    background: #0dcaf0;
    color: #1a1a1a;
}

/* الخلفيات */
[data-theme="dark"] .bg-white {
    background: var(--bg-card) !important;
}

[data-theme="dark"] .bg-light {
    background: var(--bg-secondary) !important;
}

/* الفوتر */
[data-theme="dark"] footer {
    background: #0a0a0a;
    color: var(--gold-light);
}

/* البادجات */
[data-theme="dark"] .badge.bg-light {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* حدود */
[data-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] hr {
    border-color: var(--border-color);
    opacity: 0.5;
}


/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #1a1a1a;
    --text-primary: #616972;
    --text-secondary: #adb7c0;
    --border-color: rgba(212, 175, 55, 0.5);
    --navbar-bg: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    --shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
}

/* الأساسيات */
body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

[data-theme="dark"] body {
    font-family: 'Tajawal', sans-serif;
}

/* English Font */
[lang="en"] body {
    font-family: 'Poppins', sans-serif;
}

/* Navbar */
.navbar {
    background: var(--navbar-bg);
    border-bottom: 2px solid var(--gold-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar-brand {
    color: var(--gold-primary) !important;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.navbar-brand:hover {
    color: var(--gold-light) !important;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--gold-primary) !important;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
}

/* .card-header {
    background: var(--navbar-bg);
    color: var(--gold-primary);
    font-weight: 700;
    border-bottom: 2px solid var(--gold-primary);
} */

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    border: none;
    color: #1a1a1a;
    font-weight: 700;
    padding: 10px 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-hover) 100%);
    color: #1a1a1a;
}

.btn-outline-gold {
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    background: transparent;
    font-weight: 600;
}

.btn-outline-gold:hover {
    background: var(--gold-primary);
    color: #1a1a1a;
}

/* Forms */
.form-control, .form-select {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-label {
    font-weight: 600;
    color: var(--gold-primary);
}

/* Alerts */
.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border-right: 4px solid var(--gold-primary);
    color: #198754;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-right: 4px solid #dc3545;
    color: #dc3545;
}

.alert-warning {
    background: rgba(212, 175, 55, 0.1);
    border-right: 4px solid var(--gold-primary);
    color: var(--gold-dark);
}

.alert-info {
    background: rgba(13, 202, 240, 0.1);
    border-right: 4px solid var(--gold-primary);
    color: #0dcaf0;
}

/* Utility Classes */
.text-gold {
    color: var(--gold-primary) !important;
}

.bg-black-gold {
    background: var(--navbar-bg);
}

.border-gold {
    border-color: var(--gold-primary) !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--gold-primary);
    color: #1a1a1a;
}

/* Language Toggle */
.lang-toggle {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-left: 10px;
}

.lang-toggle:hover {
    background: var(--gold-primary);
    color: #1a1a1a;
}

/* Tables */
.table {
    color: var(--text-primary);
}

.table-hover tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 8px 12px;
}

/* Animations */
@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
}

.pulse-gold {
    animation: pulse-gold 2s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.4rem;
    }
    .btn-primary {
        padding: 8px 20px;
        font-size: 0.95rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}