/*
 * Lekker V2, piece C: menu flow and style. LIVE when "c" is in option
 * lp_v2_features. Styles the existing primary menu (id 50) without changing
 * its items: desktop dropdowns, and on phones a dark drawer where Learn opens
 * in place (v2.php adds the small script that lets the section name open it).
 * Scoped under body.lp-v2c; uses the tokens from base.css (piece A).
 */

/* 8a. Desktop menu */
@media (min-width: 922px) {
	body.lp-v2c .main-header-menu > .menu-item > .menu-link {
		color: #fff !important;
		font-family: var(--v2-sans);
		font-size: 0.875rem;
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		padding: 0 18px;
		min-height: 44px;
	}
	body.lp-v2c .main-header-menu > .menu-item > .menu-link:hover,
	body.lp-v2c .main-header-menu > .current-menu-item > .menu-link,
	body.lp-v2c .main-header-menu > .current-menu-ancestor > .menu-link { color: var(--v2-lime) !important; }
	body.lp-v2c .main-header-menu .sub-menu {
		min-width: 240px;
		padding: 8px;
		border: 1px solid var(--v2-line) !important;
		border-radius: var(--v2-radius);
		background: var(--v2-paper);
		box-shadow: var(--v2-shadow);
	}
	body.lp-v2c .main-header-menu .sub-menu .menu-link {
		padding: 10px 12px !important;
		border-radius: var(--v2-radius-s);
		color: var(--v2-ink) !important;
		font-size: 0.9375rem;
		font-weight: 500;
		text-transform: none;
		letter-spacing: 0;
	}
	body.lp-v2c .main-header-menu .sub-menu .menu-link:hover { background: var(--v2-bone); }
	body.lp-v2c .main-header-menu .sub-menu .menu-link .ast-icon { display: none; }
}

/* 8b. Phone menu drawer: three sections that open in place.
 * The older stages style the drawer with #ast-mobile-popup and !important, so
 * every rule here carries body.lp-v2c #ast-mobile-popup to win cleanly. */
body.lp-v2c #ast-mobile-popup .ast-mobile-popup-inner,
body.lp-v2c #ast-mobile-popup .ast-mobile-popup-content {
	background-color: var(--v2-ink) !important;
}
body.lp-v2c #ast-mobile-popup .ast-mobile-popup-inner { width: min(88vw, 400px); max-width: 400px; }
body.lp-v2c #ast-mobile-popup .ast-mobile-popup-header {
	display: flex;
	justify-content: flex-end;
	min-height: 60px !important;
	padding: 8px 10px !important;
}
body.lp-v2c #ast-mobile-popup .menu-toggle-close {
	width: 44px;
	height: 44px;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
body.lp-v2c #ast-mobile-popup .ast-mobile-popup-content { display: flex; flex-direction: column; padding: 0 0 32px !important; }
body.lp-v2c #ast-mobile-popup .ast-builder-menu-1 { order: 1; }
body.lp-v2c #ast-mobile-popup .ast-header-account { order: 2; }

/* Rows */
body.lp-v2c #ast-mobile-popup .main-header-menu { border: 0 !important; }
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item {
	position: relative;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item > .menu-link {
	display: flex !important;
	align-items: center;
	min-height: 60px !important;
	padding: 0 64px 0 24px !important;
	color: #fff !important;
	font-family: var(--v2-display) !important;
	font-size: 1.5rem !important;
	font-weight: 520 !important;
	letter-spacing: -0.01em !important;
	text-transform: none !important;
	line-height: 1.2 !important;
}
body.lp-v2c #ast-mobile-popup .main-header-menu > .current-menu-item > .menu-link,
body.lp-v2c #ast-mobile-popup .main-header-menu > .current-menu-ancestor > .menu-link { color: var(--v2-lime) !important; background: transparent !important; }

/* Sections start closed and open in place. */
body.lp-v2c #ast-mobile-popup .menu-item-has-children > .sub-menu,
body.lp-v2c.ast-header-break-point #ast-mobile-popup .menu-item-has-children > .sub-menu {
	display: none !important;
	margin: 0 !important;
	padding: 0 0 14px !important;
	border: 0 !important;
	background: transparent !important;
}
body.lp-v2c #ast-mobile-popup .menu-item-has-children.ast-submenu-expanded > .sub-menu,
body.lp-v2c.ast-header-break-point #ast-mobile-popup .menu-item-has-children.ast-submenu-expanded > .sub-menu { display: block !important; }
body.lp-v2c #ast-mobile-popup .menu-item-has-children > .ast-menu-toggle {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	position: absolute !important;
	top: 6px !important;
	right: 10px !important;
	width: 48px !important;
	height: 48px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: rgba(255, 255, 255, 0.7) !important;
	transition: transform 0.2s ease;
}
body.lp-v2c #ast-mobile-popup .menu-item-has-children > .ast-menu-toggle svg { width: 16px; height: 16px; fill: currentColor !important; }
body.lp-v2c #ast-mobile-popup .menu-item-has-children.ast-submenu-expanded > .ast-menu-toggle { transform: rotate(180deg); color: var(--v2-lime) !important; }

