/**
 * MR Stiff Product Manual Tab — site-wide AJAX add-to-cart behaviour.
 *
 * 1. Never show WooCommerce's "View cart" link after adding a product.
 * 2. Show a clear loading spinner on the button while the request is running.
 */

/* ---- 1. No "View cart" link -------------------------------------------- */

.added_to_cart {
	display: none !important;
}

/* ---- 2. Loading spinner ------------------------------------------------ */

/*
 * Applies to WooCommerce's AJAX add-to-cart buttons (loops, widgets, sliders and
 * this plugin's "+" buttons, which carry the same class). The label is hidden
 * while loading so only the spinner shows; the button returns to normal once
 * WooCommerce removes the .loading class.
 */
.add_to_cart_button.loading {
	position: relative;
	color: transparent !important;
	opacity: 1 !important;
	pointer-events: none;
}

.add_to_cart_button.loading::after {
	content: "" !important;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	padding: 0;
	font-size: 0;
	box-sizing: border-box;
	border: 2px solid rgba( 255, 255, 255, 0.45 );
	border-top-color: #fff;
	border-radius: 50%;
	background: none;
	animation: mspmt-atc-spin 0.7s linear infinite;
}

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