/* DriverConnect Premium Light Glassmorphism Design System */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Colors - Light Theme pastel lavender/indigo theme */
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-glow: rgba(99, 102, 241, 0.25);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --primary-glow: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.02) 50%, transparent 100%);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    background-image: var(--primary-glow);
    background-attachment: fixed;
    background-size: cover;
    overflow-x: hidden;
}

/* Glassmorphism utility classes */
.glass-panel {
    background: var(--bg-card) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: rgba(99, 102, 241, 0.25) !important;
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.1) !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
    transform: translateY(-2px);
}

/* Nav Blur */
.glass-nav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color) !important;
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Custom Input Styling */
.glass-input {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #0f172a !important;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.glass-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
    background: #ffffff !important;
}

.glass-input::placeholder {
    color: #64748b !important;
}

/* Gradient text */
.text-gradient-purple {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-rose {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* SOS Flashing effect */
@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        background-color: #ef4444;
    }
    50% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
        background-color: #dc2626;
    }
}

.btn-sos {
    animation: pulse-red 2s infinite;
}

/* Leaflet map styling overrides */
.leaflet-container {
    background: #f1f5f9 !important;
    border-radius: 1rem;
    border: 1px solid var(--border-color) !important;
}

.leaflet-tile {
    /* No dark mode filter in light theme */
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* -------------------------------------------------------------
   LIGHT MODE OVERRIDES FOR COMMONLY USED TAILWIND DARK-MODE CLASSES
   ------------------------------------------------------------- */

/* Text colors overrides */
.text-slate-100, 
.text-slate-200, 
.text-slate-350,
.text-slate-300, 
.text-slate-150 {
    color: #1e293b !important;
}

.text-slate-400, 
.text-slate-450, 
.text-slate-500 {
    color: #475569 !important;
}

/* Primary/Accent colors tweaks for readable contrast */
.text-indigo-400 {
    color: #4f46e5 !important;
}

.text-emerald-400 {
    color: #059669 !important;
}

.text-yellow-500 {
    color: #d97706 !important;
}

.text-amber-400 {
    color: #b45309 !important;
}

.text-rose-400,
.text-rose-450 {
    color: #dc2626 !important;
}

/* Background elements overrides */
.bg-slate-900, 
.bg-slate-900\/30,
.bg-slate-900\/40, 
.bg-slate-900\/50, 
.bg-slate-900\/60, 
.bg-dark-900, 
.bg-dark-800, 
.bg-dark-700\/80 {
    background-color: rgba(255, 255, 255, 0.65) !important;
}

.bg-slate-900\/80 {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Border overrides */
.border-white\/5, 
.border-white\/10 {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* -------------------------------------------------------------
   PRESERVE WHITE/CONTRAST TEXT FOR BUTTONS & FILLED BADGES
   ------------------------------------------------------------- */
button, 
button *, 
.btn, 
.btn *, 
[type='submit'], 
[type='submit'] *,
button.bg-gradient-to-r,
button.bg-gradient-to-tr,
a.bg-gradient-to-r,
a.bg-gradient-to-tr,
span.bg-gradient-to-r,
span.bg-gradient-to-tr,
.bg-indigo-650,
.bg-indigo-600,
.bg-indigo-500,
.bg-emerald-500,
.bg-teal-600,
.bg-purple-600,
.bg-red-600,
.bg-red-650,
.bg-rose-600,
.bg-rose-650,
.bg-slate-800,
.bg-slate-700,
.bg-red-600 *,
.bg-red-650 *,
.bg-rose-600 *,
.bg-rose-650 *,
.bg-indigo-650 *,
.bg-indigo-600 *,
.bg-indigo-500 *,
.bg-emerald-500 *,
.bg-teal-600 *,
.bg-purple-600 *,
.bg-slate-800 *,
.bg-slate-700 *,
.btn-sos,
.btn-sos * {
    color: #ffffff !important;
}

/* Ensure secondary buttons (e.g. white border or transparent buttons) do not have white text forced */
button.border-white\/10,
button.border-slate-200,
button.bg-slate-100,
button.bg-slate-100 *,
.bg-slate-800\/80,
.bg-slate-800\/80 *,
.bg-indigo-500\/20,
.bg-indigo-500\/20 *,
.bg-emerald-500\/20,
.bg-emerald-500\/20 *,
.bg-emerald-500\/10,
.bg-emerald-500\/10 *,
.bg-amber-500\/20,
.bg-amber-500\/20 *,
.bg-amber-500\/10,
.bg-amber-500\/10 *,
.bg-rose-500\/20,
.bg-rose-500\/20 *,
.bg-rose-500\/10,
.bg-rose-500\/10 *,
.bg-white\/5,
.bg-white\/5 * {
    color: inherit !important;
}

/* Link overrides in header tabs */
.nav-link-active * {
    color: inherit !important;
}
