/**
 * Quiltfolk Academy - Add to Cart overlay + spinner
 * Pairs with qfa-add-to-cart.js. Adjust colors/spacing/copy to match your
 * site - the comments below point at the bits you're most likely to want
 * to change.
 */

.qfa-cart-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: none; /* toggled to flex by .is-visible, added/removed in JS */
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1em;
	background: rgba(255, 255, 255, 0.85); /* swap for a dark overlay + light spinner if your site is dark-themed */
	z-index: 999999; /* sits above Elementor Pro's own popups/overlays */
}

.qfa-cart-overlay.is-visible {
	display: flex;
}

/* Stops the page scrolling behind the overlay while it's up. */
body.qfa-cart-locked {
	overflow: hidden;
}

.qfa-cart-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid #ddd;
	border-top-color: #333; /* swap to your brand color */
	border-radius: 50%;
	animation: qfa-cart-spin 0.8s linear infinite;
}

@keyframes qfa-cart-spin {
	to {
		transform: rotate(360deg);
	}
}

.qfa-cart-overlay-text {
	margin: 0;
	font-weight: 600;
	color: #333;
}

/* Inline error shown under the button on failure (see showError() in
   qfa-add-to-cart.js) - same look as .qfa-login-error in qfa-login.css,
   kept consistent on purpose. */
.qfa-atc-error {
	margin: 0.75em 0 0;
	padding: 0.75em 1em;
	background: #fdecea;
	border: 1px solid #f5c2c0;
	color: #7a1a1a;
	border-radius: 4px;
}
