/*
 * Metro UI CSS
 * (c) 2012-2013 by Sergey Pimenov
 * Licensed under the MIT License and Commercial
 *
 * Menus.less
 *
 */

.dropdown-menu {
    position: absolute;
    background-color: #fff;
    .unstyled;
    top: 100%;
    z-index: 11010;
    float: left;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    padding-bottom: 5px;
    padding-top: 5px;
    padding-left: 0;
    display: none;

    &.place-right {
        right: 0;
        left: auto;
    }

    a {
        #font > .navigation;
        #state > .navigation;
        display: block;
        width: 100%;
        padding: 3px 20px;
        white-space: nowrap;
        font-size: 14px;
        cursor: pointer;

        &:hover {
            .bg-color-blue;
            .fg-color-white;
        }
    }

    li {
        display: list-item;
        line-height: 20px;
    }

    .divider {
        height: 1px;
        margin: 9px 1px;
        overflow: hidden;
        background-color: #e5e5e5;
    }

    &.open {
        display: block !important;
    }
}


.nav-bar {
    background-color: @blue;
    position: relative;
    top: 0;
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
    z-index: 1000;

    .nav-bar-inner {
        .element, a .element {
            position: relative;
            margin: 5px;
            line-height: 20px;
            height: 20px;
            float: left;
            display: inline-block;
            padding: 0;
            font-weight: normal;
            font-size: 10pt;
            color: #fff;

            &.brand {
                font-size: 1.15em;
            }

            img {
                height: 100%;
            }

            a {
                line-height: 20px;
                height: 20px;
                font-size: 10pt;
                //color: #fff;
            }

            [class^="icon-"]:before, [class*=" icon-"]:before {
                display: inline-block;
                margin: 0;
                padding: 0;
                display: block;
                float: left;
                margin: 0 5px;
            }
        }

        & > ul.menu {
            .unstyled;
            padding: 0;
            margin: 0;

            & > li {
                display: block;
                float: left;
                margin-right: 5px;
                position: relative;
                padding: 5px 15px 5px 5px;

                a {
                    display: block;
                    float: left;
                    color: @white;
                    font-size: 10pt;
                }

                //&.active {background: #fff; a {color: #000;}}

                ul.dropdown-menu {
                    z-index: 1001;
                    border: 0;
                    left: 0px;
                    li {

                        a {
                            display: block;
                            float: none;
                            color: #1e1e1e;
                            padding: 3px 20px;
                        }
                    }

                }

            }

            &.open {
                display: block !important;
            }
        }

        & > .divider, & > ul.menu > li.divider {
            .element;
            width: 1px;
            border-right: 1px darken(@white, 10%) solid;
            //box-shadow: 0 0 10px rgba(0,0,0,0.5);
        }

        [data-role=dropdown] {
            margin-right: 20px !important;
            & > a {
                cursor: pointer;
                &:before {
                    position: absolute;
                    content: "\203A";
                    display: block;
                    font-size: 1.4em;
                    left: 100%;
                    margin-left: -10px;
                    top: 8px;
                    .rotate(90deg);
                }
            }
        }

        .pull-menu {
            display: none;
            float: right;
            color: #fff;
            cursor: pointer;
            font: 1.8em sans-serif;
            margin-right: 0px;
            position: relative;
            height: 20px;
            width: 20px;
            line-height: 20px;

            &:before {
                content: "\2261";
                position: absolute;
                font-size: 20pt;
                top: 5px;
                left: 0;
            }
        }

        .clearfix;
    }

    &.bg-color-blue .nav-bar-inner .menu li a:hover{background-color: @blue !important;}
    &.bg-color-blueLight  .nav-bar-inner .menu li a:hover{background-color: @blueLight !important;}
    &.bg-color-blueDark  .nav-bar-inner .menu li a:hover{background-color: @blueDark !important;}
    &.bg-color-green  .nav-bar-inner .menu li a:hover{background-color: @green !important;}
    &.bg-color-greenLight .nav-bar-inner .menu li a:hover {background-color: @greenLight !important;}
    &.bg-color-greenDark .nav-bar-inner .menu li a:hover {background-color: @greenDark !important;}
    &.bg-color-red .nav-bar-inner .menu li a:hover {background-color: @red !important;}
    &.bg-color-yellow .nav-bar-inner .menu li a:hover {background-color: @yellow !important;}
    &.bg-color-orange .nav-bar-inner .menu li a:hover {background-color: @orange !important;}
    &.bg-color-orangeDark .nav-bar-inner .menu li a:hover {background-color: @orangeDark !important;}
    &.bg-color-pink .nav-bar-inner .menu li a:hover {background-color: @pink !important;}
    &.bg-color-pinkDark .nav-bar-inner .menu li a:hover {background-color: @pinkDark !important;}
    &.bg-color-purple .nav-bar-inner .menu li a:hover {background-color: @purple !important;}
    &.bg-color-darken .nav-bar-inner .menu li a:hover {background-color: @darken !important;}
    &.bg-color-lighten .nav-bar-inner .menu li a:hover {background-color: @lighten !important;}
    &.bg-color-white .nav-bar-inner .menu li:hover {background-color: darken(@white, 10%) !important;}
    &.bg-color-white .nav-bar-inner .menu li a:hover {background-color: darken(@white, 10%) !important;}
    &.bg-color-white .nav-bar-inner .menu li a {color: @darken !important;}
    &.bg-color-white .nav-bar-inner .element {color: @darken !important;}
    &.bg-color-white .nav-bar-inner .pull-menu {color: @darken !important;}
    &.bg-color-grayDark .nav-bar-inner .menu li a:hover {background-color: @grayDark !important;}
    &.bg-color-magenta .nav-bar-inner .menu li a:hover {background-color: @magenta !important;}
    &.bg-color-teal .nav-bar-inner .menu li a:hover {background-color: @teal !important;}
    &.bg-color-redLight .nav-bar-inner .menu li a:hover {background-color: @redLight !important;}

    .clearfix;
}

.nav-bar {
    &.fixed-top, &.fixed-bottom {
        position: fixed;
        z-index: 10000;
        left: 0;
    }

    &.fixed-top {
        top: 0;
        bottom: auto;
    }
    &.fixed-bottom {
        bottom: 0;
        top: auto;
    }
}

.nav-bar {
    .nav-bar-inner {
        &.container {
            width: 940px;
            margin: auto;
        }
    }
}

.side-nav {
    ul {
        margin: 0;
        padding: 0;
        list-style: none;
        margin-bottom: 20px;

        .title {
            color: #4f4f4f;
            font-family: Segoe UI,Arial,Verdana,Tahoma,sans-serif;
            font-size: 12pt;
            margin: 0 0 5px 0;
            border-bottom: 1px #ccc solid;
            //margin-top: 20px;
        }

        & > li > a {
            display: block;
            padding: 3px 10px 3px 0;
            position: relative;
            color: #014E85;
            padding-left: 3px;
            font-size: 10pt;
        }

        &.close {
            & > li {
                display: none;
            }
            & > li[class^=title] {
                display: list-item;
            }
        }
    }
}