/**
 * Rajadhiraj Cab Service - Premium Light & Orange Theme
 */

/* 1. Base Variables */
:root {
    --primary: #ff7b00;        /* Premium Orange */
    --primary-dark: #e66900;
    --dark: #1a1a1a;          /* Slightly deeper dark */
    --bg-light: #f8f9fa;      
    --bg-white: #ffffff;      
    --text-dark: #212529;
    --text-muted: #6c757d;
    --card-radius: 12px;
    --section-padding: 60px;
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    --orange-gradient: linear-gradient(135deg, #ff7b00 0%, #ffa500 50%, #ff7b00 100%);
    --card-shadow: 0 10px 30px rgba(255, 107, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
}

@media (min-width: 992px) {
    :root {
        --section-padding: 80px;
    }
}

/* 2. Global Styles */
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

main {
    display: block;
}

section {
    padding: var(--section-padding) 0;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--orange-gradient);
    border-radius: 2px;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
}

.text-orange {
    color: var(--primary) !important;
}

.bg-premium-light {
    background-color: var(--bg-white);
}

/* 4. Custom Components */

/* Premium Oval Glass Navbar */
.navbar {
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
    width: 95%;
    max-width: 1400px;
    border-radius: 50px; /* Oval shape */
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    padding: 8px 20px;
    transition: var(--transition);
}

.navbar.sticky-top {
    position: sticky;
    top: 15px;
    z-index: 1030;
}

.navbar .nav-link {
    color: var(--dark) !important;
    font-weight: 600;
    padding: 10px 20px;
    transition: var(--transition);
}

.navbar .nav-link:hover {
    color: var(--primary) !important;
}

@media (max-width: 991px) {
    .navbar {
        width: 98%;
        border-radius: 20px;
        top: 10px;
        margin-top: 10px;
    }
}

/* Buttons */
.btn-primary {
    background: var(--orange-gradient);
    border: none;
    color: #ffffff !important;
    font-weight: 700;
    transition: var(--transition);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 107, 0, 0.3);
    filter: brightness(1.05);
}

.btn-outline-orange {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    background: transparent;
    transition: var(--transition);
}

.btn-outline-orange:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.2);
}

.fw-black {
    font-weight: 900 !important;
}

/* ============================================
   FLEET CARDS - PREMIUM 3D EDITION
   ============================================ */

/* Grid: fills row, equal size columns */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* Base card */
.fleet-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.35s ease;
    will-change: transform;
    height: 100%;
}

.fleet-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 24px 60px rgba(255, 107, 0, 0.18);
}

/* Image container — SOLID WHITE, full width, fixed height */
.fleet-card-img {
    width: 100%;
    height: 220px;
    background-color: #ffffff !important;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,107,0,0.1);
    flex-shrink: 0;
}

.fleet-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Stronger filters to wash out light gray checkerboards into pure white */
    filter: brightness(1.05) contrast(1.1);
    mix-blend-mode: multiply; /* Multiplies image with the white background */
    object-position: center bottom;
    transition: transform 0.4s ease;
    padding: 15px 10px 0;
    background: #ffffff !important;
}

.fleet-card:hover .fleet-card-img img {
    transform: scale(1.07) translateY(-4px);
}

/* Badge */
.fleet-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255,107,0,0.4);
}

/* Body */
.fleet-card-body {
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #ffffff;
}

.fleet-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.fleet-card-desc {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 14px;
    font-weight: 500;
}

/* Features list */
.fleet-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.fleet-card-features li {
    display: flex;
    align-items: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.fleet-card-features li i {
    color: var(--primary);
    font-size: 1rem;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Footer */
.fleet-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.fleet-card-price {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary);
}

/* 6. Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

/* 10. Glassmorphism & Dashboard Polish */
.glass-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--primary) !important;
}

.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* 11. Top Bar Polish */
.top-logout-btn {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.drawer-btn {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #fff;
    color: var(--dark);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.drawer-btn:hover {
    background: #f8f9fa;
    color: var(--primary);
}



.whatsapp-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #25d366; /* WhatsApp Green for visibility */
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.whatsapp-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.whatsapp-btn.hidden {
    transform: translateY(150px);
}

/* 8. PWA & Native UI Polish */
* {
    -webkit-tap-highlight-color: transparent;
}

.btn, .card, .navbar-brand, .nav-link, .whatsapp-btn {
    -webkit-user-select: none;
    user-select: none;
}

/* 9. Admin Sidebar */
.offcanvas-admin {
    width: 280px !important;
    background: #1a1a1a;
    color: #ffffff;
    border-right: 1px solid rgba(255, 107, 0, 0.2);
}

.offcanvas-admin .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 12px 25px;
    border-radius: 0;
    transition: all 0.2s;
    font-weight: 500;
}

.offcanvas-admin .nav-link:hover, .offcanvas-admin .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 107, 0, 0.1);
    border-left: 4px solid var(--primary);
}

.offcanvas-admin .nav-link i {
    width: 25px;
    font-size: 1.1rem;
}

.admin-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-dropdown .dropdown-menu {
    background: #252525;
    border: none;
    padding: 0;
}

.sidebar-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.6) !important;
    padding: 10px 25px 10px 55px;
}

.sidebar-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary) !important;
}

/* 10. Utils & Polish */
.btn-orange-gradient {
    background: var(--orange-gradient);
    border: none;
    color: #fff !important;
}

.text-orange { color: var(--primary) !important; }

@media (max-width: 991px) {
    .navbar-brand img { height: 32px; }
    .section-title { font-size: 1.75rem; }
}

.drawer-btn {
    padding: 8px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-btn:active {
    background: #e9ecef;
}

/* 11. Modal / Read-only Clarity */
fieldset[disabled] .form-control, 
fieldset[disabled] .form-select,
fieldset[disabled] .form-control:disabled, 
fieldset[disabled] .form-select:disabled {
    background-color: #f8f9fa !important;
    color: #000 !important;
    font-weight: 700 !important; /* Maximum clarity */
    border: 1px solid #dee2e6 !important;
    opacity: 1 !important;
    cursor: default;
    -webkit-text-fill-color: #000; /* Ensure text is black on iOS */
}

/* 12. Clock Hands Refinement (Thin Blue) */
.mdtp__wrapper .mdtp__hand { 
    background: transparent !important; 
    width: 0 !important; 
    border-left: 1px solid #0d6efd !important; /* Thinner line */
    margin-left: -0.5px !important; 
}
.mdtp__wrapper .mdtp__hand:after { 
    background: #0d6efd !important; 
    border-color: #0d6efd !important; 
    width: 8px !important; /* Smaller dot */
    height: 8px !important; 
    margin-top: -4px !important; 
    opacity: 1 !important; 
}
.mdtp__wrapper .mdtp__digit.active:before { 
    display: none !important; /* Hide the thick connector wedge */
}

/* PWA Install Guide Modal - ensuring it stays above other overlays */
#pwa-install-guide-modal { z-index: 100001 !important; }
#pwa-install-guide-modal + .modal-backdrop { z-index: 100000 !important; }
