/* Global overflow prevention to completely block horizontal scroll */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
}

.main-wrapper {
    max-width: 100% !important;
    overflow-x: hidden !important;
    width: 100%;
}

@media (max-width: 991.98px) {
    .hero-section {
        text-align: center;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .hero-section .text-start {
        text-align: center !important;
    }

    .hero-section .d-flex {
        justify-content: center;
    }
    
    .main-header .navbar-nav {
        padding: 1rem 0;
        text-align: center;
    }
    
    .nav-link::after {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2.2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-section {
        min-height: auto;
    }
}

/* Fix Bootstrap row overflow on mobile viewports */
@media (max-width: 767.98px) {
    .row {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden !important;
    }
}

/* Booking Wizard Mobile UX Enhancements */
@media (max-width: 767.98px) {
    /* Reduce header section padding and typography size */
    .py-5.bg-light.border-bottom {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }
    .py-5.bg-light.border-bottom h1 {
        font-size: 1.6rem !important;
        margin-bottom: 0.25rem !important;
    }
    .py-5.bg-light.border-bottom p.lead {
        font-size: 0.85rem !important;
    }

    /* Reduce spacing around main wizard card */
    .py-5.bg-white {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .card.rounded-custom.bg-light {
        padding: 1rem !important;
    }

    /* Progress bar compacting */
    .step-dot {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85rem !important;
    }
    #bookingProgressBar hr {
        top: 18px !important;
    }

    /* Step 1 City Selection Compactness */
    .booking-step label.btn-outline-dark {
        flex-direction: row !important;
        min-height: 60px !important;
        padding: 0.5rem 1rem !important;
        gap: 10px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .booking-step label.btn-outline-dark i {
        font-size: 1.25rem !important;
        margin-bottom: 0 !important;
    }
    .booking-step label.btn-outline-dark span {
        font-size: 0.85rem !important;
        padding: 0 !important;
    }
    #step1 .row,
    #slotsWrapper.row {
        --bs-gutter-x: 6px !important;
        --bs-gutter-y: 6px !important;
        row-gap: 6px !important;
    }
    #step1 .row > div,
    #slotsWrapper > div {
        margin-top: 0 !important;
        padding-top: 3px !important;
        padding-bottom: 3px !important;
        padding-left: 3px !important;
        padding-right: 3px !important;
    }
    #step1 .text-end {
        display: none !important;
    }

    /* Step 3 Time Slots Compactness */
    .slot-radio + label.btn {
        font-size: 0.72rem !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        white-space: nowrap !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .slot-radio + label.btn i {
        display: none !important;
    }

    /* Ensure Date Picker is full width and well styled in iOS Safari */
    input[type="date"].form-control,
    input#bookingDate {
        display: block !important;
        width: 100% !important;
        min-height: 48px !important;
        font-size: 1rem !important;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Flex layout for wizard step buttons side-by-side on mobile without overlapping */
    .booking-step .d-flex.justify-content-between,
    .booking-step .d-flex {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 10px !important;
        margin-top: 0 !important;
    }
    .booking-step .btn-lg {
        width: auto !important;
        margin-bottom: 0 !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        font-size: 0.9rem !important;
        border-radius: 50px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .booking-step .btn-prev {
        width: 40% !important;
    }
    .booking-step .btn-next,
    .booking-step button[type="submit"] {
        width: 60% !important;
    }
}

