#layout-mainmenu-responsive-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    max-width: 100%;
    height: 100%;
    z-index: @zindex-popover + 1;
    overflow: hidden;
    transition: width .25s ease-in-out;

    nav.responsive-menu-pane {
        z-index: @zindex-popover + 2;
        background-color: @mainnav-bg;
        transition: margin .25s ease-in-out;
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-left: 1px solid rgba(255,255,255,0.1);
        // margin-right: -100%;

        .flex-display();
        .flex-direction-column();

        &.mainmenu-pane {
            box-shadow: -10px 0 10px rgba(0,0,0,0.2);
        }

        .menu-header {
            padding: 25px;
            .flex-fix();

            .mainmenu-item {
                .mainmenu-item-container {
                    padding-left: 50px;
                    white-space: nowrap;

                    .nav-icon {
                        left: 0;
                    }

                    .company-name, .user-name {
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }

                    .company-name {
                        font-size: @font-size-base + 2;
                    }

                    .user-name {
                        color: rgba(255,255,255,.7);
                        cursor: pointer;

                        &:hover {
                            color: @mainnav-color;
                        }
                    }
                }

                > a {
                    cursor: default;
                    pointer-events: none;
                    padding: 7px 10px 7px 43px;

                    .nav-icon {
                        line-height: 34px;
                        left: 0;
                        width: 30px;

                        .svg-icon {
                            height: 30px;
                            width: 30px;
                        }

                        i {
                            line-height: inherit;
                            font-size: 30px;
                        }
                    }

                    .counter {
                        display: none;
                    }

                    .nav-label {
                        display: block;
                        overflow: hidden;
                        width: 100%;
                    }
                }

                &.has-subitems{
                    .mainmenu-item-container:after {
                        bottom: 4px;
                        cursor: pointer;
                    }
                }
            }

            &.has-back-link {
                .mainmenu-item {
                    margin-left: 36px;
                }

                .go-back-link {
                    display: block;
                    width: 24px;
                    height: 34px;
                    position: absolute;
                    left: 25px;
                    top: 24px;
                    z-index: @zindex-popover + 3;
                    .hide-text();

                    &:after {
                        .backend-icon-sprite-pseudo(24px, 11px, 52px, 0);
                        position: absolute;
                        left: 0;
                        top: 12px;
                    }
                }
            }

            .close-link {
                display: none;
                position: absolute;
                width: 24px;
                height: 24px;
                left: 19px;
                top: 33px;
                .hide-text();
                z-index: @zindex-popover + 3;

                &:after {
                    .backend-icon-sprite-pseudo(11px, 11px, 96px, 0);
                    position: absolute;
                    left: 6px;
                    top: 7px;
                }
            }
        }

        .scrollable-panel-container {
            .flex-stretch();
        }

        .mainmenu-item {
            &.has-subitems {
                > a, > .mainmenu-item-container {
                    padding-right: 30px;

                    &:after {
                        .backend-icon-sprite-pseudo(24px, 11px, 22px, 0);
                        position: absolute;
                        right: 0;
                        // bottom: xxx;
                    }
                }
            }
        }

        .mainmenu-items {
            &.scrollable {
                overflow: hidden;
            }

            > .mainmenu-item {
                margin-bottom: 6px;

                > a {
                    padding: 7px 25px 7px 60px;
                }

                &.has-subitems > a {
                    padding-right: 55px;

                    &:after {
                        right: 25px;
                        top: 11px;
                    }
                }

                .nav-label {
                    display: block;
                    overflow: hidden;
                }

                .nav-icon {
                    left: 25px;
                    width: 20px;
                    line-height: 34px;

                    .svg-icon {
                        width: 24px;
                    }

                    i {
                        font-size: 24px;
                        line-height: inherit;
                    }
                }

                .counter {
                    top: 0;
                }
            }
        }

        &.submenu-pane {
            z-index: @zindex-popover + 3;
            margin-right: -100%;
            box-shadow: none;

            .menu-header {
                &[data-submenu-index=account] {
                    .go-back-link {
                        top: 30px;
                    }

                    .mainmenu-item {
                        height: 42px;
                    }
                }

                .mainmenu-item {
                    .mainmenu-item-container {
                        .company-name {
                            display: none;
                        }

                        .user-name {
                            color: @mainnav-color;
                            position: relative;
                            top: 11px;
                            cursor: default;
                        }
                    }
                }
            }

            .mainmenu-item.section-user-title {
                display: none;
            }

            .mainmenu-item {
                &.divider {
                    height: 1px;
                    margin: 5px 0;
                    background: rgba(255, 255, 255, 0.1);
                }

                &.section-title {
                    color: white;
                    padding: 7px 17px;
                    white-space: nowrap;
                    font-weight: 600;

                    .nav-label {
                        opacity: .5;
                        margin-right: 0;
                        display: block;
                        overflow: hidden;
                        max-width: 250px;
                        vertical-align: middle;
                    }
                }
            }
        }
    }
}

body.responsive-submenu-displayed {
    #layout-mainmenu-responsive-container .responsive-menu-pane {
        &.mainmenu-pane {
            margin-right: 100%;
        }

        &.submenu-pane {
            margin-right: 0;
        }
    }
}

body.responsive-menu-displayed {
    overflow: hidden;

    #layout-mainmenu-responsive-container {
        width: 300px;
        box-shadow: -10px 0 10px rgba(0,0,0,0.2);
    }
}

html.mobile {
    #layout-mainmenu-responsive-container {
        nav.responsive-menu-pane {
            .mainmenu-items {
                > .mainmenu-item {
                    margin-bottom: 12px;

                    .nav-icon {
                        line-height: 38px;
                    }
                }
            }

            &.mainmenu-pane .menu-header {
                padding-left: 60px;

                .close-link {
                    display: block;
                }
            }
        }
    }
}

@media (max-width: @mobile-breakpoint-max) {
    body.responsive-menu-displayed {
        #layout-mainmenu-responsive-container {
            width: @mobile-breakpoint-max;
        }
    }
}