@import "_variables.less";
@import "bootstrap/_mixins.less";
// =======================
// Mega Menu
// =======================
//Level 0
//Font
@menu-item-font-size: 16px;
@menu-item-line-height: 18px;
@menu-item-font-family: @font-family-base;
//Margin
@menu-item-margin: 0;
//Colors
@menu-item-color: #000;
@menu-item-act-color: @global-color3;
@menu-item-bg-color: transparent;
@menu-item-bg-act-color: transparent;
@menu-item-desc-color: @white;
//Parent Icon
@menu-parent-icon: '\f078';
@menu-parent-icon-size: 8px;
@menu-parent-icon-color: inherit;
@menu-parent-icon-margin: 5px;
//Level 1+
//Font
@sub-menu-item-font-size: @font-size-base;
@sub-menu-item-font-family: @font-family-sans-serif;
@sub-menu-item-line-height: @line-height-base;
//Colors
@sub-menu-bg: @global-color;
@sub-menu-item-color: @white;
@sub-menu-item-act-color: @global-color3;
@sub-menu-item-bg-color: none;
@sub-menu-item-bg-act-color: transparent;
//Layout
@sub-menu-border: none;
@sub-menu-margin-top: 35px;
#fixed_cloned {
    width: 100% !important;
}

.icemegamenu {
    float: right;
    position: static;
    > ul {
        clear: both;
        margin: 0;
        padding: 0;
        width: 100%;
        z-index: 999;
        .clearfix;
        > li {
            display: block;
            float: left;
            position: relative !important;
            z-index: 1;

            &:before {
                font-size: 36px;
                line-height: 1.2em;
                display: block;
                color: #c2c2c2;
                .transition(all 0.3s ease);
                position: absolute;
                left: 50%;
                top: 0%;
                .translate(-50%, 0%);
            }
            &:hover {
                &:before {
                    color: @global-color3;
                    transition: 10s opacity;

                }
                > a.iceMenuTitle {
                    color: @global-color3;
                }
            }
            + li {
                margin-left: @menu-item-margin;
            }
            > a.iceMenuTitle {
                display: block;
                font: (@menu-item-font-size)~"/"(@menu-item-line-height) @menu-item-font-family;
                height: @menu-item-line-height;
                padding: 40px 30px 0;
                position: relative;
                z-index: 1;
                color: @menu-item-color;
                background: @menu-item-bg-color;
                * {
                    font: inherit;
                }
                &:hover,
                &.hover,
                &.icemega_active {
                    color: @menu-item-act-color;
                    background: @menu-item-bg-act-color;
                }
            }
            &.active,
            &.hover {
                &:before {
                    color: @global-color3;
                }
                > a.iceMenuTitle {
                    color: @menu-item-act-color;
                    background: @menu-item-bg-act-color;
                    &.menu-login-form {
                        background: none;
                        color: @headings-color;
                    }
                }
            }
            &.parent {
                position: relative;
                z-index: 1000;
                > .iceMenuTitle,
                > .icemega_title {
                    // &:after {
                    //   content: @menu-parent-icon;
                    //   font-family: @fa;
                    //   font-size: @menu-parent-icon-size;
                    //   color: @menu-parent-icon-color;
                    //   margin-left: @menu-parent-icon-margin;
                    //   line-height: 0;
                    // }
                }
            }
            span.icemega_desc {
                color: @menu-item-desc-color;
                display: block;
                line-height: 1.25em;
                padding: 0;
            }
            &.menu-login-form {
                > a.iceMenuTitle {
                    font-size: 0;
                    height: @menu-item-line-height*2;
                    line-height: @menu-item-line-height*2;
                    background: none;
                    color: @global-color;
                    &:before {
                        content: '\f007';
                        font-size: 20px;
                        font-family: @fa;
                    }
                    &:after {
                        display: none;
                    }
                }
                &.hover {
                    > a.iceMenuTitle,
                    > a.iceMenuTitle.hover > a.iceMenuTitle:hover {
                        color: @text-color;
                        background: none;
                    }
                }
                ul.icesubMenu.sub_level_1 {
                    left: auto;
                    right: 0px;
                    .translate(0px, 30px);
                    &:before {
                        .triangle(bottom_right, 22px, 11px, @global-color);
                        right: 0;
                        left: auto;
                        .translate(0px, 0px);
                    }
                }
            }
            &.menu-search {
                position: static;
                > a.iceMenuTitle {
                    font-size: 0;
                    background: none;
                    color: @global-color;
                    &:before {
                        content: '\f002';
                        font-size: 20px;
                        font-weight: normal;
                        font-family: @fa;
                    }
                    &:after {
                        display: none;
                    }
                    &.hover,
                    &:hover {
                        background: transparent;
                        color: @text-color;
                    }
                }
                > ul.icesubMenu {
                    top: 0;
                    left: auto;
                    right: 0;
                    position: absolute;
                    height: auto;
                    padding: 0;
                    margin-top: 0;
                    .opacity(100);
                    overflow: visible;
                    .translate(0, 0) !important;
                    pointer-events: auto;
                    &:before {
                        display: none;
                    }
                }
                .fa-times {
                    display: block;
                    font-size: 20px;
                }
                .top_search {
                    z-index: 2;
                }
            }
        }
    }
    .ice-megamenu-toggle {
        display: none;
    }
}


