@import "../bootstrap/variables";
@import "variables";

/* Описание стилей
-----------------------------------------------------------*/
.menu-level-2-container {
    padding: 0;
    background-color: @menu-level-2-background-color;
    border-bottom: 1px solid @menu-level-2-border-bottom-color;

    a {
        outline: none;
    }
}

// Контейнер меню с внутренними отступами
.menu-level-2-hidden {
    display: none;
}

.menu-level-2 {
    margin: 0;
    padding: 0;
    list-style: none;
    height: @menu-level-2-height;

    li {
        float: left;
        margin-right: @menu-level-2-element-margin;
        white-space: nowrap;

        a {
            display: block;
        }

        &.right {
            float: right;
        }

        &.last {
            margin-right: 0;
        }

        form {
            label {
                border: 0;

                input {
                    margin-top: (@menu-level-2-vertical-padding - 1);
                    width: @menu-level-2-search-width;
                    line-height: @menu-level-2-search-line-height;
                    background-color: @menu-level-2-background-color;
                    border: 1px solid @menu-level-2-search-border-color;
                    color: @menu-level-2-search-text-color;
                    border-radius: @menu-level-2-search-border-radius;
                    font-size: @font-size-base;
                    padding: 4px @menu-level-2-search-side-padding;
                    outline: none;
                    font-weight: 400;

                    &:focus {
                        box-shadow: none;
                        -webkit-box-shadow: none;
                        -moz-box-shadow: none;
                        border: 1px solid @menu-level-2-search-border-active-color;
                    }
                }
            }
        }

        &.menu-level-2-logo {
            line-height: @menu-level-2-height;
            margin-right: @menu-level-2-title-right-margin;

            a.bars {
                display: none;
            }

            a {
                color: @color-10;
                text-decoration: none;
                font-weight: 400;
                font-size: 22px;
                font-family: "Aller", "Lucida Grande", sans-serif;

                img {
                    margin-top: -4px;
                }
            }
        }

        a {
            font-size: @menu-level-2-button-font-size;
            height: @menu-level-2-height;
            line-height: @menu-level-2-height;
            text-decoration: none;
            color: @color-10;

            &:hover {
                color: @color-50
            }

            i {
                margin-right: 4px;
            }
        }

        &.active {
            a {
                color: @menu-level-2-button-font-active-color;

                &:hover {
                    color: @menu-level-2-button-font-hactive-color;
                }
            }
        }
    }

    &.menu-level-2-hidden {
        padding-bottom: @menu-level-2-hidden-menu-height / 6;

        li {
            width: 100%;
            clear: both;
            margin: 0;
            padding: 0;
            height: @menu-level-2-hidden-menu-height;

            &:last-child {
                margin-bottom: 6px;
            }

            a {
                height: @menu-level-2-hidden-menu-height;
                line-height: @menu-level-2-hidden-menu-height;
                padding-left: @menu-level-2-hidden-side-padding;
                font-weight: lighter;
            }

            &:hover {
                background-color: @menu-level-2-background-color;

                a {
                    border-left: @menu-level-2-hidden-menu-marker-width solid @menu-level-2-border-bottom-color;
                    padding-left: @menu-level-2-hidden-side-padding - @menu-level-2-hidden-menu-marker-width;
                }
            }

            &.search {
                clear: both;
                float: left;
                margin: 0 auto;
                padding: 0 @menu-level-2-hidden-side-padding;
                position: relative;
                top: -12px;

                &:hover {
                    background-color: @menu-level-2-background-color;
                }

                label {
                    width: 100%;
                }

                input {
                    margin-left: 0;
                    width: 100%;
                    margin-top: @menu-level-2-hidden-menu-height / 6;
                }
            }
        }
    }
}

.menu-level-2-container.fixed {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 3;
    border-bottom: 1px solid @menu-level-3-border-bottom-color;
    .box-shadow(0 3px 16px @color-82);

    .menu-level-2 {
        height: 42px;
    }

    li, li  a {
        line-height: 42px;
        height: 42px;
    }

    input {
        margin-top: 8px;
    }
}

/* Адаптивная верстка
-----------------------------------------------------------------------------*/
// Large 993-1200
@media only screen and (min-width: (@screen-md + 1)) and (max-width: @screen-lg) {

}

// Medium 769-992
@media only screen and (min-width: (@screen-sm + 1)) and (max-width: @screen-md) {
    .menu-level-2.mobile {
        li {
            margin-right: @menu-level-2-element-margin / 2;
            &.last {
                margin-right: 0;
            }
            a {
                font-size: @menu-level-2-button-font-size;

                &.logo {
                    font-size: @menu-level-2-title-font-size * 0.8;
                }
            }
            &.menu-level-2-logo {
                margin-right: @menu-level-2-element-margin / 2;
            }
            &.search {

                input {
                    width: @menu-level-2-search-width * 0.7;
                }
            }
        }
    }
}

// Extra small 481-768
@media only screen and (min-width: (638px)) and (max-width: @screen-sm) {
    .menu-level-2.mobile {
        li {
            margin-right: @menu-level-2-element-margin / 2;
            &.last {
                margin-right: 0;
            }
            a {
                font-size: @menu-level-2-button-font-size * .9;

                &.logo {
                    font-size: @menu-level-2-title-font-size * 0.7;
                }
            }
            &.menu-level-2-logo {
                margin-right: @menu-level-2-element-margin / 2;
//                display: none;
            }
            &.search {

                input {
                    width: @menu-level-2-search-width * 0.5;
                }
            }
        }
    }
}

// Small 0-480
@media only screen and (max-width: 637px) {
    .menu-level-2.mobile {

        li {
            &.menu-level-2-logo {
                width: 100%;
                clear: both;
                padding: 0;

                .bars {
                    display: block;
                    float: right;
                }

                a {
                    float: left;
                    line-height: @menu-level-2-height;
                }
            }

        }

    }

    .menu-level-2 {
        &.menu-level-2-hidden {
            padding-bottom: @menu-level-2-hidden-menu-height / 6;

            li {
                width: 100%;
                clear: both;
                margin: 0;
                padding: 0;
                height: @menu-level-2-hidden-menu-height;

                &:last-child {
                    margin-bottom: 18px;
                }
            }
        }
    }

    .menu-level-2-container.fixed {
        .menu-level-2 {
            &.menu-level-2-hidden {

            }
        }
        .menu-level-2.mobile {

            li {

                &.menu-level-2-logo {

                    .bars {
                        display: block;
                        float: right;
                    }

                    a {
                        float: left;
                        line-height: 42px;
                    }
                }

            }

        }
    }
}