/**
 * Horizon - Navigation
 *
 * Styles the markup produced by core's menu_bs5.cfm (split dropdowns: the parent label is a
 * link, a separate toggle opens the dropdown). Structure follows _Starter/Ledger; the look
 * follows the Horizon handoff.
 *
 * Compact (the default; below 992px, or at 992px+ when theme.js adds .is-compact because the
 * row does not fit): the Menu button opens a full-width panel under the header with every
 * item and its children listed, then search, the header button and Log in.
 * Desktop (992px+, not compact): one row right of the logo; dropdowns open on hover and
 * keyboard focus, with no animation.
 *
 * Two levels by design. menu_bs5 renders deeper levels (.dropend); they are hidden here.
 */

@charset "UTF-8";

/* Bootstrap's .navbar class is kept only so dropdowns skip Popper positioning; its layout is
   reset. position: static lets the compact panel position against the header. */
.hz-nav.navbar {
	position: static;
	display: block;
	padding: 0;
	background: transparent;
	box-shadow: none;
	border: 0;
	height: auto !important;
	flex-wrap: nowrap;
}
.hz-nav .hz-nav-list { margin: 0; padding: 0; }

/* Two levels only */
.hz-nav .dropdown-menu .dropdown-menu,
.hz-nav .dropend > .dropdown-toggle-split { display: none !important; }

/* ========================================
   Compact panel (default)
   ======================================== */
.hz-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1020;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	padding: 0 max(var(--hz-gutter), calc((100% - var(--hz-container)) / 2)) 28px;
	border-bottom: 1px solid var(--hz-ink);
	background: #fff;
	font-family: var(--hz-font-heading);
}
.hz-nav .hz-nav-list { flex-direction: column; }
.hz-nav .hz-nav-list > .nav-item {
	display: block;
	padding: 4px 0;
	border-bottom: 1px solid var(--hz-line);
}
.hz-nav .hz-nav-list > .nav-item > .nav-link:not(.dropdown-toggle-split) {
	display: flex;
	align-items: center;
	min-height: 52px;
	padding: 0;
	color: var(--hz-ink);
	font-size: 21px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}
.hz-nav .hz-nav-list > .nav-item > .nav-link.active:not(.dropdown-toggle-split) { text-decoration: underline; text-decoration-color: var(--hz-secondary); text-decoration-thickness: 2px; }
.hz-nav .hz-nav-list > .nav-item > .nav-link:not(.dropdown-toggle-split):hover { color: var(--hz-ink); text-decoration: underline; }
/* Children are always listed in the panel, so the separate toggle is not needed */
.hz-nav .hz-nav-list > .dropdown > .dropdown-toggle-split { display: none; }
.hz-nav .hz-nav-list > .dropdown > .dropdown-menu {
	position: static !important;
	display: block;
	float: none;
	min-width: 0;
	margin: 0;
	padding: 0 0 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	transform: none !important;
	inset: auto !important;
}
.hz-nav .dropdown-item {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0 0 16px;
	background: transparent;
	color: var(--hz-muted);
	font-size: 17px;
	line-height: 1.3;
	white-space: normal;
}
.hz-nav .dropdown-item:hover,
.hz-nav .dropdown-item:focus-visible { background: transparent; color: var(--hz-ink); text-decoration: underline; }
.hz-nav .dropdown-item.active { background: transparent; color: var(--hz-ink); font-weight: 500; }

