/* ============================================================================
 * bm-account-nav — My Account sidebar, compact card version.
 *
 * Replaces the loose 220px list from style.css (Section E / Round 25b) and
 * bm-optimize.css ("Account nav sidebar" block) with one card: avatar header +
 * grouped, tighter rows, orange active state matching the rest of the shop
 * (--bm-orange #ea580c — same as the order-flow arrow bar and the T/T forms).
 *
 * ⚠ Two hazards, both verified in the browser:
 *   1) The older blocks declare their values with !important (font-size 14px,
 *      padding 14/18, li borders, ul/nav border+radius, navy active bg), so
 *      every override here carries !important too.
 *   2) style.css prints AFTER this stylesheet (same handle-less <link>, later
 *      in the head), so at equal specificity the old rule still wins. Hence
 *      every selector below is anchored with `html body` — one attribute above
 *      the originals — and wins on specificity rather than on load order.
 *
 * Group captions are pseudo rows injected by bm_of_account_menu() in
 * inc/bm-order-flow.php; the footer script strips their href.
 * ========================================================================== */

/* 1) One card around avatar + nav */
html body.woocommerce-account.logged-in .woocommerce > .account-navigation-wrap {
	background: #fff !important;
	border: 1px solid var(--bm-line, #e5e7eb) !important;
	border-radius: var(--bm-radius-lg, 10px) !important;
	overflow: hidden !important;
	align-self: flex-start;
}

/* the <nav> and the <ul> must not draw extra cards inside it */
html body.woocommerce-account .woocommerce-MyAccount-navigation,
html body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	padding: 4px 0 6px !important;
	list-style: none !important;
}

/* avatar row becomes the card header, not a box inside a box */
html body.woocommerce-account.logged-in .woocommerce > .account-navigation-wrap > .kadence-account-avatar {
	background: none !important;
	border: 0 !important;
	border-bottom: 1px solid var(--bm-line, #e5e7eb) !important;
	border-radius: 0 !important;
	padding: 12px 14px !important;
	margin: 0 !important;
}

html body.woocommerce-account.logged-in .woocommerce > .account-navigation-wrap .kadence-customer-name {
	font-size: 13px !important;
}

/* 2) Tight rows */
html body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	margin: 0 !important;
	border: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block !important;
	align-items: initial !important;
	gap: 0 !important;
	padding: 7px 14px !important;
	font-size: 12.5px !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	color: var(--bm-navy, #111827) !important;
	background: transparent !important;
	border: 0 !important;
	border-left: 3px solid transparent !important;
	text-decoration: none !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	background: #f7f8fa !important;
	color: var(--bm-orange, #ea580c) !important;
	border-left-color: #f6cdae !important;
}

/* 3) Active row — orange (was #ff4141 from style.css L9520 / navy from bm-optimize) */
html body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
html body.woocommerce-account .woocommerce-MyAccount-navigation ul li.current-menu-item a {
	background: #fff4ec !important;
	color: var(--bm-orange, #ea580c) !important;
	border-left-color: var(--bm-orange, #ea580c) !important;
	font-weight: 700 !important;
}

/* 4) Group captions (Delivery / Account) — plain text, not a link */
html body.woocommerce-account .woocommerce-MyAccount-navigation ul li[class*="navigation-link--group-"] {
	padding: 10px 14px 3px !important;
	border-top: 0 !important;
	pointer-events: none !important;
	user-select: none !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation ul li[class*="navigation-link--group-"] a,
html body.woocommerce-account .woocommerce-MyAccount-navigation ul li[class*="navigation-link--group-"] a:hover {
	display: block !important;
	padding: 0 !important;
	font-family: inherit !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: .07em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	color: #9ca3af !important;
	background: none !important;
	border: 0 !important;
	border-left: 0 !important;
}

/* 5) Log out sits last, separated by a rule and muted */
html body.woocommerce-account .woocommerce-MyAccount-navigation ul li[class*="navigation-link--customer-logout"] {
	margin-top: 8px !important;
	padding-top: 7px !important;
	border-top: 1px solid var(--bm-line, #e5e7eb) !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation ul li[class*="navigation-link--customer-logout"] a {
	color: #6b7280 !important;
	font-weight: 400 !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation ul li[class*="navigation-link--customer-logout"] a:hover {
	color: #dc2626 !important;
	background: #fef2f2 !important;
	border-left-color: #fecaca !important;
}

/* 6) Narrow screens: card goes full width, rows get a touch taller */
@media (max-width: 900px) {

	html body.woocommerce-account.logged-in .woocommerce > .account-navigation-wrap {
		margin: 0 0 14px !important;
	}

	html body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
		padding: 9px 14px !important;
		font-size: 13px !important;
	}
}
