/* AJAX add to cart: button loading state, image overlay, fly dot, cart bump. */

/* Button while adding: green border + text, light green background, spinner. */
.zestify-product-form form.cart .single_add_to_cart_button.is-adding {
	gap: 10px;
	color: #0f8a5f !important;
	background: #eaf8f1 !important;
	border-color: #0f8a5f !important;
	pointer-events: none;
}

.zestify-atc-spinner {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: zestify-atc-spin .7s linear infinite;
}

@keyframes zestify-atc-spin {
	to {
		transform: rotate(360deg);
	}
}

.zestify-atc-error {
	margin: 10px 0 0;
	color: #b3261e;
	font-size: 13px;
}

/* "Added to cart" pill: small, centred on the image, eases in from just
   below-right of the middle. */
.zestify-atc-overlay {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.zestify-atc-overlay__pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	padding: 9px 16px 9px 10px;
	color: #fff;
	background: #000;
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	opacity: 0;
	transform: translate(34px, 30px) scale(.7);
	transition: transform .55s cubic-bezier(.22, 1.2, .36, 1), opacity .3s ease;
}

.zestify-atc-overlay.is-open .zestify-atc-overlay__pill {
	opacity: 1;
	transform: none;
}

.zestify-atc-overlay__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	color: #fff;
	background: #12a36b;
	border-radius: 50%;
}

/* Small product dot that flies to the header cart. */
.zestify-atc-fly {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	background: #fff center / cover no-repeat;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
	pointer-events: none;
	will-change: transform, opacity;
}

/* Header cart icon: quick zoom in / out when the count goes up. */
.zestify-cart-bump {
	animation: zestify-cart-bump .55s ease;
}

@keyframes zestify-cart-bump {
	0% {
		transform: scale(1);
	}
	35% {
		transform: scale(1.35);
	}
	70% {
		transform: scale(.92);
	}
	100% {
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.zestify-atc-overlay__pill {
		transition-duration: .01s;
	}

	.zestify-cart-bump {
		animation: none;
	}
}
