/**
 * Accessible Mega Menu: base styles = MOBILE layout (stacked accordion).
 * The desktop layout lives in amm-desktop.css and only loads above the configured breakpoint.
 *
 * Override any of the variables below in Appearance > Customize > Additional CSS, e.g.
 *   .amm__list { --amm-accent: #0b6b2e; --amm-container: 1240px; }
 */

.amm__list {
	--amm-text: #14351b;
	--amm-heading: #2d5513;
	--amm-accent: #1b6b2f;
	--amm-card-bg: #f4f6e3;
	--amm-card-text: #2d5513;
	--amm-icon-bg: #eef3d9;
	--amm-line: #c9cfb5;
	--amm-divider: #c9cfb5;
	--amm-focus: #0a3d91;
	--amm-panel-bg: #ffffff;

	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--amm-text);
}

.amm__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.amm__list .amm__item {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--amm-divider);
}

.amm__list .amm__item::marker,
.amm__list .amm__link-item::marker {
	content: none;
}

/* Top-level controls ------------------------------------------------ */

.amm__list .amm__toggle,
.amm__list .amm__link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 1rem 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--amm-heading);
	font: inherit;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.amm__list .amm__label {
	border-bottom: 2px solid transparent;
}

.amm__list .amm__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--amm-icon-bg);
}

.amm__list .amm__icon img {
	display: block;
	width: 1rem;
	height: 1rem;
	max-width: none;
	object-fit: contain;
}

.amm__list .amm__chevron {
	flex: 0 0 auto;
	margin-inline: auto 0.75rem;
	transition: transform 0.15s ease;
}

.amm__list .amm__toggle[aria-expanded="true"] .amm__chevron {
	transform: rotate(180deg);
}

/* Visually hidden helper text */
.amm__list .amm__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Focus ---------------------------------------------------------------- */

.amm__list a:focus-visible,
.amm__list button:focus-visible {
	outline: 3px solid var(--amm-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #fff;
	border-radius: 2px;
}

/* Panel (mobile: plain, indented under the label) -------------------------- */

.amm__list .amm__panel {
	padding: 0 0 1.25rem 2.5rem;
	background: transparent;
}

.amm__list .amm__panel[hidden] {
	display: none;
}

.amm__list .amm__card {
	display: block;
	margin: 0 0 1rem;
	padding: 0;
	background: transparent;
	color: var(--amm-heading);
}

.amm__list .amm__card-icon {
	display: none;
}

.amm__list .amm__card-desc {
	margin: 0;
	padding-inline-end: 1rem;
	font-size: 1rem;
	line-height: 1.45;
	color: var(--amm-heading);
}

/*
 * On mobile the card title duplicates the toggle label, so it is hidden visually.
 * It stays in the page for screen readers, and becomes visible when it receives keyboard focus,
 * so the section's landing page is still reachable.
 */
.amm__list .amm__card-title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.amm__list .amm__card-title:focus-within {
	position: static;
	width: auto;
	height: auto;
	margin: 0 0 0.35rem;
	overflow: visible;
	clip: auto;
	white-space: normal;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
}

.amm__list .amm__card-title a {
	color: var(--amm-heading);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.amm__list .amm__cols {
	display: block;
	padding-inline-end: 1rem;
}

.amm__list .amm__col {
	margin: 1.25rem 0 0;
}

.amm__list .amm__heading {
	margin: 0 0 0.25rem;
	padding: 0 0 0.6rem;
	border-bottom: 1px dotted var(--amm-line);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--amm-heading);
}

.amm__list .amm__heading a {
	color: inherit;
	text-decoration: none;
}

.amm__list .amm__links {
	padding-inline-start: 0.75rem;
}

.amm__list .amm__link-sub {
	display: block;
	padding: 0.5rem 0;
	color: var(--amm-heading);
	font-size: 1rem;
	line-height: 1.35;
	text-decoration: none;
}

.amm__list .amm__heading a:hover,
.amm__list .amm__link-sub:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.amm__list .amm__link-sub[aria-current="page"] {
	font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
	.amm__list .amm__chevron {
		transition: none;
	}
}

@media (forced-colors: active) {
	.amm__list a:focus-visible,
	.amm__list button:focus-visible {
		outline-color: Highlight;
	}
}
