/**
 * RideGo - Uber & Rapido Inspired Mobile-First Web Design System
 * High contrast Black & White, Rapido Yellow Accents (#FFC000), Tactile CTAs, and App-like Shells
 */

:root {
    --uber-black: #000000;
    --uber-dark: #121212;
    --uber-card-bg: #ffffff;
    --uber-page-bg: #f6f6f6;
    --uber-border: #e2e2e2;
    --uber-border-light: #eeeeee;
    --uber-text: #000000;
    --uber-text-muted: #5e5e5e;
    --uber-gray-box: #f3f3f3;
    --uber-gray-hover: #e8e8e8;
    
    /* Rapido Vibrant Accents */
    --rapido-yellow: #ffc000;
    --rapido-yellow-hover: #e5ac00;
    --rapido-yellow-subtle: #fff8e1;
    
    /* Status Colors */
    --status-success: #05a357;
    --status-warning: #f59e0b;
    --status-danger: #e11900;
    --status-info: #276ef1;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-floating: 0 16px 36px rgba(0, 0, 0, 0.16);

    --bottom-nav-height: 64px;
    --app-header-height: 62px;
}

/* Base & Typography */
body {
    background-color: var(--uber-page-bg);
    color: var(--uber-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -0.015em;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--uber-black);
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Uber / Rapido Tactile Buttons */
.btn {
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all 0.15s ease-in-out;
    letter-spacing: -0.01em;
}
.btn:active {
    transform: scale(0.97);
}

.btn-uber, .btn-primary {
    background-color: var(--uber-black) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.75rem 1.4rem;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn-uber:hover, .btn-primary:hover {
    background-color: #222222 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-rapido {
    background-color: var(--rapido-yellow) !important;
    color: var(--uber-black) !important;
    border: none !important;
    padding: 0.75rem 1.4rem;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255, 192, 0, 0.35);
}
.btn-rapido:hover {
    background-color: var(--rapido-yellow-hover) !important;
    color: var(--uber-black) !important;
}

.btn-pill {
    border-radius: var(--radius-pill) !important;
}
.btn-cta-lg {
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 800;
}

/* Modern Uber / Rapido Navbar */
.uber-navbar {
    height: var(--app-header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--uber-border-light);
    box-shadow: var(--shadow-subtle);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.uber-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--uber-black);
    letter-spacing: -0.04em;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.uber-logo .logo-badge {
    background: var(--rapido-yellow);
    color: var(--uber-black);
    font-size: 0.7rem;
    font-weight: 900;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    margin-left: 0.35rem;
    text-transform: uppercase;
}

/* Native App Style Bottom Navigation for Mobile */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #ffffff;
    border-top: 1px solid var(--uber-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 1045;
    padding: 0 0.5rem;
    align-items: center;
    justify-content: space-around;
}
.mobile-bottom-nav .nav-item-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--uber-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    flex: 1;
    padding: 0.4rem 0;
    transition: color 0.15s ease;
}
.mobile-bottom-nav .nav-item-btn i {
    font-size: 1.35rem;
    margin-bottom: 0.15rem;
}
.mobile-bottom-nav .nav-item-btn.active {
    color: var(--uber-black);
    font-weight: 800;
}
.mobile-bottom-nav .nav-item-btn.active i {
    color: var(--uber-black);
}

@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: flex;
    }
    body.has-bottom-nav {
        padding-bottom: calc(var(--bottom-nav-height) + 12px);
    }
}

/* App-Like Full Screen Map Container */
.map-app-container {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--app-header-height));
    overflow: hidden;
    background: #e5e5e5;
}

#customerMap, #liveTrackingMap, #driverCockpitMap, #driverActiveMap, #adminRadarMap {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Uber Floating Search / Booking Card */
.uber-booking-card {
    position: absolute;
    top: 20px;
    left: 24px;
    width: 420px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - var(--app-header-height) - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-floating);
    z-index: 1000;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* On mobile, transform into a sleek bottom sheet like Uber/Rapido apps */
@media (max-width: 768px) {
    .uber-booking-card {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 80vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
        padding: 1.25rem 1rem 1.5rem 1rem;
    }
    .sheet-drag-handle {
        width: 42px;
        height: 5px;
        background: #d4d4d4;
        border-radius: 9999px;
        margin: -0.25rem auto 1rem auto;
    }
}