/* when dont have subtitle */

.icemegamenu > ul > li > a.iceMenuTitle > span.icemega_nosubtitle {
    display: inline-block;
}

// Submenu
ul.icesubMenu {
    height: 0;
    left: 50%;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    text-align: left;
    top: 100%;
    .transition(all .25s ease-out);
    .translate(-50%, 30px);
    z-index: 9999;
    background: @sub-menu-bg;
    border: @sub-menu-border;
    > li {
        .clearfix();
    }
    li {
        a.iceMenuTitle {
            display: block;
            font: (@sub-menu-item-font-size)~"/"(@sub-menu-item-line-height) @sub-menu-item-font-family;
            padding: 4px 20px;
            color: @sub-menu-item-color;
        }
        &.active,
        &:hover,
        &.hover {
            > a.iceMenuTitle {
                color: @sub-menu-item-act-color;
                background: @sub-menu-item-bg-act-color;
            }
        }
    }
    &.sub_level_1 {
        margin-top: @sub-menu-margin-top;
    }
    &.sub_level_2 {
        margin-top: -15px;
    }
    &:before {
        content: '';
        position: absolute;
        left: 50%;
        .translate(-50%, 0);
        top: -11px;
        .triangle(top, 22px, 11px, @sub-menu-bg);
    }
}

li[class*=iceMenuLiLevel] {
    padding: 0;
    &:before {
        // display: none;
    }
}

#icemegamenu li.iceMenuLiLevel_1.hover {
    > ul.icesubMenu {
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
        .translate(-50%, 0px);
    }
    &.menu-login-form > ul.icesubMenu {
        .translate(0px, 0px);
    }
}

ul.icesubMenu.sub_level_2 {
    &:before,
    &:after {
        border-bottom: 5px solid transparent;
        border-top: 5px solid transparent;
        content: '';
        position: absolute;
        top: 23px;
    }
    &:before {
        left: -5px;
    }
    &:after {
        border-right: 5px solid #FFF;
        left: -4px;
    }
}

#icemegamenu li.iceMenuLiLevel_1 li.hover > ul.icesubMenu {
    height: auto;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    .translate(0, 0px);
}

#icemegamenu ul.icesubMenu.visible {
    height: auto;
}

ul.icesubMenu ul > li {
    position: relative;
}

li.iceMenuLiLevel_2.parent {
    > a {
        &:after {
            content: '\f054';
            font-family: FontAwesome;
            font-size: 8px;
            height: 0;
            line-height: 0;
            position: absolute;
            right: 7px;
            top: 50%;
        }
    }
    &.hover {
        a {
            position: relative;
            &:before {
                content: '';
                height: 100%;
                left: 100%;
                position: absolute;
                top: 0;
                width: 11px;
            }
        }
    }
}


/* when is parent */

ul.icesubMenu {
    > li {
        &:before {
            display: none;
        }
        > .iceCols {
            max-width: 100% !important;
            width: 100%;
        }
    }
}


/* Second Level Dropdown */

ul.sub_level_2,
ul.sub_level_3,
ul.sub_level_4,
ul.sub_level_5 {
    left: 100%;
    margin-left: 10px;
    top: 0px;
    .translate(30px, 0);
    z-index: 99999;
}

ul.icesubMenu ul > li.hover > ul {
    opacity: 1;
    overflow: visible;
    .translate(0, 0);
    visibility: visible;
}

.icesubMenu .icemega_cover_module span.iceModuleTile {
    display: block;
}

.ice_righttoleft {
    left: auto !important;
    right: 0;
}

.icemega_modulewrap {
    padding: 20px;
}

.nav-collapse .icesubMenu {
    .nav > li > a,
    .dropdown-menu a {
        margin-bottom: 0;
        padding: 0;
    }
}

.nav-collapse.collapse {
    height: auto;
}

// Full Width Submenu
.fullwidth {
    position: static !important;
    &.hover {
        ul.icesubMenu.sub_level_1 {
            .translate(0, 0px) !important;
        }
    }
    ul.icesubMenu.sub_level_1 {
        margin: 0px;
        left: 0px;
        padding: 0;
        .translate(0, 30px);
        &:before {
            display: none;
        }
        .icemega_cover_module {
            .komento {
                display: none;
            }
            .item__module,
            .item {
                margin-bottom: @line-height-base;
                .opacity(100);
                .transform(translateY(0px));
            }
            .mod-menu ul.menu,
            .mod-article-single,
            .mod-newsflash-adv_custom-link {
                margin-bottom: @line-height-base;
            }
            .icemega_modulewrap {
                padding: 0;
            }
        }
        .iceCols {
            > ul {
                padding: 0 15px;
            }
        }
        > li {
            padding: 24px 25px;
            position: relative;
        }
    }
}

.rd-mobilemenu_ul a.active,
.rd-mobilemenu_ul li.level_1.active > a {
    color: white !important;
}

@media (max-width: 979px) {
    .icemegamenu {
        overflow: visible !important;
    }
}

.fullwidth .icesubMenu {
    -webkit-transition: all 0s linear !important;
    -moz-transition: all 0s linear !important;
    -o-transition: all 0s linear !important;
    transition: all 0s linear !important;
}
