/* ============================================================
   CARLOC - Custom Styles
   ============================================================ */

/* RTL overrides for Arabic */
.rtl .space-x-reverse {
    --tw-space-x-reverse: 1;
}

.rtl .ml-2 { margin-right: 0.5rem; margin-left: 0; }
.rtl .ml-3 { margin-right: 0.75rem; margin-left: 0; }
.rtl .ml-4 { margin-right: 1rem; margin-left: 0; }
.rtl .mr-2 { margin-left: 0.5rem; margin-right: 0; }
.rtl .mr-3 { margin-left: 0.75rem; margin-right: 0; }
.rtl .mr-4 { margin-left: 1rem; margin-right: 0; }

.rtl .text-left { text-align: right; }
.rtl .text-right { text-align: left; }

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print styles */
@media print {
    body { font-size: 12pt; }
    .no-print { display: none !important; }
}

/* Flash animation */
@keyframes slideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fixed.top-20 {
    animation: slideIn 0.3s ease-out;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Truncate text */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card hover effects */
.hover-shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
