/* Icon button with count badge — Figma node 4026:1082 (wishlist, cart).
   - Quiet grey hover, the same as «پنل کاربری».
   - Badges: cart = orange with navy digits (the one that matters), wishlist = small navy; a zero count is hidden (.is-zero).
   - Cart: on desktop the short total sits next to the icon (.action-button__total, inc/woocommerce.php).
   - .is-bump (set for a moment after an add, inc/overrides.php): the icon nods and the badge pops. */
.action-button {
	position: relative;
	display: grid;
	place-items: center;
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: var(--r-12);
	color: var(--n-10);
	transition: background-color .15s, color .15s;
}

.action-button:hover { color: var(--n-10); background: #f4f5f6; }

.action-button__badge {
	position: absolute;
	top: -2px;
	right: 0;
	min-width: 20px;
	height: 20px;
	padding-inline: 5px;
	border-radius: var(--r-pill);
	box-shadow: 0 0 0 2px var(--n-100);
	color: #072C3D;
	background: #FF820E;
	font-size: var(--fs-label-m); /* Figma: 15px; 12px keeps two-digit counts inside the circle */
	font-weight: 600;
	line-height: 20px;
	text-align: center;
}
.action-button__badge.is-zero { display: none; }
.site-header__wishlist .action-button__badge { top: 2px; right: 3px; min-width: 16px; height: 16px; padding-inline: 4px; color: #fff; background: #072C3D; font-size: 10.5px; font-weight: 500; line-height: 16px; }

/* Cart total next to the icon (desktop) */
.action-button__total { display: none; }
@media (min-width: 770px) {
	.site-header__cart:has(.action-button__total:not(.is-empty)) { grid-auto-flow: column; gap: 8px; width: auto; padding-inline: 12px 10px; }
	.action-button__total:not(.is-empty) { display: grid; line-height: 1.15; text-align: start; }
	.action-button__total b { color: #072C3D; font-size: 14px; font-weight: 600; white-space: nowrap; }
	.action-button__total small { color: var(--n-50); font-size: 11px; }
}

/* Feedback after adding */
@keyframes az-nod { 0%, 100% { rotate: 0deg; } 25% { rotate: -14deg; } 50% { rotate: 10deg; } 75% { rotate: -5deg; } }
@keyframes az-pop { 0% { scale: 1; } 40% { scale: 1.45; } 100% { scale: 1; } }
.action-button.is-bump > .icon { animation: az-nod .55s ease-in-out; }
.action-button.is-bump .action-button__badge { animation: az-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@media (prefers-reduced-motion: reduce) { .action-button.is-bump > .icon, .action-button.is-bump .action-button__badge { animation: none; } }
