/* [product_add_to_cart] – round icon button */

.rpac-button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: #150a66;
	color: #fff;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.rpac-button.button:hover,
.rpac-button.button:focus-visible {
	background-color: #2a1c9a;
	color: #fff;
	transform: scale(1.05);
}

/* Text or icon + text: pill shape */
.rpac-button.button:has(.rpac-text) {
	padding: 0 18px;
}

.rpac-icon {
	display: block;
	flex-shrink: 0;
}

/* Loading state (class added by WooCommerce during the request) */
.rpac-button.button.loading {
	opacity: 0.7;
	pointer-events: none;
}

.rpac-button.button.loading .rpac-icon {
	animation: rpac-spin 0.8s linear infinite;
}

/* WooCommerce's own loading/added icons – we use our own states */
.rpac-button.button.loading::after,
.rpac-button.button.added::after {
	display: none;
}

/* Hide the "View cart" link WooCommerce inserts after adding */
.rpac-hide-view-cart + .added_to_cart {
	display: none;
}

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

@media (prefers-reduced-motion: reduce) {
	.rpac-button.button,
	.rpac-button.button.loading .rpac-icon {
		transition: none;
		animation: none;
	}
}

/* Plain add-to-cart links handled via AJAX (Icon widget + dynamic tag) */
a.rpac-loading {
	opacity: 0.6;
	pointer-events: none;
	cursor: progress;
}

a.rpac-loading .elementor-icon,
a.rpac-loading img,
a.rpac-loading svg {
	animation: rpac-spin 0.8s linear infinite;
}
