.main-wrapper.horizontal{
    &.collapsed{
        .sidebar{
            margin-left: 0;
            .navigation{
                margin-top: -100%;
                transition: margin-top 0.2s ease-in;
            }
        }
        .right-area {
            .main-content {
                margin-top: 0;
            }
        }
    }
    .sidebar {
        height: auto;
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            width: $full-sidebar-width;
        }
        .navigation {
            margin-top: $header-height;
            transition: margin-top 0.2s ease-in;
            margin-top: 0;
            position: fixed;
            padding: 0;
            top: $header-height;
            width: 100%;
            height: auto;
            z-index: 10;
            background-color: $sidemenu-bg;
            transition: width 0.2s;
            border-bottom: 1px solid $gray-200;
            & > ul {
                display: block;
                overflow: hidden;
                margin-bottom: 0;
                padding: 0;
                text-align: center;
                font-size: 0; // To remove extra whitespace between li's
                & > li {
                    display: inline-block;
                    a {
                        display: inline-block;
                        padding-top: 8px;
                        border-right: 1px solid $gray-200;
                        box-sizing: border-box;
                        width: 120px;
                        text-align: center;
                        line-height: 28px;
                        border-radius: 0;
                        span{ margin: 0 !important;}
                        span.caret {
                            display: none !important;
                        }
                        span.icon {
                            display: block;
                        }
                    }
                    
                    &:last-child {
                        & > a {
                            border: none;
                        }
                    }
                    ul {
                        position: fixed;
                        display: block;
                        height: 0;
                        overflow: hidden;
                        background-color: $sidemenu-bg;
                        transform: scaleY(0);
                        transform-origin: top;
                        transition: none;
                        margin-left: -1px;
                        li {
                            border: 0;
                            a {
                                padding: 4px 0 4px 0;
                            }
                        }
                    }
                    &:hover {
                        ul {
                            height: auto;
                            transform: scaleY(1);
                            transition: all 0.2s;
                            overflow: auto;
                            box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.075) !important;
                            li {
                                a {
                                    border: 1px solid $gray-200;
                                    border-top: none;
                                    width: 121px;
                                    span.icon {
                                        display: none;
                                    }
                                }
                                &:first-child {
                                    a {
                                        border-top: 1px solid $gray-200;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        .separator {
            display: none !important;
        }
    }
    &.without-icon {
        .sidebar {
            .navigation {
                &>ul {
                    &>li {
                        &>a {
                            padding: 5px;
                            line-height: 40px;
                            span.icon {
                                display: none;
                            }
                        }
                    }
                }
            }
        }
    }
    .right-area{
        margin-left: 0;
        .main-content {
            margin-top: 60px;
        }
    }
    @include media-breakpoint-down(md) {
        .sidebar{
            margin-left: 0;
            .navigation{
                margin-top: -100%;
                transition: margin-top 0.2s ease-in;
            }
        }
        .right-area {
            .main-content {
                margin-top: 0;
            }
        }
        &.collapsed {
            .sidebar {
                margin-left: 0;
                transition: none;
                .navigation {
                    margin-top: 0;
                    transition: margin-top 0.2s;
                }
            }
            .right-area {
                header {
                    margin-left: unset;
                }
                .main-content {
                    margin-top: 0;
                }
            } 
        }
    }
    @include media-breakpoint-up(md) {
        .right-area {
            header {
                margin-left: $full-sidebar-width;
            }
        }
    }
    // scroll on desktop
    @include media-breakpoint-up(md) {
        .sidebar{
            .navigation {
                white-space: nowrap;
                overflow: hidden;
                .navigation-arrow {
                    display: flex;
                    cursor: pointer;
                    position: absolute;
                    height: 100%;
                    width: 20px;
                    justify-content: center;
                    flex-direction: column;
                    top: 0;
                    font-size: 1.4em;
                    &.right {
                        right: 0;
                    }
                    &:hover{
                        color: $primary;
                        background-color: transparentize($primary, 0.9);
                    }
                }
                & > ul {
                    margin-left: 20px;
                    margin-right: 20px;
                    overflow-x: auto;
                    white-space: nowrap;
                }
            }
        }
    }
}