body.lp-v2c #ast-mobile-popup .sub-menu .menu-item { border: 0 !important; }
body.lp-v2c #ast-mobile-popup .sub-menu .menu-item > .menu-link {
	display: flex !important;
	align-items: center;
	min-height: 46px !important;
	padding: 0 24px 0 24px !important;
	color: #d3dae8 !important;
	font-family: var(--v2-sans) !important;
	font-size: 1.0625rem !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}
body.lp-v2c #ast-mobile-popup .sub-menu .menu-item > .menu-link:hover,
body.lp-v2c #ast-mobile-popup .sub-menu .current-menu-item > .menu-link { color: #fff !important; }
body.lp-v2c #ast-mobile-popup .sub-menu .menu-link .ast-icon,
body.lp-v2c #ast-mobile-popup .sub-menu .menu-link::after,
body.lp-v2c #ast-mobile-popup .sub-menu .menu-link::before { display: none !important; content: none !important; }

/* Utility rows under the sections: wishlist and account, quieter. */
body.lp-v2c #ast-mobile-popup .main-header-menu > .lp-wl-menu > .menu-link,
body.lp-v2c #ast-mobile-popup .ast-header-account-link {
	min-height: 52px !important;
	padding: 0 24px !important;
	color: #d3dae8 !important;
	font-family: var(--v2-sans) !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}
body.lp-v2c #ast-mobile-popup .main-header-menu > .lp-wl-menu { border-bottom: 0 !important; }
body.lp-v2c #ast-mobile-popup .ast-header-account { margin-top: 4px !important; }


/* Drawer leftovers from the older stages: row rules, the edge on the open
 * section and the chevron after single links. */
body.lp-v2c #ast-mobile-popup .sub-menu .menu-item,
body.lp-v2c #ast-mobile-popup .sub-menu .menu-item > .menu-link,
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item > .menu-link {
	border-top: 0 !important;
	border-bottom: 0 !important;
	border-left: 0 !important;
	box-shadow: none !important;
}
body.lp-v2c #ast-mobile-popup .sub-menu .current-menu-item > .menu-link { background: rgba(255, 255, 255, 0.06) !important; }
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item:not(.menu-item-has-children) > .menu-link::after,
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item:not(.menu-item-has-children) > .menu-link .ast-icon { display: none !important; content: none !important; }
/* The older stages draw a bar beside the current item and a box around the
 * close button; neither belongs in the drawer. */
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item,
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item > .menu-link {
	border-left: 0 !important;
	box-shadow: none !important;
}
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item::before,
body.lp-v2c #ast-mobile-popup .main-header-menu > .menu-item > .menu-link::before { display: none !important; content: none !important; }
body.lp-v2c #ast-mobile-popup .menu-toggle-close {
	border: 0 !important;
	outline: 0;
	box-shadow: none !important;
	background: transparent !important;
}
body.lp-v2c #ast-mobile-popup .menu-toggle-close:focus-visible { outline: 3px solid var(--v2-lime, #8cc63f); outline-offset: 2px; }