/* Route Location Input Connector (Uber Style) */
.location-connector-box {
    position: relative;
    background: var(--uber-gray-box);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem 0.75rem 2.8rem;
    margin-bottom: 1rem;
}
.location-connector-line {
    position: absolute;
    left: 1.35rem;
    top: 1.6rem;
    bottom: 1.6rem;
    width: 2px;
    background: #9e9e9e;
}
.location-point-dot {
    position: absolute;
    left: 1.15rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    z-index: 2;
}
.dot-pickup {
    top: 1.25rem;
    background: var(--status-success);
    box-shadow: 0 0 0 3px rgba(5, 163, 87, 0.2);
}
.dot-drop {
    bottom: 1.25rem;
    background: var(--uber-black);
    border-radius: 2px;
}

.location-input-field {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--uber-black);
    padding: 0.35rem 0;
}
.location-input-field::placeholder {
    color: var(--uber-text-muted);
    font-weight: 500;
}
.location-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 0.4rem 0;
}

/* Vehicle Category Selection Tiles (Uber/Rapido Style) */
.vehicle-card-item {
    cursor: pointer;
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease-in-out;
}
.vehicle-card-item:hover {
    background: var(--uber-gray-box);
}
.vehicle-card-item.selected {
    background: #ffffff;
    border-color: var(--uber-black);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.vehicle-img-badge {
    width: 58px;
    height: 58px;
    background: var(--uber-gray-box);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.9rem;
    flex-shrink: 0;
}
.vehicle-card-item.selected .vehicle-img-badge {
    background: var(--rapido-yellow-subtle);
    color: var(--uber-black);
}

.vehicle-name-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--uber-black);
    margin-bottom: 0.1rem;
    display: flex;
    align-items: center;
}
.vehicle-meta-tag {
    font-size: 0.78rem;
    color: var(--uber-text-muted);
    font-weight: 500;
}
.eta-pill {
    background: #eafbf1;
    color: var(--status-success);
    font-weight: 700;
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    margin-left: 0.4rem;
}

.vehicle-price-val {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--uber-black);
    letter-spacing: -0.02em;
    text-align: right;
}

/* Leaflet Map Styling & Custom Uber/Rapido Pins */
.custom-leaflet-marker {
    background: transparent;
    border: none;
}
.marker-pin-inner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--uber-black);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 3px solid #ffffff;
    font-size: 1.2rem;
}
.marker-pin-inner.bike-pin {
    background: var(--rapido-yellow);
    color: var(--uber-black);
}
.marker-pin-inner.auto-pin {
    background: #f59e0b;
    color: #ffffff;
}

/* Radar Animation for Searching */
.searching-app-sheet {
    text-align: center;
    padding: 2rem 1.5rem;
}
.pulse-circle-sonar {
    width: 90px;
    height: 90px;
    background: var(--rapido-yellow);
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 0 0 rgba(255, 192, 0, 0.7);
    animation: pulseSonar 1.8s infinite;
}
@keyframes pulseSonar {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 192, 0, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 24px rgba(255, 192, 0, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 192, 0, 0);
    }
}

