/* Mobile map container */
.mobile-map-container {
    width: 100%;
    height: 250px;
    position: relative;
    background-color: #f5f5f5;
}

/* Mobile map container - additional styles */
.mobile-map-container {
    height: 30vh;
    max-height: 250px;
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
}

#my-map-mobile {
    height: 100%;
    width: 100%;
}

/* Mobile layout specific styles */
@media (max-width: 991px) {
    /* Theme reset sets overflow-x: clip, which leaves the page unable to scroll. */
    body {
        overflow-x: hidden !important;
        overflow-anchor: none;
    }

    /* Main container. overflow stays visible so the sticky map can pin; the theme header and footer stay in the page. */
    .row.g-0.d-flex.flex-nowrap {
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
        overflow: visible;
    }
    
    /* Listings stay in normal flow so the page has one scroll: header, sticky map, tickets, then the theme footer. */
    .content-wrapper {
        display: block;
        width: 100%;
        height: auto;
        max-height: none;
        background-color: #fff;
        padding-bottom: 0;
        padding-top: 0;
        overflow: visible !important;
        max-width: 100vw;
    }

    .mobile-ticket-list {
        overflow: visible !important;
        overscroll-behavior: auto;
        -webkit-overflow-scrolling: auto;
    }
    
    /* Event details */
    .mobile-event-details {
        display: block !important;
        background-color: #f8f9fa;
        padding: 10px 15px;
        border-bottom: 1px solid #ddd;
    }
    
    .mobile-event-details h5 {
        font-size: 14px;
        margin-bottom: 3px;
        font-weight: 600;
    }
    
    .mobile-event-details p {
        font-size: 12px;
        margin-bottom: 3px;
        color: #555;
    }
    
    /* Mobile ticket container - full width; header padding matches card padding */
    .mobile-ticket-container {
        width: 100%;
        background-color: #fff;
    }
    .mobile-ticket-container .ticket-header {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Hide desktop elements */
    #right {
        display: none !important;
    }
    
    /* Hide desktop filters */
    .container-fluid.py-3.px-4.bg-light.border-bottom {
        display: none !important;
    }
    
    /* Hide search/filter bar */
    .sort-filter-container {
        display: none !important;
    }
}

/* Mobile ticket container */
.mobile-ticket-container {
    width: 100%;
    padding: 0;
    background-color: #fff;
    position: relative;
    z-index: 10;
}

.mobile-ticket-list {
    position: relative;
    z-index: 10;
    background-color: #fff;
    margin-bottom: 20px;
}

/* MOBILE EVENT DETAILS FIX */
/* Force display of event details on mobile */
@media (max-width: 991px) {
    .mobile-event-details {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-event-details h5, 
    .mobile-event-details p {
        display: block !important;
        visibility: visible !important;
    }
}

/* Mobile ticket container */
.mobile-ticket-container {
    width: 100%;
    padding: 0;
}

.mobile-ticket-list {
    margin-bottom: 20px;
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure ticket containers have no horizontal scrolling */
.group-seat-mobile,
.group-parking-mobile,
.selected-tickets-mobile,
.selected-parking-mobile,
.checkout-mobile,
.checkout-parking-mobile {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
@media (max-width: 991px) {
    .group-seat-mobile,
    .group-parking-mobile {
        overflow-x: visible;
    }
}

@media (max-width: 991px) {
    .group-seat-mobile-item,
    .group-parking-mobile-item {
        margin-bottom: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
        padding-left: 12px;
        padding-right: 12px;
    }
    .group-seat-mobile-item > div,
    .group-parking-mobile-item > div {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .group-seat-mobile-item .row,
    .group-parking-mobile-item .row {
        margin: 0;
        padding: 0;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100%;
        box-sizing: border-box;
    }
    .group-seat-mobile-item .row .col-8,
    .group-parking-mobile-item .row .col-8,
    .group-seat-mobile-item .row .col-4,
    .group-parking-mobile-item .row .col-4 {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .group-seat-mobile-item .row .col-4,
    .group-parking-mobile-item .row .col-4 {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Mobile checkout styling */
    .checkout-mobile .checkout-container,
    .checkout-parking-mobile .checkout-container {
        padding: 15px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
}