/* Fixed-page toptest loading screen. */
.toptest-loading {
	position: fixed;
	inset: 0;
	z-index: 1000002;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.toptest-loading.is-leaving {
	opacity: 0;
	visibility: hidden;
}

.toptest-loading__logo {
	position: relative;
	display: block;
	width: min(198px, 46.8vw);
	overflow: hidden;
}

.toptest-loading__logo img {
	display: block;
	width: 100%;
	height: auto;
	opacity: 0;
	animation: toptestLoadingLogoAppear 1s 0.6s forwards;
}

.toptest-loading__logo::before {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: '';
	background: #b7183f;
	transform: scaleX(0);
	animation: toptestLoadingLogoWipe 1s ease-in-out forwards;
}

@keyframes toptestLoadingLogoWipe {
	0% {
		transform-origin: left;
		transform: scaleX(0);
	}
	50% {
		transform-origin: left;
		transform: scaleX(1);
	}
	50.001% {
		transform-origin: right;
	}
	100% {
		transform-origin: right;
		transform: scaleX(0);
	}
}

@keyframes toptestLoadingLogoAppear {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.toptest-loading,
	.toptest-loading__logo img,
	.toptest-loading__logo::before {
		animation-duration: 0.01ms !important;
		animation-delay: 0ms !important;
		transition-duration: 0.01ms !important;
	}
}
