/**
 * Mobile: prevent horizontal page scroll (empty strip on the right, bottom scrollbar).
 */

@media (max-width: 991.98px) {
    html {
        overflow-x: hidden;
        max-width: 100%;
    }

    body.digibank-neo-ui {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
    }

    body.digibank-neo-ui .layout,
    body.digibank-neo-ui .layout .page-container,
    body.digibank-neo-ui main.fix,
    body.digibank-neo-ui footer,
    body.digibank-neo-ui .footer-section,
    body.digibank-neo-ui .footer-bottom,
    body.digibank-neo-ui .footer-area,
    body.digibank-neo-ui .footer-style-two {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Admin: only tables scroll sideways, not the whole page */
    body.digibank-neo-ui .layout .page-container {
        padding-left: 0 !important;
        max-width: 100%;
    }

    body.digibank-neo-ui .layout .site-table.table-responsive,
    body.digibank-neo-ui .layout .site-datatable {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* User dashboard: clip shell; tables keep their own scroll */
    body:has(.main-user-dahboard) {
        overflow-x: hidden !important;
    }

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

    .main-user-dahboard .site-table,
    .main-user-dahboard .site-datatable,
    .main-user-dahboard .data-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Corporate / default footer bar — clip decorative logo overflow */
    .footer-bottom {
        overflow: hidden;
    }

    .footer-bottom .footer-logo::before {
        max-width: calc(100vw - 24px);
    }

    .exchange-marquee {
        max-width: 100%;
    }

    #ruby-widget-root .ruby-panel {
        max-width: calc(100vw - 32px);
        right: 0 !important;
    }
}

@media (max-width: 575.98px) {
    body.digibank-neo-ui .layout .site-table .table-filter > .filter {
        grid-template-columns: 1fr !important;
    }

    .footer-bottom .footer-logo {
        max-width: calc(100% - 24px);
    }
}
