/*=============================================
=                   Sheet 0 - Whole app container                  =
=============================================*/

#S0 {}


/*============  End of Sheet 0 - Whole app container =============*/

/*=============================================
=                   Sheet 1 - App Navigation                   =
=============================================*/


#S1 {
    min-width: 4.6875rem;
    max-width: 4.6875rem;
    height: 100vh;
    min-height: 570px;
    background-color: var(--bs-sidebar-bg);
    display: flex;
    z-index: 9;
    box-shadow: 0 2px 4px rgba(15, 34, 58, 0.12);
}

@media (max-width: 991.98px) {
    #S1 {
        position: fixed;
        bottom: 0;
        height: 3.75rem;
        min-width: 100%;
        min-height: auto;
        display: block;
        border-top: 1px solid var(--bs-border-color);
    }
}

#S1 .navbar-brand-box {
    text-align: center;
}

@media (max-width: 991.98px) {
    #S1 .navbar-brand-box {
        display: none;
    }
}

#S1 .navbar-brand-box .logo {
    line-height: 4.375rem;
    padding: 0 !important;
    margin: 0 !important;
}
#S1 .side-menu-nav {
    gap: 0.4rem;
}
/*
#S1 .side-menu-nav .nav-item {
    margin: 0.4rem 0;
}
*/
@media (max-width: 991.98px) {
    #S1 .side-menu-nav .nav-item {
        flex-basis: 0;
        flex-grow: 1;
        margin: 5px 0;
    }
}

#S1 .side-menu-nav .nav-item .nav-link {
    text-align: center;
    font-size: 1rem;
    color: var(--bs-sidebar-menu-item-color);
    width: 3.5rem;
    height: 3.5rem;
    margin: 0px auto;
    border-radius: 8px;
    padding: 0;
}

@media (max-width: 991.98px) {
    #S1 .side-menu-nav .nav-item .nav-link {
        font-size: 20px;
        width: 3rem;
        height: 3rem;
        line-height: 3rem;
    }
}

#S1 .side-menu-nav .nav-item .nav-link.active {
    background-color: var(--bs-sidebar-menu-item-active-bg);
    color: var(--bs-primary);
}

#S1 .side-menu-nav .nav-item.show>.nav-link {
    background-color: var(--bs-sidebar-menu-item-active-bg);
    color: var(--bs-primary);
}

#S1 .side-menu-nav .profile-user {
    height: 36px;
    width: 36px;
    background-color: var(--bs-border-color);
    padding: 3px;
}


/*============  End of Sheet 1 - App Navigation  =============*/

/*=============================================
=                   Sheet 2 -                   =
=============================================*/


#S2-Wrapper {
    height: 100vh;
    /* background-color: var(--bs-sidebar-sub-bg); */
}

@media (min-width: 992px) {
    #S2-Wrapper {
        min-width: 23.75rem;
        max-width: 23.75rem;
    }
}

#S2-Wrapper.s2-full-width {
    width: 100%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

@media (min-width: 1200px) {
    #S2-Wrapper.s2-full-width {
        max-width: 1140px
    }
}

@media (min-width: 1400px) {
    #S2-Wrapper.s2-full-width {
        max-width: 1320px
    }
}


#S2-Wrapper.s2-full-width~#S3-Wrapper {
    display: none
}

#S2-Wrapper,
#S2 {
    height: 100vh;
}

#S2 {
    overflow-x: hidden;
    overflow-y: auto;
}

#S2-Body {
    padding-top: 0;
    padding-bottom: 4em;
}


/*============  End of Sheet 2 -  =============*/

/*=============================================
=                   Sheet 3 -                   =
=============================================*/


#S3-Body {
    overflow-x: hidden;
    overflow-y: auto;
}



#S3-Body {
    /*     height: calc(100vh - 4.5rem); */
}



#S3-Body {
    margin-top: 0;
    padding: 5em 1em;
    /*     height: calc(100vh - 4.5rem - 4.25rem); */
    height: 100vh;
    flex: 1 0 auto;
}

@media (max-width: 576px) {
    #S3-Body {
        padding: 5em 0;
    }
}

