//--------------------------------------------------------------
// 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 "template_mixins.less";

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

.dj-megamenu-override {
	position: relative;
	z-index: 500;
	text-align: left;
	.cf();
}

.dj-megamenu-override li.dj-up {
	background-image: none;
	position: relative;
	display: block;
	float: left;
	padding: 0;
	margin: 0 0 0 @JMtopmenuItemWidth;
	z-index: 1;
	a.dj-up_a {
		font-size: @JMtopmenuFontSize;
		font-family: @JMtopmenuFontFamily;
		font-weight: @JMtopmenuFontWeight;
		display: block;
		text-decoration: none;
		padding: @JMtopmenuItemHeight 0;
		line-height: @baseLineHeight;
		cursor: pointer;
		color: @JMtopmenuFontColor;
		small.subtitle {
			display: block;
			font-size: 10px;
			text-transform: none;
			line-height: 1.2;
			.opacity(80);
		}
	}
	&.active,
	&:hover,
	&.hover  {
		a.dj-up_a {
			color: @JMtopmenuFontColorHover;
		}
	}
	&:first-child {
		margin-left: 0;
		margin-right: 0;
	}
}

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

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

.dj-megamenu-override.dj-megamenu-sticky {
	margin: 0!important;
	line-height: 1;
	background: @JMtopmenuBackground;
	padding-top: (@JMbaseSpace - @JMtopmenuItemHeight);
	padding-bottom: (@JMbaseSpace - @JMtopmenuItemHeight);
	ul.dj-megamenu {
		margin: 0!important;
	}
}

//logo
.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
// --------------------------

#jm-allpage {
	.dj-megamenu-offcanvas,
	.dj-megamenu-accordion,
	.dj-megamenu-select {
		.dj-mobile-open-btn {
			background: none !important;
			.border-radius(0);
			color: @JMtopmenuFontColor;
			padding: 0;
			&:hover {
				color: @JMtopmenuFontColorHover;
			}
		}
	}
}

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

#jm-allpage .select-input .dj-select {
	vertical-align: top;
	max-width: none;
	margin: 10px 0;
	font-family: @JMmoduleTitleFontFamily;
	font-size: @JMinputFontSize;
	font-weight: @JMbaseFontWeight;
	padding: 0 @JMinputPadding;
	vertical-align: middle;
	border: 2px solid @JMinputBorder;
	.border-radius(@inputBorderRadius);
	color: @JMinputFontColor;
	background: @JMinputBackground;
	height: @JMinputHeight;
	line-height: @JMinputHeight;
}

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

.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: 0;
			right: auto;
			top: 100%;
			 visibility: visible;
			z-index: 300;
			.box-sizing(border-box);
			border-top: (@JMbaseSpace - @JMtopmenuItemHeight) solid transparent;
			div.dj-subwrap-in {
				background: @JMtopSubmenuBackground;
				border: 1px solid @JMborder;
			}
		}
	}
}

//second+ level submenu
.dj-megamenu-override {
	li:hover,
	li.hover {
		div.dj-subwrap div.dj-subwrap {
			left: 100%;
			right: auto;
			top: -16px;
			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: 15px 0;
}

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

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

// submenu tree
// --------------------------
.dj-megamenu-override .dj-subtree {
	> li > a {
		color: @JMtopSubmenuFontColor;
		display: block;
		line-height: 20px;
		text-decoration: none;
		padding: 2px 15px;
		background-position: left 50%;
		background-repeat: no-repeat;
		background-image: url('../images/li.png');
		border: none;
		&:after {
			display: none;
		}
		&:first-child > a {
			border: none;
		}
	}
	> li > a small.subtitle {
		display: block;
		font-size: 0.9em;
		line-height: 1;
	}
	> li:hover > a,
	> li.hover > a,
	> li.active > a {
		color: @JMtopSubmenuFontColorHover;
	}
	> li.parent > a {
		position: relative;
		&:after {
			content: '+';
			position: absolute;
			font-family: Arial, Helvetica, sans-serif;
			line-height: 20px;
			right: 5px;
			left: auto;
		}
	}
}

// columns border
// --------------------------

.dj-megamenu-override .multiple_cols .dj-subcol + .dj-subcol {
	&:after {
		content: '';
		position: absolute;
		height: 100%;
		top: 0;
		border-left: 1px solid @JMborder;
	}
}

// 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;
			font-family: @JMmoduleTitleFontFamily;
			text-transform: uppercase;
			line-height: 1.1;
			position: relative;
			margin: 0 0 20px;
		}
		&:first-child {
			margin: 0;
		}
	}
}

// menus module
// --------------------------

// megamenu
.dj-megamenu-override {
	.nav.menu {
		> li > a,
		> li > span.separator {
			background: none;
			border: none;
			padding-top: 6px;
			padding-bottom: 6px;
		}
		> li:first-child {
			> a,
			> span.separator {
				border-top: none;
				padding-top: 0;
			}
		}
		> li:last-child {
			> a,
			> span.separator {
				padding-bottom: 0;
			}
		}
		> li.parent > ul {
			margin: 0;
		}
	}
}
