/* Loader Overlay */
.loader[hidden] {
	display: none !important;
}
.loader {
	position: fixed;
	inset: 0;
	z-index: 3000;
	display: grid;
	place-items: center;
}
.loader__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(3px);
}
.loader__box {
	position: relative;
	z-index: 1;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 14px;
	padding: 1rem 1.25rem;
	color: #fff;
	text-align: center;
	min-width: 220px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Spinner */

@keyframes loader-rotate {
	to {
		transform: rotate(360deg);
	}
}

@keyframes loader-dash {
	0% {
		stroke-dasharray: 1 180;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 120 60;
		stroke-dashoffset: -40;
	}
	100% {
		stroke-dasharray: 1 180;
		stroke-dashoffset: -180;
	}
}

/* Spinner */
.loader__spinner {
	width: 64px;
	height: 64px;
	display: block;
	margin: 0 auto 0.6rem;

	/* Rotate the whole spinner around its center */
	transform-box: fill-box;
	transform-origin: center;
	animation: loader-rotate 1.2s linear infinite;
}
.loader__track {
	fill: none;
	stroke: rgba(255, 255, 255, 0.25);
	stroke-width: 6;
}
.loader__head {
	fill: none;
	stroke: #fff;
	stroke-width: 6;
	stroke-linecap: round;

	/* Animate the stroke to create the sweeping arc */
	stroke-dasharray: 90 150;
	stroke-dashoffset: 0;

	transform-box: fill-box;
	transform-origin: center;
	animation: loader-dash 1.5s ease-in-out infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
@keyframes dash {
	0% {
		stroke-dasharray: 1 180;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 120 60;
		stroke-dashoffset: -40;
	}
	100% {
		stroke-dasharray: 1 180;
		stroke-dashoffset: -180;
	}
}

.loader__text {
	font-weight: 700;
	letter-spacing: 0.3px;
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
	.loader__head {
		animation: none;
	}
}
