/**
 * Loader for WooCommerce cart / checkout / My Account.
 * WooCommerce's own CSS is switched off in this theme, so its blockUI overlay
 * (shown while totals update or an order is placed) had no spinner at all.
 */

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

.blockUI.blockOverlay {
	background: #fff !important;
	opacity: .7 !important;
	cursor: wait !important;
}
.blockUI.blockOverlay::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid #cfe3da;
	border-top-color: #0d5740;
	border-radius: 50%;
	box-sizing: border-box;
	animation: vsm-spin .8s linear infinite;
}
/* The whole checkout form is blocked while the order is placed: keep the spinner in view. */
form.woocommerce-checkout > .blockUI.blockOverlay::before {
	position: fixed;
}

/* "Proceed to checkout": spinner inside the button while the next page loads. */
.checkout-button.vsm-loading {
	position: relative;
	pointer-events: none;
	opacity: .85;
	color: transparent !important;
}
.checkout-button.vsm-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	box-sizing: border-box;
	animation: vsm-spin .8s linear infinite;
}
