/* Mobile Overflow Fix - Prevent horizontal scrolling on mobile devices */

/* Ensure html and body don't overflow horizontally */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Fix for listing section to prevent overflow */
@media (max-width: 1027px) {
    /* Width constraints to prevent layout shift - always applied on mobile */
    .listing--section,
    .listing--section__inner,
    .listing__content,
    .listing-layout {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Selective overflow control - disabled when map or dropdowns are active to prevent clipping */
    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing--section,
    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing--section__inner,
    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing__content,
    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing-layout {
        overflow-x: hidden;
    }

    /* Ensure child elements respect container width */
    .listing__content-body,
    .listing__content--inner {
        max-width: 100%;
        box-sizing: border-box;
    }

    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing__content-body,
    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing__content--inner {
        overflow-x: hidden;
    }

    /* Fix for venue cards container - keep width stable to prevent shift */
    .listing__content-cards,
    .listing__content-static-cards {
        max-width: 100%;
        box-sizing: border-box;
    }

    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing__content-cards,
    body:not(.listing-map__enabled):not(.dropdown-active-mobile) .listing__content-static-cards {
        overflow-x: hidden;
    }
}
