//--------------------------------------------------------------
// Copyright (C) joomla-monster.com
// License: http://www.joomla-monster.com/license.html Joomla-Monster Proprietary Use License
// Website: http://www.joomla-monster.com
// Support: info@joomla-monster.com
//---------------------------------------------------------------

// VARIABLES import
//---------------------------------------------------------------

@import "bootstrap_variables.less";  
@import "template_variables.less";

// MIXINS import
//---------------------------------------------------------------
  
@import "override/ltr/mixins.less";
@import "template_mixins.less";

// MEGAMENU
//---------------------------------------------------------------

.dj-megamenu-override {
  position: relative;   
  display: inline-block;
  vertical-align: top;
  z-index: 500;
}

.dj-megamenu-override li.dj-up {
  position: relative;
  display: block;
  float: left;
  margin: 0 0 0 1px;
  z-index: 1;
	&:first-child {
		margin: 0;
	}
  a.dj-up_a {
    font-size: @JMtopmenuFontSize;
    font-family: @JMtopmenuFontFamily;
    font-weight: @JMtopmenuFontWeight;
    display: block;
    text-decoration: none;
		text-transform: uppercase;
    padding: @JMtopmenuItemHeight @JMtopmenuItemWidth;
    line-height: 20px;
    cursor: pointer;
    color: @JMtopmenuFontColor;
    span {
      display: block;
    }
    small.subtitle {
      display: block;
      font-size: @JMtopmenuItemSubtitleFontSize;
      text-transform: none;
      line-height: (@JMtopmenuItemSubtitleFontSize * 1.2);
      .opacity(80);
    }
  }
	&:hover,
	&.hover,
	&:active,
	&.active {
  	a.dj-up_a {
			position: relative;
			&:after {
				content: '';
				position: absolute;
				bottom: 0;
				width: 100%;
				height: 2px;
				left: 0;
				right: auto;
				background: @JMtopSubmenuTopBorder;
			}
		}
  }
}

.dj-megamenu-override li.separator > a {
  cursor: default;
}

// sticky
// --------------------------  

.dj-megamenu-override-sticky {
	margin: 0!important;
	line-height: 1;
	background: @JMtopmenuBackground;
	padding: 10px 0;
  ul.dj-megamenu-override {
  	margin: 0!important;
  }
}

.dj-megamenu-override .dj-stickylogo {
	&.dj-align-center {
		text-align: center;
		margin: 10px;
	}
	&.dj-align-left {
		text-align: left;
		margin: 10px;
	}
	&.dj-align-right {
		text-align: right;
		margin: 10px;
	}
}

// mobile
// -------------------------- 

.dj-megamenu-offcanvas,
.dj-megamenu-accordion,
.dj-megamenu-select {
	.dj-mobile-open-btn {
		background: none !important;
		.border-radius(0); 
		color: inherit;
		height: 40px;
		line-height: 40px;
		&:hover {
			color: @JMstyle;
		}
	}
}

// select
// --------------------------  

#jm-allpage .select-input .dj-select {
	vertical-align: top;
	max-width: none;
	margin: 10px 0;
	font-family: inherit;
  font-size: @JMinputFontSize;
  font-weight: normal;
  padding: 8px;
  vertical-align: middle;
  border: 1px solid @JMinputBorder;
  color: @JMinputFontColor;
  background: @JMinputBackground;
  height: 38px;
  line-height: 38px;
}

// submenu
// --------------------------  

.dj-submenu li {
	list-style: none;
}

.dj-megamenu-override li.dj-up:hover,
.dj-megamenu-override li.dj-up.hover,
.dj-megamenu-override .dj-submenu > li:hover,
.dj-megamenu-override .dj-subtree > li:hover {
  position: relative;
  z-index: 200;
}

//hide submenus
.dj-megamenu-override li div.dj-subwrap {
  position: absolute;
  left: auto;
  right: auto;
  top: -9999px;
  visibility: hidden;
}

