/**
 * Nurture EERP Dashboard Scroll Manager
 * Author: Anees Khan
 * Version: 1.0.3
 */

html.neerp-dsm-active,
html.neerp-dsm-active body{
    height: 100% !important;
    overflow: hidden !important;
}

html.neerp-dsm-active body.admin-bar{
    overflow: hidden !important;
}

.erp-dashboard-shell{
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 300px !important;
    overflow: hidden !important;
    align-items: stretch !important;
    gap: 0 !important;
    box-sizing: border-box !important;
}

.erp-dashboard-shell > .erp-dashboard-sidebar,
.erp-dashboard-shell > .erp-dashboard-content{
    align-self: stretch !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
}

.erp-dashboard-sidebar{
    position: relative !important;
    z-index: 2 !important;
    width: 300px !important;
    max-width: 300px !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #0F3A4E !important;
    border-right: 1px solid #E6EAF0 !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;

    /* Sidebar scrollbar hidden, but wheel/trackpad scrolling still works on hover. */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.erp-dashboard-sidebar::-webkit-scrollbar{
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.erp-dashboard-sidebar::-webkit-scrollbar-track,
.erp-dashboard-sidebar::-webkit-scrollbar-thumb{
    background: transparent !important;
}

.erp-dashboard-content{
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #F7F9FC !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

.erp-dashboard-content .elementor-widget-theme-post-content,
.erp-dashboard-content .elementor-widget-theme-post-content > .elementor-widget-container,
.erp-dashboard-content .elementor-widget-theme-post-content .elementor-widget-container{
    min-height: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Clean any old slider wrappers if old code left markup behind */
.erp-dashboard-sidebar .neerp-sidebar-content,
.erp-dashboard-sidebar .neerp-sidebar-track,
.erp-dashboard-sidebar .erp-sidebar-slider-track{
    transform: none !important;
    position: static !important;
    right: auto !important;
    width: auto !important;
    min-height: 0 !important;
}

.erp-dashboard-sidebar .neerp-sidebar-scrollbar,
.erp-dashboard-sidebar .neerp-sidebar-slider-ui,
.erp-floating-sidebar-btn,
.erp-slider-test-badge,
.erp-sidebar-slide-btn{
    display: none !important;
}

@media (max-width: 1024px){
    html.neerp-dsm-active,
    html.neerp-dsm-active body,
    html.neerp-dsm-active body.admin-bar{
        height: auto !important;
        overflow: auto !important;
    }

    .erp-dashboard-shell{
        display: block !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .erp-dashboard-sidebar{
        display: none !important;
    }

    .erp-dashboard-content{
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        overflow: visible !important;
    }
}