#S3 {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    
}

#S3-Header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
}

#S3-Footer {
    position: sticky;
    bottom: 0;
    transition: all .3s ease-in-out;
    max-height: calc(4.5rem * 3);
    background-color: var(--bs-body-bg);
}

#S3-Footer.compact {
    height: 4.5rem;
}

#S3-Footer textarea {
    min-height: 3em;
    max-height: 9em;
}

#S3-Footer a.btn .badge {
    height: fit-content;
}

#S3-Wrapper {
    background-color: var(--bs-body-bg);
    box-shadow: 0 2px 4px rgba(15, 34, 58, 0.12);
    transition: all 0.4s;
}

@media (max-width: 991.98px) {
    #S3-Wrapper {
        position: fixed;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        visibility: hidden;
        transform: translateX(100%);
        z-index: 99;
    }

    #S3-Wrapper.user-chat-show {
        visibility: visible;
        transform: translateX(0);
    }
}


/*============  End of Sheet 3 -  =============*/

/*=============================================
=                   Sheet 4 - Auxiliary content container                   =
=============================================*/


#S4 {
    height: 100vh;
    background-color: var(--bs-theme-component-bg, var(--bs-white));
    display: none;
    min-width: 23.75rem;
    max-width: 23.75rem;
}

@media (min-width: 992px) {
    #S4 {
        border-right: 4px solid var(--bs-border-color);
    }
}

@media (max-width: 1199.98px) {
    #S4 {
        position: fixed;
        right: 0;
        top: 0;
        z-index: 99;
    }
}

@media (max-width: 575.98px) {
    #S4 {
        min-width: 100%;
    }
}


#S4 {
    display: block;
    width: 0;
    min-width: unset;
    overflow: hidden;
    transition: all .3s ease-in-out;
}

#S4.show {
    width: 100%;
}

#S4-Header,
#S4-Body {
    min-width: 23.75rem;
    max-width: 23.75rem;
    width: 100%;
}

@media (max-width: 575px) {

    #S4,
    #S4-Header,
    #S4-Body {
        max-width: 100vw;
        max-width: 100dvw;
    }
}

#S4-Body {
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

#S4-Header+#S4-Body {
    height: calc(100vh - 60px);
}

/*============  End of Sheet 4 - Auxiliary content container  =============*/

/*=============================================
=                   Sheet 5 - Modal container                   =
=============================================*/

#S5_post_reply_modal {
    --bs-offcanvas-height: max-content;
    max-height: 50vh;
    background-color: var(--bs-theme-component-bg, var(--bs-white));
    position: sticky;
}

#S5_post_reply_modal.maximize {
    --bs-offcanvas-height: calc(100vh - 4.5rem);
    max-height: calc(100vh - 4.5rem);
}

#S5_post_reply_modal.maximize textarea {
    height: calc(100vh - 4.5rem - 9.5rem);
    resize: none;
}


#S5_post_reply_modal.show .offcanvas-manual-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/*============  End of Sheet 5 - Modal container  =============*/

/*=============================================
=                   Sheet 6 - Fullscreen content container                   =
=============================================*/

#S6 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: var(--bs-body-bg, white);
    display: none;
}

#S6.show {
    display: block
}

/*============  End of Sheet 6 - Fullscreen content container  =============*/

/*=============================================
=                   折叠屏适配                   =
=============================================*/

@media (min-width:768px) and (max-width:992px) {
    #S0 {
        display: flex;

    }

    #S1 {
        margin-left: 0 !important;
        margin-right: .25rem !important;
        flex-direction: column !important;
        height: 100vh;
        display: flex;
        max-width: 4rem;
        min-width: 4rem;
        position: relative;
    }

    #S2-Wrapper {
        min-width: calc(50vw - 4rem);
        max-width: calc(50vw - 4rem);
    }

    #S3-Wrapper {
        position: relative;
        transform: translateY(0);
        visibility: visible;
    }

    #S4 {
        max-width: 50vw;
    }

    #S4-Header,
    #S4-Body {
        min-width: 50vw;
        max-width: 50vw;
    }
}

/*============  End of 折叠屏适配  =============*/