/* TaxAI Ver.128.6 common sidebar layout fix */
:root{
    --taxai-sidebar-width:290px;
}

/* sidebar actual width */
.taxai-sidebar,
.taxai-common-sidebar,
.taxai-os-sidebar,
aside.taxai-sidebar{
    width:var(--taxai-sidebar-width) !important;
    min-width:var(--taxai-sidebar-width) !important;
    max-width:var(--taxai-sidebar-width) !important;
    box-sizing:border-box !important;
    flex-shrink:0 !important;
}

/* fixed sidebar support */
.taxai-sidebar,
.taxai-common-sidebar{
    left:0 !important;
}

/* main shell must start after sidebar */
.taxai-shell,
.taxai-layout,
.taxai-page-shell,
.taxai-app-shell,
.taxai-admin-shell{
    margin-left:var(--taxai-sidebar-width) !important;
    width:calc(100vw - var(--taxai-sidebar-width)) !important;
    max-width:calc(100vw - var(--taxai-sidebar-width)) !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
}

/* main content should never slide under sidebar */
.taxai-main,
.taxai-content,
.taxai-page-content,
.taxai-admin-main,
main.taxai-main{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:0 !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
}

/* cards/grids prevent horizontal overflow */
.taxai-main *,
.taxai-content *,
.taxai-page-content *{
    box-sizing:border-box;
}

.taxai-grid,
.taxai-pro-grid,
.taxai-card-grid,
.taxai-dashboard-grid{
    max-width:100% !important;
    min-width:0 !important;
}

/* mobile */
@media (max-width: 900px){
    :root{
        --taxai-sidebar-width:0px;
    }

    .taxai-sidebar,
    .taxai-common-sidebar,
    .taxai-os-sidebar,
    aside.taxai-sidebar{
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
        position:relative !important;
    }

    .taxai-shell,
    .taxai-layout,
    .taxai-page-shell,
    .taxai-app-shell,
    .taxai-admin-shell{
        margin-left:0 !important;
        width:100vw !important;
        max-width:100vw !important;
    }
}
