/* Booking Page Styles */

:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --bg-input: #1A1A1A;
    --text-white: #FFFFFF;
    --text-gray: #B0B0B0;
    --accent-gold: #C5A059;
    --accent-gold-hover: #D4B06A;
    --border-color: #333333;
    --success-green: #4CAF50;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
}

/* =============================================
   DESKTOP LAYOUT (Default)
============================================= */
.booking-page-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 80px;
    position: relative;
    overflow-x: hidden;
}

/* Left Column: Booking Form */
.booking-left-panel {
    width: 60%;
    padding: 40px 50px;
    background: var(--bg-dark);
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Right Column: Map - Sticky Sidebar */
.booking-right-panel {
    width: 40%;
    background: #0a0a0a;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    z-index: 100;
    overflow: hidden;
    align-self: flex-start;
}

#bookingMap {
    width: 100%;
    height: 100%;
}

/* Map Overlay Info (Distance/Time) - Light theme */
.map-trip-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ffffff;
    backdrop-filter: blur(10px);
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    z-index: 1000;
    min-width: 240px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.02);
    color: #333;
}

.map-trip-info h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #374151;
    font-weight: 600;
}

.map-trip-info p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* =============================================
   FORM STYLES
============================================= */
.booking-header {
    margin-bottom: 35px;
}

.booking-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.booking-header h1 span {
    color: var(--accent-gold);
}

.booking-subtitle {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.5;
}

/* Trip Type Tabs */
.trip-type-tabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 30px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.trip-tab {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.trip-tab:hover {
    color: #fff;
}

.trip-tab.active {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--accent-gold);
    font-size: 18px;
    z-index: 2;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 45px 16px 48px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--accent-gold);
    outline: none;
    background: #222;
    box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}

textarea.form-control {
    padding: 16px;
    min-height: 100px;
    resize: vertical;
}

.clear-input {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    padding: 5px;
    transition: color 0.3s;
}

.clear-input:hover {
    color: var(--accent-gold);
}

/* Date/Time/Passengers Row */
.input-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-split {
    display: flex;
    gap: 15px;
}

.form-group-split .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Custom Time Picker */
.custom-time-picker {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    min-width: 200px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 12px;
    z-index: 9999;
    padding: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    display: none;
    gap: 8px;
    height: 220px;
}

.custom-time-picker.show {
    display: flex !important;
}

.time-col {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    border-radius: 8px;
    background: #222;
}

.time-col::-webkit-scrollbar {
    width: 4px;
}

.time-col::-webkit-scrollbar-track {
    background: #222;
}

.time-col::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

.time-slot {
    padding: 10px 8px;
    text-align: center;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 6px;
    margin: 2px;
}

.time-slot:hover {
    background: #333;
    color: #fff;
}

.time-slot.selected {
    background: var(--accent-gold);
    color: #000;
    font-weight: 700;
}

/* Autocomplete Dropdown */
.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    background: #1A1A1A;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
}

.autocomplete-item {
    padding: 14px 16px;
    border-bottom: 1px solid #2a2a2a;
    font-size: 14px;
    color: #eee;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #2a2a2a;
}

.ac-icon {
    color: var(--accent-gold);
    width: 20px;
    text-align: center;
}

.ac-main {
    font-size: 14px;
    color: #ddd;
}

.hl-text {
    color: #fff;
    font-weight: 700;
}

.ac-sub {
    font-size: 13px;
    color: #666;
    margin-left: 8px;
}

/* =============================================
   VEHICLE SELECTION
============================================= */
.vehicle-selection-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.vehicle-categories {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    
    /* Hide Scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

.vehicle-categories::-webkit-scrollbar { 
    display: none;  /* Chrome/Safari */
}

.cat-tab {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.3s;
}

.cat-tab:hover {
    color: #fff;
}

.cat-tab.active {
    color: var(--accent-gold);
}

.cat-tab.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gold);
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.vehicle-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.vehicle-card:hover {
    border-color: rgba(197, 160, 89, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.vehicle-card.selected {
    border-color: var(--accent-gold);
    background: rgba(197, 160, 89, 0.08);
}

.vehicle-card .select-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--accent-gold);
    border-radius: 50%;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s;
}

.vehicle-card.selected .select-badge {
    opacity: 1;
    transform: scale(1);
}

.vehicle-img {
    width: 100%;
    height: 180px; 
    object-fit: cover; /* Fill the width completely */
    object-position: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 0; /* Removing padding to maximize size */
    box-sizing: border-box;
}

.vehicle-info {
    padding: 18px;
}

.vehicle-info h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.vehicle-info p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-gray);
}

.vehicle-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #777;
}

.vehicle-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vehicle-meta i {
    color: var(--accent-gold);
}

/* =============================================
   BOOKING FOOTER / CTA
============================================= */
.booking-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-continue {
    width: 100%;
    max-width: 400px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #b48b32 0%, #d4af54 100%);
    border: none;
    border-radius: 50px;
    color: #000;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(180, 139, 50, 0.3);
}

.btn-continue:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(180, 139, 50, 0.4);
}

.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
    color: #777;
}

.secure-badge i {
    color: var(--accent-gold);
}

/* =============================================
   MOBILE MAP CONTAINER (Hidden on Desktop)
============================================= */
.mobile-map-container {
    display: none;
}

