/* Page edges stay fixed. Tables, tabs and photo strips keep their own scroll axes. */
@media screen and (max-width: 1024px), screen and (any-pointer: coarse) {
    html:root,
    html:root > body {
        overscroll-behavior: none;
    }

    html:root {
        overflow-x: clip;
    }

    html:root > body:has(> .container-fuild, > #pv, > #dt-frame-host),
    body > .container-fuild {
        min-inline-size: 0;
        max-inline-size: 100%;
        overflow-x: clip;
    }

    html:root:has(> body > #hmpcAdminApp) {
        overflow: hidden;
    }

    html:root:not(:has(> body > #hmpcAdminApp)),
    #hmpcPage {
        scrollbar-gutter: stable;
    }

    #hmpcPage {
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: none;
    }

    #hmpcModuleWorkspace,
    #hmpcModuleWorkspace > .hmpc-module-mount {
        min-inline-size: 0;
        max-inline-size: 100%;
    }

    html:root:has(dialog:modal, body.modal-open, .offcanvas.show),
    html:root:has(dialog:modal, body.modal-open, .offcanvas.show) > body {
        overflow: hidden;
    }

    #hmpcAdminApp:is(.is-drawer-open, :has(#hmpcCommand.is-open, #hmpcControlDrawer.is-open)) #hmpcPage,
    body:has(dialog:modal, .modal.show, .offcanvas.show) #hmpcPage,
    #hmpcPage:has(.hmpc-module-mount:not([hidden]) :is([role="dialog"][aria-modal="true"][aria-hidden="false"], [role="dialog"][aria-modal="true"].is-open, #payModal:not(.hidden):not([hidden]))),
    html:root:has(#dt-frame-host :is([role="dialog"][aria-hidden="false"], #payModal:not(.hidden):not([hidden]))) {
        overflow-y: hidden;
    }

    dialog:modal,
    .modal.show,
    .offcanvas.show,
    .hmpc-mobile-menu__body,
    .hmpc-builder-dialog__body,
    .hmpc-product-lightbox__scroll,
    .hmpc-sidebar-scroll,
    .hmpc-command-results,
    .hmpc-control-body {
        overscroll-behavior: none;
    }

    .hmpc-tab-strip .hmpc-tabs,
    .hmpc-table-scroll,
    .table-responsive,
    .pagination,
    .hmpc-product-gallery__thumbs,
    #dt-report :is(.dr-preset, .dr-viewbar) {
        overscroll-behavior-x: none;
    }
}
