/*
 * HFC Simple Menu - structural CSS
 *
 * This is a trimmed replacement for UberMenu 2's basic.css (39KB -> ~4KB).
 * Only the rules that a FLAT, horizontal, centered menu bar with a mobile
 * toggle actually needs. Everything relating to mega panels, flyouts, widget
 * areas, columns, search forms, post lists and Contact Form 7 is gone,
 * because none of it was ever rendered on this site.
 *
 * DELIBERATELY NO COLOURS, FONTS OR TYPE.
 * All of that already lives in the theme's custom.css, which targets
 * #megaMenu ul.megaMenu > li.menu-item > a and friends. This file must not
 * fight it. custom.css is <link>ed in header.php BEFORE wp_head(), so this
 * file loads after it -- same as basic.css did. Where they overlap, custom.css
 * uses !important on padding and line-height and wins.
 *
 * Equivalent UberMenu container classes, for reference:
 *   megaFullWidth        -> #megaMenu width 100%
 *   megaCenterInner      -> ul.megaMenu margin 0 auto, float none
 *   megaCenterMenuItems  -> ul.megaMenu text-align center, li float none
 *   megaResponsiveToggle -> ul hidden under 768px until toggled
 *   inner-menu-width 1040 -> ul.megaMenu max-width
 */

/* ---------------------------------------------------------------
   Reset (was #megaMenu.megaResetStyles ...)
   --------------------------------------------------------------- */
#megaMenu ul.megaMenu,
#megaMenu li.menu-item,
#megaMenu li.menu-item > a,
#megaMenu img.um-img {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
	text-shadow: none;
	visibility: visible;
	opacity: 1;
	box-sizing: content-box;
}

/* ---------------------------------------------------------------
   Container
   --------------------------------------------------------------- */
#megaMenu {
	position: relative;
	display: block;
	float: left;
	width: 100%;            /* megaFullWidth */
	line-height: 1em;
	overflow: visible;
	box-sizing: border-box;
}

/* ---------------------------------------------------------------
   The bar
   --------------------------------------------------------------- */
#megaMenu ul.megaMenu {
	list-style: none outside none;
	position: relative;
	overflow: visible;
	z-index: 100;
	padding: 0;
	width: 100%;
	max-width: 1040px;      /* inner-menu-width */
	margin: 0 auto;         /* megaCenterInner */
	float: none;            /* megaCenterInner */
	text-align: center;     /* megaCenterMenuItems */
}

#megaMenu ul.megaMenu > li.menu-item {
	position: relative;
	display: inline-block;
	float: none;            /* megaCenterMenuItems */
	margin: 0;
	padding: 0;
	border: none;
	list-style-type: none;
	list-style-image: none;
	text-align: left;
	letter-spacing: 0;
	font-size: 12px;
	z-index: 200;
}

#megaMenu ul.megaMenu > li.menu-item > a {
	display: block;
	position: relative;
	z-index: 400;
	padding: 12px 15px;     /* custom.css overrides with !important */
	line-height: 1.4em;
	text-decoration: none;
	cursor: pointer;
	border: 0 solid transparent;
	-webkit-transition: all 0.1s ease-in-out;
	transition: all 0.1s ease-in-out;
}

#megaMenu ul.megaMenu > li.menu-item > a span {
	color: inherit;
	font-size: inherit;
}

#megaMenu .wpmega-link-title {
	display: block;
	line-height: 1.4em;
	color: inherit;
}

#megaMenu ul.megaMenu > li.menu-item:hover,
#megaMenu ul.megaMenu > li.menu-item:hover > a {
	z-index: 600;
}

/* Keyboard focus. UberMenu had nothing here at all. */
#megaMenu ul.megaMenu > li.menu-item > a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -2px;
}

/* ---------------------------------------------------------------
   Mobile toggle
   Note: no `color` declared, on purpose. custom.css sets
   .megaMenuToggle { color: white } inside its max-width:767 block, and an ID
   rule here would beat it.
   --------------------------------------------------------------- */
#megaMenu #megaMenuToggle {
	display: none;
	width: 100%;
	margin: 0;
	padding: 12px 15px;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 10px;
	line-height: normal;
	text-transform: uppercase;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

#megaMenu #megaMenuToggle .megaMenuToggle-icon {
	display: inline-block;
	position: relative;
	float: right;
	width: 16px;
	height: 2px;
	margin-top: 10px;
	background: #999;
	background: rgba(230, 230, 230, 0.7);
}

#megaMenu #megaMenuToggle .megaMenuToggle-icon:before,
#megaMenu #megaMenuToggle .megaMenuToggle-icon:after {
	content: '';
	position: absolute;
	width: 16px;
	height: 2px;
}

#megaMenu #megaMenuToggle .megaMenuToggle-icon:before {
	background: rgba(230, 230, 230, 0.8);
	top: -4px;
}

#megaMenu #megaMenuToggle .megaMenuToggle-icon:after {
	background: rgba(230, 230, 230, 0.9);
	top: -8px;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media only screen and (max-width: 767px) {

	#megaMenu #megaMenuToggle {
		display: block;
	}

	#megaMenu.megaResponsiveToggle ul.megaMenu {
		display: none;
	}

	#megaMenu.megaResponsiveToggle ul.megaMenu.megaMenuOpen {
		display: block;
	}

	#megaMenu.megaResponsive ul.megaMenu > li.menu-item {
		width: 100%;
	}

	/* Wrapping is likely here, so drop the divider/shadow */
	#megaMenu.megaResponsive.megaMenuHorizontal ul.megaMenu > li.menu-item > a,
	#megaMenu.megaResponsive ul.megaMenu > li.menu-item:hover > a,
	#megaMenu.megaResponsive ul.megaMenu > li.menu-item > a:hover {
		box-shadow: none;
		border-left: none;
	}
}

/* Two-up on landscape phones, matching UberMenu's old breakpoint */
@media only screen and (min-width: 480px) and (max-width: 767px) {

	#megaMenu.megaResponsive ul.megaMenu > li.menu-item {
		width: 50%;
	}
}

@media only screen and (min-width: 768px) {

	#megaMenu.megaResponsiveToggle ul.megaMenu {
		display: block !important;
	}
}
