/* Account menu — parts/account/menu.php in the header dropdown (components/account-menu.php) and in the account
   pages' menu card (woocommerce/myaccount/navigation.php). Dropdown: White rounded panel under «پنل کاربری», opened by hover or
   keyboard focus (CSS only), aligned to the button's left edge (the header's end). Uses the account page's look (regular / medium weights, no heavy black):
   local avatar, the account menu's icons, grey hover rows, «خروج» in red. Not on touch screens / phones. */
.account-menu { position: relative; margin-inline-start: 4px; }
.account-menu .account-button { margin-inline-start: 0; color: var(--n-20, #333); font-size: 15px; font-weight: 500; letter-spacing: 0; } /* medium, like the main menu — not heavy black */
.account-menu:hover .account-button, .account-menu:focus-within .account-button { background: #f4f5f6; }
.account-menu .account-button__arrow { transition: rotate .2s; }
.account-menu__panel {
	position: absolute;
	top: calc(100% + var(--sp-8));
	inset-inline-end: 0;
	z-index: 950;
	display: grid;
	gap: 4px;
	width: 280px;
	padding: var(--sp-12);
	border-radius: var(--r-16);
	background: var(--n-100);
	border: 1px solid var(--n-95);
	box-shadow: 0 16px 40px -8px rgb(0 0 0 / .12);
	opacity: 0;
	visibility: hidden;
	translate: 0 6px;
	transition: opacity .2s, translate .2s, visibility .2s;
}
.account-menu__panel::before { content: ""; position: absolute; inset-inline: 0; bottom: 100%; height: var(--sp-12); } /* hover bridge over the gap */
.account-menu:hover .account-menu__panel, .account-menu:focus-within .account-menu__panel { opacity: 1; visibility: visible; translate: 0 0; }
.account-menu:hover .account-button__arrow, .account-menu:focus-within .account-button__arrow { rotate: 180deg; }

.account-menu__user { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 var(--sp-12); margin: 0 0 var(--sp-8); padding: var(--sp-8) var(--sp-8) var(--sp-16); border-bottom: 1px solid var(--n-95); }
.account-menu__avatar { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; font-size: var(--fs-title-s); font-weight: 600; }
.account-menu__avatar--blue { color: var(--blue-dark); background: var(--blue-light-active); }
.account-menu__avatar--orange { color: var(--orange-dark); background: var(--orange-light-active); }
.account-menu__avatar--neutral { color: var(--n-30); background: var(--n-90); }
.account-menu__user strong { overflow: hidden; color: var(--n-20, #333); font-size: var(--fs-body-m); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-menu__user bdi { justify-self: start; color: var(--n-50); font-size: var(--fs-body-s); }

.account-menu__links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.account-menu__links a, .account-menu__logout { display: flex; align-items: center; gap: var(--sp-12); padding: 10px var(--sp-12); border-radius: var(--r-12); color: var(--n-30); font-size: var(--fs-body-m); font-weight: 400; transition: color .15s, background-color .15s; }
.account-menu__links .icon, .account-menu__logout .icon { flex: none; color: var(--n-50); font-size: 20px; transition: color .15s; }
.account-menu__links a:hover { color: var(--n-20, #333); background: var(--n-97); }
.account-menu__links a:hover .icon { color: var(--blue); }
.account-menu__links a[aria-current="page"] { color: var(--blue); background: var(--blue-light); font-weight: 500; } /* the page being viewed (menu card) */
.account-menu__links a[aria-current="page"] .icon { color: var(--blue); }
.account-menu__badge { margin-inline-start: auto; padding: 2px var(--sp-8); border-radius: var(--r-pill); color: var(--blue-dark); background: var(--blue-light); font-size: var(--fs-label-m); font-weight: 500; }
.account-menu__logout { margin-top: var(--sp-8); border-top: 1px solid var(--n-95); border-radius: 0 0 var(--r-12) var(--r-12); padding-top: var(--sp-12); }
.account-menu__logout, .account-menu__logout .icon { color: var(--c-danger); }
.account-menu__logout:hover { color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 8%, transparent); }
.account-menu a:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* «پشتیبانی و چت آنلاین» (parts/account/menu.php): a small green "online" dot at the end */
.account-menu__support { position: relative; }
.account-menu__live { width: 8px; height: 8px; margin-inline-start: auto; border-radius: 50%; background: #25D366; box-shadow: 0 0 0 3px #e3f8ea; }

@media (hover: none), (max-width: 769px) {
	.account-menu__panel { display: none; } /* touch: the button just opens the dashboard */
	.account-menu { margin-inline-start: 0; }
}
