/**
 * Mobile menu drawer (D2.3). Figma: Mobile menu drawer 118:2119.
 *
 * Full screen, off-white. Header 60 (logo + close, bottom border, padding 0 8 0 20).
 * Nav padding 8 / 20; rows 56 (Mobile H4 navy, bottom border, chevron 20).
 * Solutions sub-list: padding 8 0 12 12, gap 4, items 44 (Body, text colour) + All Solutions.
 * Footer pinned: white, top border, padding 16 20 24, gap 12, two full-width L buttons.
 *
 * States: hidden by default; shown by :target (no JS) or .is-open (dialog.js);
 * .is-active runs the slide-in (DEC-072; instant with reduced motion).
 */

.mv-drawer {
	position: fixed;
	inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0;
	z-index: 300;
	display: none;
	flex-direction: column;
	background: var(--mv-offwhite);
	overscroll-behavior: contain;
}

.mv-drawer:target,
.mv-drawer.is-open {
	display: flex;
}

/* Slide in from the left (the menu button is on the left). */
.mv-drawer.is-open {
	transform: translateX(-100%);
	transition: transform var(--mv-duration-slow) var(--mv-ease-out);
}

.mv-drawer.is-open.is-active {
	transform: none;
}

.mv-drawer__header {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	min-height: 60px;
	padding: 0 var(--mv-space-2) 0 var(--mv-page-margin);
	border-bottom: 1px solid var(--mv-border);
}

.mv-drawer__header .mv-logo__svg {
	width: 120px;
}

.mv-drawer__nav {
	flex: 1;
	overflow-y: auto;
	padding: var(--mv-space-2) var(--mv-page-margin) 0;
	-webkit-overflow-scrolling: touch;
}

.mv-drawer__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 56px;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--mv-border);
	background: none;
	color: var(--mv-navy);
	font-family: var(--mv-font-heading);
	font-size: 18px;            /* Mobile/H4 (fixed: the drawer is mobile-only) */
	line-height: 26px;
	font-weight: var(--mv-weight-semibold);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.mv-drawer__row:hover {
	color: var(--mv-navy);
}

.mv-drawer__row:focus-visible {
	border-radius: var(--mv-radius-sm);
}

.mv-drawer__item.is-current > .mv-drawer__row span {
	text-decoration: underline;
	text-decoration-color: var(--mv-sage);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.mv-drawer__chevron {
	transform: rotate(180deg); /* expanded = chevron up (Figma) */
	transition: transform var(--mv-duration-base) var(--mv-ease-out);
}

.mv-drawer__toggle[aria-expanded="false"] .mv-drawer__chevron {
	transform: none;
}

.mv-drawer__sub {
	display: flex;
	flex-direction: column;
	gap: var(--mv-space-1);
	padding: var(--mv-space-2) 0 var(--mv-space-3) var(--mv-space-3);
	border-bottom: 1px solid var(--mv-border);
}

.mv-drawer__sub[hidden] {
	display: none;
}

.mv-drawer__sub ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--mv-space-1);
}

.mv-drawer__subitem {
	display: flex;
	align-items: center;
	min-height: var(--mv-touch-target);
	color: var(--mv-text);
	font-size: 16px; /* Mobile/Body */
	line-height: 24px;
	text-decoration: none;
}

.mv-drawer__subitem:hover,
.mv-drawer__subitem[aria-current="page"] {
	color: var(--mv-navy);
	font-weight: var(--mv-weight-semibold);
}

.mv-drawer__all {
	align-self: flex-start;
	margin-top: var(--mv-space-1);
}

.mv-drawer__footer {
	display: flex;
	flex: none;
	flex-direction: column;
	gap: var(--mv-space-3);
	padding: var(--mv-space-4) var(--mv-page-margin) var(--mv-space-5);
	padding-bottom: max(var(--mv-space-5), env(safe-area-inset-bottom));
	border-top: 1px solid var(--mv-border);
	background: var(--mv-white);
}

/* The drawer is never used on the desktop header (DEC-090). */
@media (min-width: 1280px) {
	.mv-drawer,
	.mv-drawer:target {
		display: none;
	}
}

/* Page behind an open dialog: no scroll. */
.mv-has-dialog {
	overflow: hidden;
}
