/* Copy all CSS from previous answer – keep exactly the same */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui;
}

body {
    background: linear-gradient(145deg, #f5f7fc 0%, #eef2f8 100%);
    min-height: 100vh;
    padding: 2rem 1.5rem;
}

.booking-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.booking-form-panel {
    flex: 1.4;
    min-width: 360px;
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.map-panel {
    flex: 1;
    min-width: 320px;
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    max-height: calc(100vh - 4rem);
    overflow: hidden;
}

.map-header {
    padding: 1rem 1.25rem;
    background: #000F83;
    color: white;
    font-weight: 600;
}

#rideMap {
    height: 380px;
    width: 100%;
    background: #e9eef3;
}

.form-header {
    background: #000F83;
    padding: 1.2rem 1.8rem;
    color: white;
}

.form-header h2 {
    font-weight: 700;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-fields {
    padding: 1.8rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.input-group {
    margin-bottom: 1.2rem;
    flex: 1;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.95rem;
}

.checkbox-group {
    background: #f9fafc;
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ride-options,
.payment-options {
    margin: 1.5rem 0 1rem;
}

.ride-cards,
.payment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.ride-card,
.payment-card {
    background: #f9fafc;
    border: 1.5px solid #edf2f7;
    border-radius: 20px;
    padding: 12px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ride-card.active,
.payment-card.active {
    background: #000F83;
    color: white;
}

.estimate-section {
    background: #fef9e6;
    border-radius: 24px;
    padding: 1rem;
    margin: 1.2rem 0;
    display: flex;
    justify-content: space-between;
    border-left: 4px solid #F8AD08;
}

.fare-value {
    font-weight: 800;
    font-size: 1.8rem;
    color: #000F83;
}

.btn-estimate,
.btn-book {
    width: 100%;
    padding: 12px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

.btn-estimate {
    background: #000F83;
    color: white;
    margin: 0.5rem 0;
}

.btn-book {
    background: #F8AD08;
    color: #000;
    margin: 0.8rem 0;
    box-shadow: 0 2px 12px rgba(248, 173, 8, 0.4);
}

.btn-book.disabled {
    background: #d1d5db;
    pointer-events: none;
    opacity: 0.7;
}

.error-message {
    color: #e53e3e;
    background: #fff0f0;
    border-radius: 40px;
    padding: 8px;
    display: none;
    margin-top: 8px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-card {
    background: white;
    max-width: 480px;
    width: 90%;
    border-radius: 36px;
    padding: 24px;
    text-align: center;
}



.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
    padding: 12px 20px;
    border-radius: 40px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
}

.btn-primary {
    background: #000F83;
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}


.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    /* 👈 push it below input */
    left: 0;
    margin-top: 6px;
    /* small spacing */
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.autocomplete-item:hover {
    background: #f1f5f9;
}

.input-group {
    position: relative;
}

.autocomplete-dropdown {
    border: 1px solid #e2e8f0;
}

.autocomplete-item {
    border-bottom: 1px solid #f1f5f9;
}

.autocomplete-item:last-child {
    border-bottom: none;
}


/* ========== MOBILE RESPONSIVE UPGRADES ========== */
/* Improved touch targets, better spacing, responsive map, and overall mobile experience */

/* Base adjustments for small devices */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .booking-container {
        gap: 1rem;
    }

    .booking-form-panel,
    .map-panel {
        border-radius: 24px;
    }

    .form-header {
        padding: 1rem 1.25rem;
    }

    .form-header h2 {
        font-size: 1.4rem;
        gap: 8px;
    }

    .form-fields {
        padding: 1.25rem;
    }

    .form-row {
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .input-group {
        margin-bottom: 1rem;
    }

    .input-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    /* Larger tap targets for inputs, selects, textarea (16px min prevents zoom on iOS) */
    .input-group input,
    .input-group select,
    .input-group textarea {
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 20px;
    }

    .checkbox-group {
        padding: 10px 12px;
        gap: 12px;
    }

    .checkbox-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.9rem;
    }

    /* Ride & Payment cards - bigger, easier to tap */
    .ride-cards,
    .payment-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .ride-card,
    .payment-card {
        padding: 12px 8px;
        border-radius: 18px;
        cursor: pointer;
        transition: all 0.2s;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size: 0.85rem;
    }

    .ride-card i,
    .payment-card i {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .ride-name,
    .payment-name {
        font-weight: 700;
        font-size: 0.9rem;
    }

    .ride-price-desc,
    .payment-desc {
        font-size: 0.7rem;
    }

    /* Estimate section becomes stacked on very small screens */
    .estimate-section {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 1rem;
    }

    .estimate-section>div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .distance-value,
    .fare-value {
        font-size: 1.4rem;
    }

    /* Buttons: bigger and easier to tap */
    .btn-estimate,
    .btn-book {
        padding: 14px 12px;
        font-size: 1rem;
    }

    /* Map panel adjustments */
    .map-panel {
        position: relative;
        top: 0;
        max-height: none;
        margin-top: 0.5rem;
    }

    .map-header {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    #rideMap {
        height: 280px;
    }

    /* Modal improvements for mobile */
    .modal-card {
        width: 92%;
        max-width: 92%;
        padding: 1.25rem;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 28px;
    }

    .modal-card h3 {
        font-size: 1.3rem;
    }

    .modal-card .btn-primary,
    .modal-card .btn-secondary {
        display: block;
        width: 100%;
        margin: 8px 0;
        padding: 12px;
        font-size: 1rem;
    }

    /* Autocomplete dropdown mobile friendly */
    .autocomplete-dropdown {
        max-height: 180px;
        font-size: 14px;
    }

    .autocomplete-item {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
}

/* Extra small devices (phones under 480px) */
@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    .booking-container {
        gap: 0.8rem;
    }

    .form-header h2 {
        font-size: 1.2rem;
    }

    .form-fields {
        padding: 1rem;
    }

    .ride-cards,
    .payment-cards {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .ride-card,
    .payment-card {
        padding: 10px 6px;
        min-height: 70px;
    }

    .ride-card i,
    .payment-card i {
        font-size: 1.2rem;
    }

    .ride-name,
    .payment-name {
        font-size: 0.8rem;
    }

    #rideMap {
        height: 240px;
    }

    .estimate-section {
        padding: 0.8rem;
    }

    .distance-value,
    .fare-value {
        font-size: 1.2rem;
    }

    .btn-estimate,
    .btn-book {
        padding: 12px 10px;
        font-size: 0.9rem;
    }

    /* Make sure modals have comfortable padding */
    .modal-card {
        padding: 1rem;
    }

    .modal-card .btn-primary,
    .modal-card .btn-secondary {
        padding: 10px;
    }
}

/* Prevent horizontal scroll on all devices */
body {
    overflow-x: hidden;
}

/* Improved touch feedback for interactive elements */
.ride-card:active,
.payment-card:active,
.btn-estimate:active,
.btn-book:active,
.autocomplete-item:active {
    transform: scale(0.98);
    transition: transform 0.05s ease;
}

/* Ensure map container doesn't overflow on orientation change */
#rideMap {
    width: 100%;
    background: #e9eef3;
    transition: height 0.2s ease;
}

/* Better spacing for form rows inside small flex */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-row .input-group {
        width: 100%;
    }
}

/* Styling for bank transfer modal text */
.modal-card .text-sm {
    font-size: 0.8rem;
    color: #4a5568;
}