.chpl-loader {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	background: var(--chpl-bg, #000000);
	opacity: 1;
	visibility: visible;
	transition: opacity 360ms ease, visibility 360ms ease;
	pointer-events: none;
}

.chpl-loader.is-hiding {
	opacity: 0;
	visibility: hidden;
}

.chpl-loader__inner {
	display: grid;
	justify-items: center;
	gap: 18px;
	width: min(320px, calc(100vw - 48px));
}

.chpl-loader__logo {
	display: block;
	width: auto;
	max-width: min(220px, 62vw);
	max-height: 96px;
	object-fit: contain;
}

.chpl-loader__brand {
	max-width: min(280px, 70vw);
	color: #ffffff;
	font: 600 22px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-align: center;
	letter-spacing: 0;
}

.chpl-loader__bar {
	overflow: hidden;
	width: min(220px, 56vw);
	height: 2px;
	background: rgba(255, 255, 255, 0.18);
}

.chpl-loader__progress {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--chpl-progress, #c7a45d);
	transform: scaleX(0.08);
	transform-origin: left center;
	transition: transform 260ms ease;
	will-change: transform;
}

.chpl-loader.is-ready .chpl-loader__progress {
	transform: scaleX(1);
}

.chpl-loader__details {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: min(260px, 64vw);
	color: rgba(255, 255, 255, 0.82);
	font: 500 12px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-align: center;
	letter-spacing: 0;
}

.chpl-loader__text,
.chpl-loader__percentage {
	min-width: 0;
	overflow-wrap: anywhere;
}

.chpl-loader__percentage {
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, 0.92);
}

@media (prefers-reduced-motion: reduce) {
	.chpl-loader {
		transition-duration: 80ms;
	}

	.chpl-loader__progress {
		transition-duration: 80ms;
	}
}
