/**
 * Cart Badge Styles
 * Styles for the AJAX-powered cart count badge
 */

.cart-menu-item > a {
	position: relative;
	display: inline-block;
}

.cart-badge {
	position: absolute;
	top: 12px;
	right: 4px;
	background-color: #ffff03;
	color: #000;
	border-radius: 0px;
	min-width: 20px;
	height: 20px;
	font-size: 11px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	padding: 0 6px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: opacity 0.2s ease, transform 0.2s ease;
	transform-origin: center;
}

/* Hide badge when cart is empty */
.cart-badge[aria-hidden="true"] {
	opacity: 0;
	transform: scale(0);
	pointer-events: none;
}

/* Show badge when cart has items */
.cart-badge.has-items[aria-hidden="false"] {
	opacity: 1;
	transform: scale(1);
}

/* Animation for badge updates */
.cart-badge.has-items {
	animation: cartBadgePulse 0.3s ease;
}

@keyframes cartBadgePulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.2);
	}
	100% {
		transform: scale(1);
	}
}


/* Responsive adjustments */
@media (max-width: 768px) {
	.cart-badge {
		font-size: 10px;
		min-width: 18px;
		height: 18px;
		line-height: 18px;
		padding: 0 5px;
		top: -6px;
		right: -6px;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.cart-badge.has-items {
		border: 2px solid #ffffff;
	}
}