//first level submenu
.dj-megamenu-override {
  li:hover,
  li.hover {
    div.dj-subwrap {
      left: -(30px - @JMtopmenuItemWidth);
      right: auto;
      top: 100%;
 			visibility: visible;
      z-index: 300;
      .box-sizing(border-box);
			border-top: 20px solid transparent;
      div.dj-subwrap-in {
        background: @JMtopSubmenuBackground;
				border: 1px solid jmdarken(@JMtopSubmenuBackground, 5%);
      }
    }
  }
}

//if subtitle
.dj-megamenu-override.hasSubtitles {
  li:hover,
  li.hover {
		div.dj-subwrap {
			border-top: (20px + (@JMtopmenuItemSubtitleFontSize * 1.2)) solid transparent;
		}
		a.dj-up_a.withsubtitle + div.dj-subwrap {
			border-top: 20px solid transparent;
		}
	}
}
	
//if color-line
.bar-color .dj-megamenu-override {
  li:hover,
  li.hover {
    div.dj-subwrap {
			border-top: (@JMcolorfulLineHeight + 20px) solid transparent;
		}
	}
}

.bar-color .dj-megamenu-override.hasSubtitles {
  li:hover,
  li.hover {
		div.dj-subwrap {
			border-top: (@JMcolorfulLineHeight + 20px + (@JMtopmenuItemSubtitleFontSize * 1.2)) solid transparent;
		}
		a.dj-up_a.withsubtitle + div.dj-subwrap {
			border-top: (@JMcolorfulLineHeight + 20px) solid transparent;
		}
	}
}

//higher level submenu
#jm-allpage .dj-megamenu-override {
  li:hover,
  li.hover {
    div.dj-subwrap div.dj-subwrap {
      left: 100%;
      right: auto;
      top: -20px;
      z-index: 400;
			border-top: none;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
    }
  }
}

//submenu elements styles
.dj-megamenu-override .dj-subcol {
  display: inline-block;
  vertical-align: top;
  .box-sizing(border-box); 
	padding: 20px 0;
}

.dj-megamenu-override .dj-submenu,
.dj-megamenu-override .dj-subtree {
  > li {
    display: block;
    position: relative;
    padding: 0 30px;
    > a {
      color: @JMtopSubmenuFontColor;
      display: block;
      line-height: 20px;
      text-decoration: none;
      padding: 10px 0;
      small.subtitle {
        display: block;
        font-size: 11px;
      }
      &:hover,
			&.hover,
			&.active {
    		color: @JMtopSubmenuFontColorHover;
  		}
    }
  }
  > li.parent > a {
    position: relative;
    &:after {
      content: '+';
      position: absolute;
      font-family: Arial, Helvetica, sans-serif;
      line-height: 20px;
      right: 5px;
      left: auto;
    }
  }
}

// submenu tree
// --------------------------  

.dj-megamenu-override .dj-subtree {
  > li > a {
    padding: 2px 25px;
    background-position: left 50%;
    background-repeat: no-repeat;
    background-image: url('../images/li_arrow_ltr.png');
    &:after {
    	display: none !important;
    }
  }
}

//image in menu
.dj-megamenu-override-override {
  li.dj-up a span.image-title {
    margin: 0 0 0 15px;
    display: inline-block;
    vertical-align: middle;
  }
  li > a > img {
    vertical-align: middle;
  }
}

// modules
// --------------------------  

.dj-megamenu-override .modules-wrap {
  color: @JMtopSubmenuFontColor;
	padding: 10px 0;
  p {
    display: block;
    padding: 0;
  }
  .moduletable {
    clear: both;
    margin: @JMbaseSpace 0 0;
    position: relative;
    > h3 {
      color: @JMtopSubmenuFontColor;
      font-weight: @JMtopmenuFontWeight;
      font-size: @JMtopmenuFontSize;
			text-transform: uppercase;
      line-height: 1.1;
      position: relative;
			margin: 0 0 20px;
    }
    &:first-child {
			margin: 0;
    }
  }
}