/*
 * header-nav.scss
 * -----------------------------------------------
*/
$top-nav-font-size: 1.0rem;

@mixin dropdown-submenu-bold-title() {
	a.menu-item-link.tm-submenu-title {
		font-size: 1rem;
		font-weight: $headings-font-weight-h4-h6;
		color: #222;
	}
}
.header-nav {
	.header-nav-wrapper {
		.menuzord-container {
			@include transition(all 0.3s ease);
		}
		&.navbar-scrolltofixed {
			@include transition(all 0.3s ease);
		}
	}
	.header-nav-col-row {
		> :first-child {
			padding-left: 15px;
		}
		> :last-child {
			padding-right: 15px;
		}
	}
}
#top-primary-nav,
#top-primary-nav-clone {
	&.menuzord {
		padding: 0;
	}
	.menuzord-menu {
		li a {
			@include transition(all 0.3s ease);
		}
		> li {
			position: relative;
			> a {
				font-size: 1rem;
				padding-left: 20px;
				padding-right: 20px;
				@include media-breakpoint-down(lg) {
					padding-left: 10px;
					padding-right: 10px;
				}
			}
		}
		ul.dropdown {
			border: 1px solid #ddd;
			box-shadow: 1px 1px 35px rgba(0, 0, 0, 0.08);
			li {
				margin: 0;
				border-bottom: 1px solid $gray-eee;
				padding-left: 0;
				a { 
					color: $black-555;
					font-size: $menu-item-link-fontsize;
					padding: 7px 25px 7px 22px;
					&:hover {
						background-color: $white-f5;
					}
				}
				.indicator { }
				&:hover > a {
					background: #eee none repeat scroll 0 0;
					color: $black-333;
				}
				@include dropdown-submenu-bold-title();
			}
		}
		> li > ul.dropdown {
			border-top: 3px solid #333;
			background: #fcfcfc;
		}

		.tm-menu-badge {
			display: inline;
			font-size: 65%;
			line-height: 1;
			text-transform: uppercase;
			padding: 0 4px 0px 4px;
			margin: 0 0 0 5px;
			background-color: #f44336;
			color: #fff;
		}

	}
	&.menuzord-responsive {
		.menuzord-menu {
			@include media-breakpoint-down(lg) {
				> li > a {
					color: $white-base;
					background-color: $black-333;
					border-bottom-color: $black-444;
				}
				li .indicator {
					border-left-color: $black-444;
				}
				ul.dropdown {
					border-top: 0;
					border-color: $black-444;
					li a {
						color: $white-base;
						background-color: lighten($black-333, 1%);
						border-bottom-color: $black-444;
					}
				}
				.widget {
					margin-bottom: 15px;
				}
				.megamenu .megamenu-row {
					> [class^="col"] {
						padding: 0 15px;
					}
					
					[class*="col"] {
						margin-top: 0;
					}
				}
			}
		}
	}
}
#top-primary-nav {
	.menuzord-menu {
		@include media-breakpoint-down(lg) {
			display: none !important;
		}
	}
}
#top-primary-nav-clone {
	.showhide {
		display: none !important;
	}
	.menuzord-menu {
		margin-bottom: 30px;
	}
}
header#header {
	.site-brand {
		@include transition(all 0.3s ease);
		@include media-breakpoint-down(lg) {
			margin-right: 20px;
		}
		@include media-breakpoint-down(sm) {
			margin-right: 0;
		}
		img {
			max-height: 38px;
			width: auto;
			@include transition(all 0.3s ease);
		}

		img.logo-2x {
			display: none;
		}
	}
	@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi), only screen and (min-resolution:1.5dppx){
		.site-brand {
			.logo-default.logo-1x {
				display: none;
			}
			.logo-default.logo-2x {
				display: inline-block;
			}
		}
	}
}