/* Panel extras: search field, then header button (solid) + account links (outlined) */
.hz-menu-search .hz-search .header-search-form {
	height: 48px;
	margin: 20px 0 12px;
	border: 1px solid var(--hz-ink);
}
.hz-menu-search .hz-search .header-search-form::before { display: none; }
.hz-menu-search .hz-search #headerSearchInput {
	flex: 1;
	height: 100% !important;
	padding: 0 14px;
	color: var(--hz-ink);
	font-size: 17px;
}
.hz-menu-search .hz-search #headerSearchInput::placeholder { color: #75777D; opacity: 1; }
.hz-menu-search .hz-search .btn-search {
	display: grid;
	place-items: center;
	flex: none;
	width: 48px;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--hz-ink);
	font-size: 0;  /* the word "Search" stays as the accessible name; the glyph is drawn */
	box-shadow: none;
}
.hz-menu-search .hz-search .btn-search::before { width: 16px; height: 16px; }
.hz-menu-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
}
.hz-menu-search:not(:has(.hz-search)) + .hz-menu-actions { margin-top: 20px; }
.hz-menu-button { flex: 1 1 140px; }
.hz-menu-button p { margin: 0; }
.hz-menu-button a,
.hz-menu-account {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 16px;
	font-size: 16px;
	text-decoration: none;
}
.hz-menu-button a {
	width: 100%;
	border: 1px solid var(--hz-primary);
	background: var(--hz-primary);
	color: #fff;
	font-weight: 500;
}
.hz-menu-button a:hover { background: var(--hz-primary-dark); border-color: var(--hz-primary-dark); color: #fff; }
.hz-menu-account {
	flex: 1 1 120px;
	border: 1px solid var(--hz-ink);
	color: var(--hz-ink);
}
.hz-menu-account:hover { background: var(--hz-primary-tint); color: var(--hz-ink); }

/* ========================================
   Desktop (992px+, not compact)
   ======================================== */
@media (min-width: 992px) {
	.hz-header:not(.is-compact) .hz-nav { margin-left: auto; }
	.hz-header:not(.is-compact) .hz-menu {
		position: static;
		display: flex !important;   /* beats Bootstrap's .collapse:not(.show) */
		height: auto !important;
		max-height: none;
		overflow: visible;
		padding: 0;
		border: 0;
		background: transparent;
	}
	.hz-header:not(.is-compact) .hz-menu-extra { display: none; }

	.hz-header:not(.is-compact) .hz-nav-list {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
	}
	.hz-header:not(.is-compact) .hz-nav-list > .nav-item {
		position: relative;
		display: flex;
		align-items: center;
		padding: 0;
		border: 0;
	}
	.hz-header:not(.is-compact) .hz-nav-list > .nav-item > .nav-link:not(.dropdown-toggle-split) {
		min-height: 0;
		padding: 30px 14px;
		font-size: 16px;
		font-weight: 500;
		line-height: 1.25;
		white-space: nowrap;
	}
	.hz-header:not(.is-compact) .hz-nav-list > .nav-item:is(:hover, :focus-within) > .nav-link:not(.dropdown-toggle-split) {
		color: var(--hz-ink);
		text-decoration: underline;
		text-decoration-thickness: 1px;
	}
	/* Split parent: label + a 10px "plus" toggle sit together */
	.hz-header:not(.is-compact) .hz-nav-list > .dropdown > .nav-link:not(.dropdown-toggle-split) { padding-right: 4px; }
	.hz-header:not(.is-compact) .hz-nav-list > .dropdown > .dropdown-toggle-split {
		display: inline-flex;
		align-items: center;
		align-self: stretch;
		padding: 0 14px 0 2px;
		color: var(--hz-muted);
	}
	.hz-header:not(.is-compact) .hz-nav .dropdown-toggle-split::after {
		content: "";
		display: inline-block;
		width: 10px;
		height: 10px;
		margin: 0;
		border: 0;
		vertical-align: middle;
		background-color: currentColor;
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M256 80a32 32 0 0 0-64 0v144H48a32 32 0 0 0 0 64h144v144a32 32 0 0 0 64 0V288h144a32 32 0 0 0 0-64H256z'/%3E%3C/svg%3E") center / contain no-repeat;
		        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M256 80a32 32 0 0 0-64 0v144H48a32 32 0 0 0 0 64h144v144a32 32 0 0 0 64 0V288h144a32 32 0 0 0 0-64H256z'/%3E%3C/svg%3E") center / contain no-repeat;
	}

	/* Dropdown: titles only, one level, 1px ink border, opens on hover / focus, no animation */
	.hz-header:not(.is-compact) .hz-nav-list > .dropdown > .dropdown-menu {
		position: absolute !important;
		top: calc(100% - 1px) !important;
		left: 0 !important;
		right: auto !important;
		display: none;
		min-width: 240px;
		padding: 6px 0;
		border: 1px solid var(--hz-ink);
		background: #fff;
	}
	/* The last item opens leftwards so the panel stays on screen */
	.hz-header:not(.is-compact) .hz-nav-list > .dropdown:last-child > .dropdown-menu { left: auto !important; right: 0 !important; }
	.hz-header:not(.is-compact) .hz-nav-list > .dropdown:is(:hover, :focus-within) > .dropdown-menu,
	.hz-header:not(.is-compact) .hz-nav-list > .dropdown > .dropdown-menu.show { display: block; }
	.hz-header:not(.is-compact) .hz-nav .dropdown-item {
		display: block;
		min-height: 0;
		padding: 11px 18px;
		color: var(--hz-ink);
		font-size: 16px;
		line-height: 1.35;
	}
	.hz-header:not(.is-compact) .hz-nav .dropdown-item:hover,
	.hz-header:not(.is-compact) .hz-nav .dropdown-item:focus-visible,
	.hz-header:not(.is-compact) .hz-nav .dropdown-item.active {
		background: var(--hz-primary-tint);
		color: var(--hz-ink);
		text-decoration: none;
	}
	.hz-header:not(.is-compact) .hz-nav .dropdown-item:focus-visible { outline-offset: -3px; }
}
