// App
/*============================================================== 
 For all pages 
 ============================================================== */

#main-wrapper {
    width: 100%;
    overflow: hidden;
}

.page-wrapper {
    background: $body-bg;
    position: relative;
    transition: 0.2s ease-in; 
}

.page-wrapper>.container-fluid {
    padding: 20px;
    //height: 100vh;
    min-height: 100vh;
}

/*******************
 Footer
*******************/

.footer {
    padding: 15px 20px;
}

/*******************
 Vertical layout
*******************/

#main-wrapper[data-layout="vertical"] {
    /*Vertical*/
    .topbar .top-navbar .navbar-header {
        //width: $sidebar-width-full;
        transition: 0.2s ease-in;
    }
    /*sidebar type*/
    &[data-sidebartype="full"] {
        .page-wrapper {
            margin-left: $sidebar-width-full;
        }
    }
    /*Sidebar position*/
    &[data-sidebar-position="fixed"] {
        .topbar .top-navbar .navbar-header {
            position: fixed;
            z-index: 10;
        }
        .left-sidebar {
            position: fixed;
        }
    }
    /*Header position*/
    &[data-header-position="fixed"] {
        .topbar {
            position: fixed;
            width: 100%;
        }
        .page-wrapper {
            padding-top: $topbar-height;
        }
    }
}

/*******************
 Vertical responsive layout
*******************/

@include media-breakpoint-up(md) {
    #main-wrapper[data-layout="vertical"] {
        /*Vertical*/
        &[data-sidebartype="full"] {
            .topbar .top-navbar .navbar-header {
                width: $sidebar-width-full;
            }
        }
        /*Sidebar position*/
        &[data-sidebar-position="fixed"][data-sidebartype="full"] {
            .topbar .top-navbar .navbar-collapse {
                margin-left: $sidebar-width-full;
            }
        }
        &[data-sidebar-position="fixed"][data-sidebartype="mini-sidebar"] {
            .topbar .top-navbar .navbar-collapse {
                margin-left: $sidebar-width-mini;
            }
        }
        /*Vertical with mini-sidebar*/
        &[data-sidebartype="mini-sidebar"] {
            .topbar .top-navbar .navbar-header {
                width: $sidebar-width-mini;
                .navbar-brand {
                    .logo-text {
                        display: none;
                    }
                }
                &.expand-logo {
                    width: $sidebar-width-full;
                    .navbar-brand {
                        .logo-text {
                            display: block;
                        }
                    }
                }
            }
        }
        /*Fixed sidebar with minisidebar*/
        &[data-sidebar-position="fixed"][data-sidebartype="mini-sidebar"] {
            .topbar .top-navbar .navbar-collapse {
                margin-left: $sidebar-width-mini;
            }
        }
        &[data-sidebartype="mini-sidebar"] {
            .page-wrapper {
                margin-left: $sidebar-width-mini;
            }
            .sidebar-nav {
                .hide-menu,
                .has-arrow:after {
                    display: none;
                }
                .nav-small-cap {
                    justify-content: center;
                }
            }
            .left-sidebar {
                width: $sidebar-width-mini;
                .upgrade-btn {
                    display: none;
                }
                &:hover {
                    width: $sidebar-width-full;
                    .sidebar-nav {
                        .hide-menu,
                        .has-arrow:after {
                            display: block;
                        }
                        .nav-small-cap {
                            justify-content: flex-start;
                        }
                        .upgrade-btn {
                            display: block;
                        }
                    }
                }
            }
        }
    }
}

@media(max-width:766px) {
    #main-wrapper {
        &[data-sidebartype="mini-sidebar"] {
            .left-sidebar {
                left: -$sidebar-width-full;
            }
        }
        &.show-sidebar {
            .left-sidebar {
                left: 0;
            }
        }
        &[data-layout="vertical"][data-sidebar-position="fixed"] {
            .topbar .top-navbar {
                .navbar-collapse {
                    position: relative;
                    top: $topbar-height;
                }
            }
        }
        /*Header position*/
        &[data-layout="vertical"][data-header-position="fixed"][data-sidebar-position="fixed"] {
            .topbar .top-navbar {
                .navbar-collapse {
                    position: relative;
                    top: $topbar-height;
                }
            }
        }
    }
}