/* subtitle */
.menu-item .subtitle {
	display: block;
	font-weight: normal;
}
/* Switchable logo */
body.switchable-logo {
	header#header {
		.site-brand {
			.logo-light.logo-1x {
				display: inline-block;
			}
			.logo-dark.logo-1x {
				display: none;
			}
		}

		.header-nav-wrapper.navbar-scrolltofixed.scroll-to-fixed-fixed {
			.site-brand {
				.logo-light.logo-1x {
					display: none;
				}
				.logo-dark.logo-1x {
					display: inline-block;
				}
			}
		}
	}
	@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi), only screen and (min-resolution:1.5dppx){
		header#header {
			.site-brand {
				.logo-light.logo-1x {
					display: none;
				}
				.logo-dark.logo-1x {
					display: none;
				}
				.logo-light.logo-2x {
					display: inline-block;
				}
				.logo-dark.logo-2x {
					display: none;
				}
			}
			.header-nav-wrapper.navbar-scrolltofixed.scroll-to-fixed-fixed {
				.site-brand {
					.logo-light.logo-1x {
						display: none;
					}
					.logo-dark.logo-1x {
						display: none;
					}
					.logo-light.logo-2x {
						display: none;
					}
					.logo-dark.logo-2x {
						display: inline-block;
					}
				}
			}
		}
	}
}

/* -------- Megamenu-Row ---------- */
.menuzord-menu {
	> li {
		> .megamenu {
			border-top: 3px solid #333;
			background: #fcfcfc;
			background-repeat: no-repeat;
			background-position: bottom right;
			padding: 0;
			min-width: 400px;

			&.megamenu-three-quarter-width {
				left: auto;
				width: 75%;
			}
			.megamenu-row {
				box-shadow: 1px 1px 35px rgba(0, 0, 0, 0.08);
				display: table;
				.col1 {
					width: 8.33333333%;
				}
				.col2 {
					width: 16.66666667%;
				}
				.col3 {
					width: 25%;
				}
				.col4 {
					width: 33.333%;
				}
				.col5 {
					width: 41.66666667%;
				}
				.col6 {
					width: 50%;
				}
				.col7 {
					width: 58.33333333%;
				}
				.col8 {
					width: 66.66666667%;
				}
				.col9 {
					width: 75%;
				}
				.col10 {
					width: 83.33333333%;
				}
				.col11 {
					width: 91.66666667%;
				}
				.col12 {
					width: 100%;
				}
				> [class^="col"] {
					display: table-cell;
					float: none;
					margin-left: 0;
					padding: 15px 10px;
					border-right: 1px solid #eee;
					background-repeat: no-repeat;
					background-position: bottom right;
				}
				> [class^="col"]:last-child {
					border-right: none;
				}

				li {
					border: 0 none;
					clear: both;
					font-size: 12px;
					margin: 0;
					padding: 2px;
					position: relative;
					width: 100%;
					/*.tm-submenu-title {
						display: block;
						padding: 7px 12px 7px;
					}*/
					a.menu-item-link {
						color: $black-777;
						display: block;
						font-size: $menu-item-link-megamenu-fontsize;
						padding: 5px 12px 5px;
						i {
							color: $black-777;
							padding-right: 6px;
						}
					}
					@include dropdown-submenu-bold-title();
					
					&.active, &:hover {
						> .menu-item-link:not(.tm-submenu-title) {
							color: #111;
							//padding-left: 10px;
							background-color: $white-f5;
							i {
								color: #555;
								padding-right: 6px;
							}
						}
					}
				}
				.widget {
					margin-bottom: 0;
				}
			}
		}
	}
	
	@include media-breakpoint-up(xl) {
		> li {
			> .megamenu {
				display: block !important;
				opacity: 0;
				visibility: hidden;
			}
			&:hover {
				> .megamenu {
					opacity: 1;
					visibility: visible;
				}
			}
		}
	}
}
body.admin-bar .header-nav .navbar-scrolltofixed.scroll-to-fixed-fixed {
	margin-top: 28px;
	@media (max-width: 600px) {
		margin-top: 45px;
	}
}