/**
 * Kitty Fashion Color Gallery — Phase 3.
 * Gallery-scoped loading overlay only. Does not restyle Razzi/WooCommerce gallery.
 *
 * Loader is a child of .kfcg-gallery-host (not body, not the viewport).
 * Never use position: fixed.
 */

/* Stable host keeps Razzi's floated gallery column while the inner gallery is replaced. */
.single-product div.product .kfcg-gallery-host {
	position: relative;
	float: left;
	width: 48.7%;
	box-sizing: border-box;
}

.single-product div.product .kfcg-gallery-host > .woocommerce-product-gallery {
	float: none;
	width: 100%;
}

.kfcg-gallery-host.kfcg-gallery-loading {
	overflow: hidden;
}

.woocommerce-product-gallery.kfcg-gallery-replacing {
	pointer-events: none;
}

.kfcg-gallery-loader {
	position: absolute;
	inset: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	background: rgba(255, 255, 255, 0.85);
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.kfcg-gallery-loader--hide {
	opacity: 0;
}

.kfcg-gallery-loader__spinner {
	box-sizing: border-box;
	display: block;
	width: 28px;
	height: 28px;
	border: 2px solid rgba(29, 35, 39, 0.12);
	border-top-color: #1d2327;
	border-radius: 50%;
	animation: kfcg-spin 0.7s linear infinite;
}

@keyframes kfcg-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 991px) {
	.single-product div.product .kfcg-gallery-host {
		float: none;
		width: 100%;
	}
}
