/*
 * Dashboard/OpenAPI scroll fix.
 * Public dashboard contains more chart panels than the 1080px viewport can show.
 * Keep the global shell fixed, but make the page content area the scroll container.
 */
@supports selector(:has(*)) {
    body:has(.oh-dashboard-analytics-page),
    body:has(.oh-openapi-guide-page) {
        height: 100vh !important;
        overflow: hidden !important;
    }

    .ke-shell:has(.oh-dashboard-analytics-page),
    .ke-shell:has(.oh-openapi-guide-page),
    .ke-shell-topnav:has(.oh-dashboard-analytics-page),
    .ke-shell-topnav:has(.oh-openapi-guide-page) {
        height: 100vh !important;
        min-height: 100vh !important;
        overflow: hidden !important;
    }

    .ke-main:has(.oh-dashboard-analytics-page),
    .ke-main:has(.oh-openapi-guide-page) {
        flex: 1 1 auto !important;
        height: calc(100vh - 58px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
        display: block !important;
    }

    .ke-content:has(.oh-dashboard-analytics-page),
    .ke-content:has(.oh-openapi-guide-page) {
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        display: block !important;
        align-content: normal !important;
        padding-bottom: 1.4rem !important;
        scrollbar-gutter: stable both-edges;
    }

    .ke-content:has(.oh-dashboard-analytics-page)::-webkit-scrollbar,
    .ke-content:has(.oh-openapi-guide-page)::-webkit-scrollbar {
        width: 10px;
    }

    .ke-content:has(.oh-dashboard-analytics-page)::-webkit-scrollbar-track,
    .ke-content:has(.oh-openapi-guide-page)::-webkit-scrollbar-track {
        background: rgba(219, 234, 254, .75);
        border-radius: 999px;
    }

    .ke-content:has(.oh-dashboard-analytics-page)::-webkit-scrollbar-thumb,
    .ke-content:has(.oh-openapi-guide-page)::-webkit-scrollbar-thumb {
        background: rgba(82, 111, 145, .65);
        border-radius: 999px;
        border: 2px solid rgba(219, 234, 254, .75);
    }

    .oh-dashboard-analytics-page,
    .oh-openapi-guide-page {
        min-height: max-content !important;
        height: auto !important;
        overflow: visible !important;
        padding-bottom: 1rem !important;
    }

    .oh-dashboard-analytics-page .oh-dashboard-wide-panel,
    .oh-dashboard-analytics-page .oh-dashboard-composite-grid {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
    }

    /* Stage 16 dashboard owns its main grid height so the map/charts fit one screen. */
    .oh-dashboard-analytics-page .oh-dashboard-chart-grid {
        min-height: 0 !important;
    }
}
