/* BEGIN Section Navigation Dropdown

   template-parts/navigation/section-nav-dropdown.php

   Below the lg breakpoint (992px) the section menu moves out of the sidebar,
   where it used to fall below the page content, and into a "Navigate This
   Section" dropdown between the breadcrumbs and the page title. The card
   matches the sidebar menu on larger screens.
*/

.section-nav-dropdown {
	margin-bottom: 1.5rem;
	background-color: #fff;
	border-radius: .375rem;
	box-shadow: 0px 3px 6px #00000029;
}

.section-nav-dropdown-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	min-height: 3.5rem;
	padding: .75rem 1rem;
	border: 0;
	border-radius: .375rem;
	background-color: transparent;
	color: var(--TPA-Primary);
	font-family: 'Trust-2a', sans-serif;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: left;
}

.section-nav-dropdown-toggle .bi {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background-color: var(--TPA-Secondary);
	color: var(--TPA-Primary);
	font-size: .9rem;
	transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.section-nav-dropdown-toggle .bi::before {
	vertical-align: 0;
}

.section-nav-dropdown-toggle:hover .bi {
	background-color: var(--TPA-Primary-Light);
	color: #fff;
}

.section-nav-dropdown-toggle[aria-expanded="true"] .bi {
	background-color: var(--TPA-Primary);
	color: #fff;
	transform: rotate(180deg);
}

.section-nav-dropdown-menu {
	margin: 0;
	padding: .5rem .5rem .75rem;
	border-top: 1px solid var(--TPA-Secondary);
}

.section-nav-dropdown-menu a {
	display: block;
	padding: .7rem .75rem;
	border-radius: .25rem;
	color: var(--TPA-Primary);
	font-size: 1rem;
	line-height: 1.35;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.section-nav-dropdown-menu a:hover {
	background-color: #EDF4F8;
	color: var(--TPA-Primary);
	text-decoration: underline;
}

/* The first item of a WordPress section menu is the section's landing page, set as a title
   like the sidebar menu. The FAQ links aren't menu items, so they don't get this. */
.section-nav-dropdown-menu > li.menu-item:first-child > a {
	font-family: 'Trust-2a', sans-serif;
	font-size: 1.125rem;
	font-weight: 700;
	text-transform: uppercase;
}

.section-nav-dropdown-menu .sub-menu {
	margin: 0 0 .25rem 1.25rem;
	padding: 0 0 0 .5rem;
	border-left: 2px solid var(--TPA-Secondary);
	list-style: none;
}

.section-nav-dropdown-menu a[aria-current="page"],
.section-nav-dropdown-menu a[aria-current="page"]:hover {
	background-color: var(--TPA-Primary);
	color: #fff;
	text-decoration: none;
}

.section-nav-dropdown-toggle:focus-visible,
.section-nav-dropdown-menu a:focus-visible {
	outline: 3px solid var(--TPA-Primary-Light);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.section-nav-dropdown-toggle .bi {
		transition: none;
	}
}

/* Hide the sidebar copy of the menu (and its card) wherever the dropdown is shown.
   Matches every sidebar menu container: #marina-left-nav, #faq-left-nav and so on. */
@media (max-width: 991.98px) {
	.section-nav-dropdown ~ .row #sidebar > [id$="-left-nav"] {
		display: none;
	}
}

/* END Section Navigation Dropdown */
