/**
 * Global page loader — brand-aligned motion.
 */

#hf-page-loader {
	box-sizing: border-box;
}

#hf-page-loader *,
#hf-page-loader *::before,
#hf-page-loader *::after {
	box-sizing: border-box;
}

.hf-page-loader__backdrop {
	display: none;
}

.hf-page-loader__stage {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(120px, 26vw);
	height: min(120px, 26vw);
}

.hf-page-loader__rings {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.hf-page-loader__ring {
	position: absolute;
	border-radius: 50%;
	aspect-ratio: 1;
	border-style: solid;
	border-color: transparent;
	animation: hf-pl-spin 1.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.hf-page-loader__ring--outer {
	width: 100%;
	height: 100%;
	border-width: 2px;
	border-top-color: #0059ff;
	border-right-color: rgba(0, 89, 255, 0.15);
	animation-duration: 2.2s;
	box-shadow: 0 0 0 1px rgba(0, 89, 255, 0.06), 0 6px 20px rgba(0, 89, 255, 0.1);
}

.hf-page-loader__ring--inner {
	width: 78%;
	height: 78%;
	border-width: 1.5px;
	border-bottom-color: #ffa500;
	border-left-color: rgba(255, 165, 0, 0.2);
	animation-direction: reverse;
	animation-duration: 1.4s;
}

.hf-page-loader__logo-wrap {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: #fff;
	box-shadow:
		0 2px 14px rgba(0, 89, 255, 0.1),
		0 0 0 1px rgba(255, 255, 255, 0.9) inset,
		0 0 24px rgba(255, 165, 0, 0.06);
	animation: hf-pl-logo-pulse 2s ease-in-out infinite;
}

.hf-page-loader--has-image .hf-page-loader__logo-wrap {
	padding: 6px;
}

.hf-page-loader__logo {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 44px;
	max-height: 44px;
	object-fit: contain;
}

.hf-page-loader__fallback {
	display: none;
	font-family: "Poppins", system-ui, sans-serif;
	font-size: clamp(1.25rem, 3.5vw, 1.65rem);
	font-weight: 800;
	line-height: 1;
	color: #0059ff;
	text-shadow: 0 2px 0 rgba(255, 165, 0, 0.35);
}

.hf-page-loader:not(.hf-page-loader--has-image) .hf-page-loader__fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

@keyframes hf-pl-spin {
	0% {
		transform: rotate(0deg) scale(1);
		opacity: 1;
	}
	50% {
		transform: rotate(180deg) scale(1.02);
		opacity: 0.85;
	}
	100% {
		transform: rotate(360deg) scale(1);
		opacity: 1;
	}
}

@keyframes hf-pl-logo-pulse {
	0%,
	100% {
		transform: scale(1);
		box-shadow:
			0 2px 14px rgba(0, 89, 255, 0.1),
			0 0 0 1px rgba(255, 255, 255, 0.9) inset,
			0 0 24px rgba(255, 165, 0, 0.06);
	}
	50% {
		transform: scale(1.03);
		box-shadow:
			0 4px 18px rgba(0, 89, 255, 0.14),
			0 0 0 1px rgba(255, 255, 255, 0.95) inset,
			0 0 32px rgba(255, 165, 0, 0.1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hf-page-loader__ring,
	.hf-page-loader__logo-wrap {
		animation: none;
	}

	.hf-page-loader__ring--outer {
		border-right-color: rgba(0, 89, 255, 0.35);
	}

	.hf-page-loader__ring--inner {
		border-left-color: rgba(255, 165, 0, 0.35);
	}
}
