/* ==========================================================================
   Navigation Menu styles
   ========================================================================== */
$wide-menu-top-bottom-spacing: 46px 0 41px;
$space-between-menu-columns: 15px;
$wide-menu-level-two-top-spacing: 12px;

.qodef-header-navigation {

	.qodef-menu-item-icon {
		display: block;
		margin-right: 5px;
		line-height: inherit;

		&:before {
			display: block;
			line-height: inherit;
		}
	}

	> ul {

		> li {

			> a {
				position: relative;
				display: flex;
				align-items: center;
				height: 100%;
				@include qodefMenuLevelOneInitialStyle();
			}

			&.current-menu-ancestor,
			&.current-menu-item {

				> a {

					.qodef-menu-item-text {

						.qodef-menu-item-wave {
							clip-path: inset(0 0 0 0);
						}
					}
				}

			}
		}
	}

	&.qodef-menu-has-numbers {

		> ul {
			counter-reset: counter;

			> li {

				> a {

					.qodef-menu-item-text {
						position: relative;

						&:before {
							@include qodefMenuNumbersStyle();

							.qodef-skin--light & {
								color: rgba(255, 255, 255, .4);
							}

							.qodef-skin--dark & {
								color: rgba(0, 0, 0, .4);
							}
						}
					}

					&:hover {

						.qodef-menu-item-text {

							&:before {

								.qodef-skin--light & {
									color: #fff;
								}

								.qodef-skin--dark & {
									color: #000;
								}
							}
						}
					}
				}

				&.current-menu-ancestor,
				&.current-menu-item {

					> a {

						.qodef-menu-item-text {

							&:before {

								.qodef-skin--light & {
									color: #fff;
								}

								.qodef-skin--dark & {
									color: #000;
								}
							}
						}
					}
				}
			}
		}
	}

	ul {

		li {

			.qodef-drop-down-second {
				position: absolute;
				top: 100%;
				left: -29px;
				display: block;
				width: auto;
				height: 0;
				opacity: 0;
				visibility: hidden;
				overflow: hidden;
				z-index: 10;

				&.qodef-drop-down--start {
					opacity: 1;
					visibility: visible;
					overflow: visible;
					z-index: 20;
					transition: opacity $transition-timing;
				}
			}

			.qodef-mega-menu-widget-holder {
				display: none;
				white-space: normal;
			}

			&.qodef-menu-item--narrow {

				.qodef-drop-down-second {

					&.qodef-drop-down--right {
						left: auto;
						right: -20px;
					}
				}

				.qodef-drop-down-second-inner {
					@include qodefRelativeLayout();

					> ul {
						position: relative;
						top: auto;
						opacity: 1;
						visibility: visible;
					}
				}
			}

			&.qodef-menu-item--wide {

				.qodef-mega-menu-widget-holder {
					display: block;
				}

				.qodef-drop-down-second {
					background-color: #000;
				}

				.qodef-drop-down-second-inner {

					&:not(.qodef-content-grid),
					.qodef--boxed & {
						padding: $full-width-side-padding;
					}

					> ul {
						display: flex;
						justify-content: space-between;
						padding: $wide-menu-top-bottom-spacing;
						margin: 0 -#{$space-between-menu-columns};

						> li {
							width: 100%;
							padding: 0 $space-between-menu-columns;

							> a {
								@include qodefMenuLevelOneInitialStyle(null, #fff);

								&:hover {
									@include qodefMenuLevelOneHoverStyle();
								}
							}

							.qodef-menu-item-arrow {
								display: none;
							}

							ul {
								padding-top: $wide-menu-level-two-top-spacing;

								li {

									> a {
										@include qodefMenuLevelTwoInitialStyle();
										//@include qodefMenuLevelUnderlineStyle();
										@include qodefMenuLevelTwoInitialTypographyStyle(#fff);
									}

									&:hover,
									&.current-menu-item {

										> a {
											//@include qodefMenuLevelUnderlineHoverStyle();
											.item-text {
												@include qodefUnderlineActive();
											}
										}
									}
								}
							}

							&.current-menu-ancestor,
							&.current-menu-item {

								> a {
									@include qodefMenuLevelOneHoverStyle();
								}
							}

							&.qodef--hide-link:not(.current-menu-ancestor):not(.current-menu-item) {

								> a {

									&:hover {
										@include qodefMenuLevelOneHoverStyle();
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

body {

	&:not(.qodef-drop-down-second--full-width) {

		.qodef-header-navigation {

			ul {

				li {

					&.qodef-menu-item--wide {

						.qodef-drop-down-second-inner {
							padding: $full-width-side-padding;
						}
					}
				}
			}
		}
	}
}