/* Trip OTP Badge (Uber PIN style) */
.uber-otp-badge {
    background: var(--uber-black);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    display: inline-block;
    font-family: monospace;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Driver Floating Cockpit Controls */
.driver-cockpit-floating {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 500px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-floating);
    z-index: 1010;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.online-toggle-pill {
    height: 56px;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

/* Map Floating Action Buttons (Locate Me, Layers) */
.map-floating-btn {
    position: absolute;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--uber-black);
    border: 1px solid var(--uber-border);
    box-shadow: var(--shadow-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.15s ease;
}
.map-floating-btn:hover {
    background: var(--uber-gray-box);
    transform: scale(1.05);
}
.btn-locate-float {
    bottom: 120px;
}

/* Badges */
.badge-status-requested { background: #e0e7ff; color: #1e40af; }
.badge-status-searching { background: #fff8e1; color: #b45309; }
.badge-status-driver_assigned { background: #e0f2fe; color: #0369a1; }
.badge-status-accepted { background: #dcfce7; color: #15803d; }
.badge-status-driver_arrived { background: #fef08a; color: #854d0e; }
.badge-status-in_progress { background: #dbeafe; color: #1e40af; }
.badge-status-completed { background: #dcfce7; color: #166534; }
.badge-status-cancelled { background: #fee2e2; color: #991b1b; }
.badge-status-expired { background: #f3f4f6; color: #4b5563; }

/* ==========================================================================
   Uber / Rapido Mobile App Cards & Secondary UI Elements
   ========================================================================== */

/* Modern Segmented Tab Bar */
.uber-segment-tabs {
    background: #ebebeb;
    padding: 4px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.segment-tab-item {
    padding: 0.45rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--uber-text-muted);
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.segment-tab-item:hover {
    color: var(--uber-black);
}
.segment-tab-item.active {
    background: var(--uber-black);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.segment-tab-item.active-yellow {
    background: var(--rapido-yellow);
    color: var(--uber-black) !important;
    box-shadow: 0 2px 8px rgba(255, 192, 0, 0.3);
}

/* Mobile Ride Cards (Rapido / Uber Activity Feed) */
.mobile-ride-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--uber-border-light);
    box-shadow: var(--shadow-subtle);
    padding: 1.15rem;
    margin-bottom: 0.85rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}
.mobile-ride-card:hover {
    box-shadow: var(--shadow-elevated);
    border-color: #d1d1d1;
}
.mobile-ride-card .card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}
.mobile-ride-card .vehicle-tag {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.mobile-ride-card .vehicle-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--uber-gray-box);
    color: var(--uber-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.mobile-ride-card .vehicle-icon-circle.bike {
    background: var(--rapido-yellow-subtle);
    color: #b45309;
}
.mobile-ride-card .vehicle-icon-circle.auto {
    background: #fff7ed;
    color: #ea580c;
}
.mobile-ride-card .vehicle-icon-circle.car {
    background: #f1f5f9;
    color: var(--uber-black);
}
.mobile-ride-card .fare-display {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--uber-black);
    letter-spacing: -0.03em;
    text-align: right;
}

/* Route Timeline Inside Ride Card */
.route-timeline {
    position: relative;
    padding-left: 1.85rem;
    margin: 0.85rem 0;
}
.route-timeline-line {
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #d4d4d4;
}
.route-timeline-point {
    position: relative;
    margin-bottom: 0.65rem;
    font-size: 0.88rem;
    line-height: 1.3;
}
.route-timeline-point:last-child {
    margin-bottom: 0;
}
.route-timeline-point .marker-dot {
    position: absolute;
    left: -1.85rem;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.route-timeline-point .marker-dot.pickup {
    background: var(--status-success);
    box-shadow: 0 0 0 2px rgba(5, 163, 87, 0.25);
}
.route-timeline-point .marker-dot.drop {
    background: var(--uber-black);
    border-radius: 2px;
}

/* Mobile Settings / Profile Group */
.mobile-settings-group {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--uber-border-light);
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-subtle);
}
.mobile-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--uber-border-light);
    color: var(--uber-black);
    text-decoration: none;
    transition: background 0.15s ease;
}
.mobile-settings-item:last-child {
    border-bottom: none;
}
.mobile-settings-item:hover {
    background: var(--uber-gray-box);
    color: var(--uber-black);
}
.mobile-settings-item .item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--uber-gray-box);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* Captain Earnings Hero Card */
.earnings-hero-card {
    background: linear-gradient(135deg, #121212 0%, #222222 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-floating);
    margin-bottom: 1.5rem;
}
.earnings-hero-card::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    background: var(--rapido-yellow);
    filter: blur(80px);
    opacity: 0.22;
    border-radius: 50%;
    pointer-events: none;
}
.earnings-hero-card .hero-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a3a3a3;
    font-weight: 700;
}
.earnings-hero-card .hero-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--rapido-yellow);
    letter-spacing: -0.04em;
    margin: 0.35rem 0 0.85rem 0;
}

/* Document Upload Tile */
.doc-upload-card {
    background: #ffffff;
    border: 1px solid var(--uber-border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-subtle);
    margin-bottom: 1rem;
}
.doc-upload-card.verified {
    border-left: 4px solid var(--status-success);
}
.doc-upload-card.pending {
    border-left: 4px solid var(--rapido-yellow);
}
.doc-upload-card.rejected {
    border-left: 4px solid var(--status-danger);
}

/* Scrollbar polish */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
