/*
 * Loading state for the calculator's Add to Cart button.
 *
 * Mirrors Woodmart's own .single_add_to_cart_button.loading treatment
 * (css/parts/woocommerce-base.css): a solid overlay that inherits the button's
 * own background to mask the label, plus a rotating ring. The class is only ever
 * applied by this plugin's script, to calculator 11892's buttons.
 */
.arci-loading {
	position: relative;
	pointer-events: none;
	cursor: default;
}

.arci-loading::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	background-color: inherit;
	box-shadow: inherit;
}

.arci-loading::after {
	content: "";
	position: absolute;
	top: calc(50% - 9px);
	left: calc(50% - 9px);
	inset-inline-start: calc(50% - 9px);
	z-index: 2;
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 1px solid transparent;
	border-left-color: currentColor;
	border-radius: 50%;
	vertical-align: middle;
	animation: arci-rotate 450ms infinite linear;
}

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

/* The "View cart" control keeps its button styling once its href is removed. */
.ccb-woo-product .ccb-button--link[data-arci-side-cart] {
	cursor: pointer;
}
