.medis-loader-host {
	isolation: isolate;
}

form.woocommerce-cart-form.medis-loader-host {
	position: relative;
}

.medis-loading-overlay {
	position: absolute;
	z-index: 1001;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 120px;
	background: rgba(255, 255, 255, 0.76);
	cursor: progress;
	pointer-events: auto;
}

.medis-loading-overlay--fly {
	position: absolute;
	min-height: 100%;
	background: rgba(255, 255, 255, 0.78);
}

.medis-loading-visual {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wood-loader {
	width: 72px;
	height: 38px;
	padding: 0 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: #3f4142;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	box-sizing: content-box;
}

.wood-loader__plank {
	width: 13px;
	height: 21px;
	border-radius: 2px;
	opacity: 0;
	transform: skewX(-12deg) translateX(-7px);
	box-shadow:
		inset -2px 0 rgba(0, 0, 0, 0.10),
		inset 2px 0 rgba(255, 255, 255, 0.12);
	animation: wood-plank-in 1.1s infinite ease-out;
}

.wood-loader__plank:nth-child(1) {
	background: linear-gradient(90deg, #c99454, #d8aa69);
	animation-delay: 0s;
}

.wood-loader__plank:nth-child(2) {
	background: linear-gradient(90deg, #d8aa69, #e1b778);
	animation-delay: 0.16s;
}

.wood-loader__plank:nth-child(3) {
	background: linear-gradient(90deg, #e1b778, #d8aa69);
	animation-delay: 0.32s;
}

@keyframes wood-plank-in {
	0%, 8% {
		opacity: 0;
		transform: skewX(-12deg) translateX(-7px);
	}

	20%, 68% {
		opacity: 1;
		transform: skewX(-12deg) translateX(0);
	}

	82%, 100% {
		opacity: 0;
		transform: skewX(-12deg) translateX(0);
	}
}

/* Keep WPC's lifecycle and overlay class, but replace its generic glyph. */
.woofc-area .woofc-inner.woofc-inner-loading.medis-loader-active::before,
.woofc-area .woofc-inner.woofc-inner-loading.medis-loader-active::after {
	display: none !important;
	content: none !important;
	animation: none !important;
}

body.medis-loader-fly-active .woofc-count.woofc-count-loading::before {
	display: none !important;
	content: none !important;
	animation: none !important;
}

body.medis-loader-fly-active .woofc-count.woofc-count-loading i {
	display: inline-block !important;
}

/* Preserve blockUI interaction locking and replace only its visual content. */
.blockUI.blockOverlay.medis-loader-block-overlay {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	background: rgba(255, 255, 255, 0.76) !important;
	background-image: none !important;
	opacity: 1 !important;
	cursor: progress !important;
}

.blockUI.blockOverlay.medis-loader-block-overlay::before,
.blockUI.blockOverlay.medis-loader-block-overlay::after {
	display: none !important;
	content: none !important;
	animation: none !important;
}

.medis-loader-block-overlay .medis-loading-visual {
	position: static;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.wood-loader__plank {
		transform: skewX(-12deg);
		opacity: 1;
		animation: none !important;
	}
}
