@tailwind base; @tailwind components; @tailwind utilities; @layer components { /* Card styles with theme transitions */ .car-card { @apply transition-colors duration-200 border border-gray-200 bg-white shadow; } /* أنماط الانتقال بين الصفحات */ .page-transition { animation: fadeIn 0.3s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* نمط التحديث عند السحب */ .pull-to-refresh { transition: transform 0.3s ease-out; } .pull-to-refresh.active { transform: translateY(80px); } .pull-to-refresh-spinner { display: none; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border: 3px solid #f3f3f3; border-top: 3px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite; } .pull-to-refresh.active .pull-to-refresh-spinner { display: block; } @keyframes spin { 0% { transform: translateX(-50%) rotate(0deg); } 100% { transform: translateX(-50%) rotate(360deg); } } /* دائرة التحميل المتحركة */ .loading-spinner { width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite; margin: 20px auto; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* نمط للحاوية */ .loading-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; } /* نص التحميل */ .loading-text { margin-top: 10px; color: #666; font-size: 14px; } .dark .loading-text { color: #aaa; } .dark .car-card { @apply bg-gray-900 border-gray-800 shadow-xl; } /* Search section styling */ .search-section { @apply bg-white; } .dark .search-section { @apply bg-gray-900; } /* Input fields styling */ .search-field { @apply bg-gray-50 border-gray-200; } .dark .search-field { @apply bg-gray-800 border-gray-700; } /* White container fix */ .dark div[style*="background-color: white"], .dark div[style*="background-color: #fff"], .dark div[style*="background-color:#fff"], .dark div[style*="background-color: rgb(255, 255, 255)"], .dark div[style*="background: white"], .dark div[style*="background: #fff"] { background-color: rgb(17, 24, 39) !important; } } @layer base { * { @apply border-border; } body { @apply font-sans antialiased bg-background text-foreground; } /* Light mode defaults */ html { background-color: white; color-scheme: light; } /* Ensure light theme has proper text contrast */ .text-primary { @apply text-gray-900; } .text-secondary { @apply text-gray-700; } /* Dark mode styles */ .dark .bg-white, .dark div[class*='bg-white'] { @apply bg-gray-950 !important; } .dark .bg-background { @apply bg-gray-950 !important; } .dark .card, .dark .dark\\:bg-dark-card, .dark [class*='card'], .dark [class*='Card'] { @apply bg-gray-900 !important; } .dark input, .dark select, .dark textarea, .dark .input, .dark .select, .dark button[class*='outline'] { @apply bg-gray-900 border-gray-700 text-gray-100 !important; } .dark .bg-muted, .dark .bg-gray-100, .dark .bg-gray-50, .dark [class*='bg-gray-50'], .dark [class*='bg-gray-100'] { @apply bg-gray-800 !important; } /* Target specific elements that need dark backgrounds */ .dark [class*='bg-background'], .dark [class*='bg-light-bg'] { @apply bg-gray-950 !important; } /* White text in dark mode */ .dark { color-scheme: dark; } /* Ensure containers have dark backgrounds */ .dark .container, .dark [class*='container'] { @apply bg-transparent !important; } /* Fix category cards */ .dark [class*='category'] [class*='card'], .dark [class*='Category'] [class*='Card'] { @apply bg-gray-900 !important; } /* RTL Support */ html[dir="rtl"] { text-align: right !important; } html[dir="rtl"] body { direction: rtl !important; } html[dir="rtl"] .ml-1, html[dir="rtl"] .ml-2, html[dir="rtl"] .ml-3, html[dir="rtl"] .ml-4, html[dir="rtl"] .ml-5, html[dir="rtl"] .ml-6, html[dir="rtl"] .ml-8, html[dir="rtl"] .ml-10, html[dir="rtl"] .ml-auto { margin-left: 0 !important; margin-right: var(--tw-space-x-reverse, 0.5rem) !important; } html[dir="rtl"] .mr-1, html[dir="rtl"] .mr-2, html[dir="rtl"] .mr-3, html[dir="rtl"] .mr-4, html[dir="rtl"] .mr-5, html[dir="rtl"] .mr-6, html[dir="rtl"] .mr-8, html[dir="rtl"] .mr-10, html[dir="rtl"] .mr-auto { margin-right: 0 !important; margin-left: var(--tw-space-x-reverse, 0.5rem) !important; } html[dir="rtl"] .pl-1, html[dir="rtl"] .pl-2, html[dir="rtl"] .pl-3, html[dir="rtl"] .pl-4, html[dir="rtl"] .pl-5, html[dir="rtl"] .pl-6, html[dir="rtl"] .pl-8, html[dir="rtl"] .pl-10 { padding-left: 0 !important; padding-right: var(--tw-space-x-reverse, 0.75rem) !important; } html[dir="rtl"] .pr-1, html[dir="rtl"] .pr-2, html[dir="rtl"] .pr-3, html[dir="rtl"] .pr-4, html[dir="rtl"] .pr-5, html[dir="rtl"] .pr-6, html[dir="rtl"] .pr-8, html[dir="rtl"] .pr-10 { padding-right: 0 !important; padding-left: var(--tw-space-x-reverse, 0.75rem) !important; } html[dir="rtl"] .text-left { text-align: right !important; } html[dir="rtl"] .text-right { text-align: left !important; } html[dir="rtl"] .rounded-r-none { border-top-right-radius: 0.25rem !important; border-bottom-right-radius: 0.25rem !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; } html[dir="rtl"] .rounded-l-none { border-top-left-radius: 0.25rem !important; border-bottom-left-radius: 0.25rem !important; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; } html[dir="rtl"] .right-0 { right: auto !important; left: 0 !important; } html[dir="rtl"] .left-0 { left: auto !important; right: 0 !important; } html[dir="rtl"] .rotate-180 { --tw-rotate: 0deg !important; } html[dir="rtl"] .rotate-0 { --tw-rotate: 180deg !important; } /* Add support for RTL in flex directions */ html[dir="rtl"] .flex-row { flex-direction: row-reverse !important; } html[dir="rtl"] .space-x-1 > :not([hidden]) ~ :not([hidden]), html[dir="rtl"] .space-x-2 > :not([hidden]) ~ :not([hidden]), html[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]), html[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]), html[dir="rtl"] .space-x-6 > :not([hidden]) ~ :not([hidden]), html[dir="rtl"] .space-x-8 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 1 !important; } /* Fix for search inputs */ html[dir="rtl"] input[type="search"], html[dir="rtl"] input[type="text"] { text-align: right !important; } /* Fix alignment for menus */ html[dir="rtl"] nav a, html[dir="rtl"] button, html[dir="rtl"] .dropdown-content { text-align: right !important; } html[dir="rtl"] ul, html[dir="rtl"] ol { padding-right: 1.5rem !important; padding-left: 0 !important; } }