/* Mobile Menu (Peats) — accordion styles
   Scoped under .mm-root so it will not leak into the rest of the popup/theme.
   Override the CSS variables below to re-skin without touching the rules. */

.mm-root {
	--mm-text:        #ffffff;
	--mm-text-sub:    rgba(255, 255, 255, 0.78);
	--mm-accent:      #ffffff; /* hover/active highlight on dark bg */
	--mm-border:      transparent;
	--mm-bg:          transparent;
	--mm-bg-1:        rgba(255, 255, 255, 0.04); /* depth 1 panel tint */
	--mm-bg-2:        rgba(255, 255, 255, 0.08); /* depth 2 panel tint */
	--mm-row-pad:     16px;
	--mm-indent:      14px;
	--mm-font:        "Maven Pro", Sans-serif;

	box-sizing: border-box;
	width: 100%;
	font-family: var(--mm-font);
	color: var(--mm-text);
	background: var(--mm-bg);
	-webkit-tap-highlight-color: transparent;
}

.mm-root *,
.mm-root *::before,
.mm-root *::after {
	box-sizing: border-box;
}

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

.mm-item {
	border-bottom: 1px solid var(--mm-border);
}
.mm-list .mm-list .mm-item:last-child {
	border-bottom: 0;
}

/* Row = label + toggle button on one line */
.mm-row {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 0;
}

.mm-link {
	flex: 1 1 auto;
	display: block;
	padding: var(--mm-row-pad);
	padding-left: 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	text-decoration: none;
	color: var(--mm-text);
	min-width: 0;
}
.mm-link:hover,
.mm-link:focus {
	color: var(--mm-accent);
}

/* Heading rows with no link are themselves the toggle — show a pointer
   across the whole row (label + chevron area). */
.mm-row--toggle,
.mm-row--toggle .mm-heading {
	cursor: pointer;
}

/* Leaf (final) links are lighter / smaller than branch labels */
.mm-leaf .mm-link {
	font-weight: 500;
	color: #ffffff;
}

/* The expand / collapse button */
.mm-toggle {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: var(--mm-text-sub);
	cursor: pointer;
}
.mm-toggle:focus-visible {
	outline: 2px solid var(--mm-accent);
	outline-offset: -2px;
}

/* Override theme's global button:hover/focus rule (e.g. pink #c36 background).
   Specificity is raised above [type=button]:hover so the menu stays flat. */
.mm-root .mm-toggle,
.mm-root .mm-toggle:hover,
.mm-root .mm-toggle:focus {
	background-color: transparent;
	color: var(--mm-text-sub);
	text-decoration: none;
}
.mm-root .mm-item.is-open > .mm-row > .mm-toggle:hover,
.mm-root .mm-item.is-open > .mm-row > .mm-toggle:focus {
	color: var(--mm-accent);
}

.mm-chevron {
	width: 14px;
	height: 14px;
	fill: currentColor;
	transition: transform 0.25s ease;
}

/* Rotate chevron when the branch is open */
.mm-item.is-open > .mm-row > .mm-toggle .mm-chevron {
	transform: rotate(180deg);
}
.mm-item.is-open > .mm-row > .mm-toggle {
	color: var(--mm-accent);
}

/* Collapsible panel — animated with the grid-rows 0fr/1fr technique,
   which handles variable + nested content height without JS measuring. */
.mm-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.28s ease;
}
.mm-item.is-open > .mm-panel {
	grid-template-rows: 1fr;
}
.mm-panel-inner {
	overflow: hidden;
	min-height: 0;
}

/* Indentation + subtle background tint per depth */
.mm-depth-1 {
	background: var(--mm-bg-1);
}
.mm-depth-2 {
	background: var(--mm-bg-2);
}
.mm-depth-1 .mm-link {
	padding-left: calc(var(--mm-row-pad) + var(--mm-indent));
	font-size: 15px;
}
.mm-depth-2 .mm-link {
	padding-left: calc(var(--mm-row-pad) + (var(--mm-indent) * 2));
	font-size: 14px;
}

/* Reduced motion: skip the open/close animation */
@media (prefers-reduced-motion: reduce) {
	.mm-panel,
	.mm-chevron {
		transition: none;
	}
}
