/**
 * KLG Loading overlay styles.
 */

.klg-loading-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	background: rgba(255, 255, 255, 0.65);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	align-items: center;
	justify-content: center;
}

.klg-loading-overlay.is-visible {
	display: flex;
	animation: klg-loading-fade-in 0.15s ease;
}

@keyframes klg-loading-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.klg-loading-content {
	background: #fff;
	border-radius: 12px;
	padding: 24px 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	min-width: 180px;
	max-width: 320px;
	text-align: center;
}

.klg-loading-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #e5e7eb;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: klg-loading-spin 0.8s linear infinite;
}

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

.klg-loading-text {
	color: #4b5563;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

/* Block tương tác toàn trang khi loading. */
body.klg-loading-active {
	overflow: hidden;
}
body.klg-loading-active > *:not(.klg-loading-overlay) {
	pointer-events: none;
	user-select: none;
}