/* =============================================
   RESPONSIVE: TABLET (1024px and below)
============================================= */
@media (max-width: 1024px) {
    .booking-page-wrapper {
        display: block;
        padding-top: 70px;
    }

    .booking-left-panel {
        width: 100%;
        padding: 25px 20px;
    }

    /* Hide desktop map sidebar */
    .booking-right-panel {
        display: none;
        position: relative;
        height: auto;
    }

    /* Show mobile map */
    .mobile-map-container {
        display: block;
        width: 100%;
        height: 220px;
        background: #0a0a0a;
        border-radius: 16px;
        margin: 25px 0;
        overflow: hidden;
        border: 1px solid var(--border-color);
        position: relative;
    }

    .mobile-map-container #bookingMapMobile {
        width: 100%;
        height: 100%;
    }

    .mobile-map-container .map-trip-info {
        top: 10px;
        right: 10px;
        padding: 10px 14px;
        min-width: auto;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .mobile-map-container .map-trip-info p {
        font-size: 13px;
        margin: 0;
        color: #374151;
    }

    .input-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .booking-header h1 {
        font-size: 28px;
    }
}

/* =============================================
   RESPONSIVE: MOBILE (768px and below)
============================================= */
@media (max-width: 768px) {
    .booking-page-wrapper {
        padding-top: 65px;
    }

    .booking-left-panel {
        padding: 20px 16px;
    }

    .booking-header {
        margin-bottom: 25px;
    }

    .booking-header h1 {
        font-size: 24px;
    }

    .booking-subtitle {
        font-size: 14px;
    }

    /* Trip tabs - stack vertically or scroll */
    .trip-type-tabs {
        display: flex;
        width: 100%;
        padding: 5px;
        border-radius: 16px;
        overflow-x: auto;
        gap: 5px;
    }

    .trip-tab {
        padding: 12px 16px;
        font-size: 12px;
        flex: 1;
        text-align: center;
        min-width: max-content;
    }

    /* Form controls */
    .form-control {
        padding: 14px 40px 14px 45px;
        font-size: 14px;
    }

    .form-group label {
        font-size: 12px;
    }

    /* Split form groups stack on mobile */
    .form-group-split {
        flex-direction: column;
        gap: 0;
    }

    .form-group-split .form-group {
        margin-bottom: 20px;
    }

    /* Mobile map */
    .mobile-map-container {
        height: 180px;
        margin: 20px 0;
        border-radius: 12px;
    }

    /* Vehicle grid - single column */
    .vehicles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .vehicle-card {
        border-radius: 12px;
    }

    .vehicle-img {
        height: 140px;
    }

    .vehicle-info {
        padding: 15px;
    }

    /* Vehicle categories scroll */
    .vehicle-categories {
        gap: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .vehicle-categories::-webkit-scrollbar {
        display: none;
    }

    .cat-tab {
        font-size: 13px;
    }

    /* CTA button */
    .btn-continue {
        padding: 16px 30px;
        font-size: 16px;
    }

    .booking-footer {
        margin-top: 30px;
        padding-top: 25px;
    }

    .secure-badge {
        font-size: 12px;
    }

    /* Custom time picker adjustments */
    .custom-time-picker {
        height: 200px;
    }

    .time-slot {
        padding: 8px 6px;
        font-size: 13px;
    }
}

/* =============================================
   RESPONSIVE: SMALL MOBILE (480px and below)
============================================= */
@media (max-width: 480px) {
    .booking-left-panel {
        padding: 15px 12px;
    }

    .booking-header h1 {
        font-size: 22px;
    }

    .trip-type-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .trip-type-tabs::-webkit-scrollbar {
        display: none;
    }

    .trip-tab {
        padding: 10px 14px;
        font-size: 11px;
    }

    .form-control {
        padding: 12px 35px 12px 42px;
        font-size: 14px;
        border-radius: 10px;
    }

    .input-icon {
        font-size: 16px;
        left: 14px;
    }

    .mobile-map-container {
        height: 160px;
    }

    .vehicle-img {
        height: 130px;
    }

    .btn-continue {
        padding: 15px 25px;
        font-size: 15px;
        border-radius: 12px;
    }
}

/* =============================================
   UTILITY CLASSES
============================================= */
.datetime-row .form-group {
    margin-bottom: 0;
}

/* Hide footer on booking page for app-like feel (optional) */
.booking-page-wrapper ~ .footer {
    /* display: none; */
}

/* Leaflet map styling */
.leaflet-container {
    background: #f8fafc !important;
    font-family: inherit;
}

.leaflet-control-attribution {
    display: none !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #fff !important;
    color: #374151 !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
    background: #f3f4f6 !important;
}

.leaflet-control-zoom-in {
    border-bottom: 1px solid #e5e7eb !important;
}

/* Route line styling */
.leaflet-interactive {
    stroke: #3b82f6 !important;
}

/* =============================================
   NOTIFICATIONS (Added)
============================================= */
.hourly-notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    background: #ffffff;
    border-left: 4px solid var(--accent-gold);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 320px;
    max-width: 90%;
}

.hourly-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.hourly-notification .icon-box {
    width: 40px;
    height: 40px;
    background: rgba(197, 160, 89, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hourly-notification .icon-box i {
    color: var(--accent-gold);
    font-size: 18px;
}

.hourly-notification .content h4 {
    margin: 0;
    font-size: 16px;
    color: #111;
    font-weight: 700;
    margin-bottom: 2px;
}

.hourly-notification .content p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.hourly-notification .close-btn {
    margin-left: auto;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    transition: color 0.3s;
}

.hourly-notification .close-btn:hover {
    color: #333;
}
