/* Add-to-cart feedback (GPS Necessery) */

/* Header cart badge */
.gps-cart-icon { position: relative; }
.gps-cart-count {
	position: absolute;
	top: -7px;
	right: -9px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #DC2626;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
	pointer-events: none;
}
.gps-cart-count.is-empty { display: none; }
.gps-cart-icon.is-bump .gps-cart-count { animation: gps-cart-bump .55s ease; }
@keyframes gps-cart-bump {
	0% { transform: scale(1); }
	30% { transform: scale(1.45); }
	60% { transform: scale(.9); }
	100% { transform: scale(1); }
}

/* "View cart" link after an AJAX add (Astra hides it with .woocommerce a.added_to_cart) */
.gps-product-card a.added_to_cart.wc-forward,
.woocommerce .gps-product-card a.added_to_cart.wc-forward,
.mgps-page a.added_to_cart.wc-forward,
.woocommerce .mgps-page a.added_to_cart.wc-forward {
	display: block !important;
	margin-top: 8px;
	padding: 0;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: #DC2626 !important;
	background: none !important;
	text-decoration: none;
}
.gps-product-card a.added_to_cart.wc-forward:hover,
.mgps-page a.added_to_cart.wc-forward:hover { text-decoration: underline; }
.gps-product-card a.added_to_cart.wc-forward::after,
.mgps-page a.added_to_cart.wc-forward::after { content: " \2192"; }

/* Button while the request is running */
.gps-prod-btn.ajax_add_to_cart.loading { opacity: .7; pointer-events: none; }

/* Toast */
#gps-cart-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100vw - 32px);
	padding: 12px 16px;
	border-radius: 12px;
	background: #111827;
	color: #fff;
	font-size: 14px;
	box-shadow: 0 16px 40px rgba(17, 24, 39, .3);
	opacity: 0;
	transform: translate(-50%, 20px);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
	pointer-events: none;
}
#gps-cart-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.gps-cart-toast__icon {
	flex: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #16A34A;
	font-size: 13px;
	font-weight: 700;
}
.gps-cart-toast__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
#gps-cart-toast .gps-cart-toast__link {
	flex: none;
	color: #FCA5A5;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
#gps-cart-toast .gps-cart-toast__link:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
	#gps-cart-toast, .gps-cart-icon.is-bump .gps-cart-count { transition: none; animation: none; }
}
