.loader {
	background: var(--loader-color);
	height: 100vh;
	width: 100%;
	position: fixed;
	z-index: 1000;
	transition: opacity 0.3s ease-in;
}

.loader.closing {
	opacity: 0;
}

.loading {
	position: absolute;
	top: 50%;
	left: 50%;
	translate: -50%;
	animation: fadeIn 3s cubic-bezier(0.7, 0, 1, 2);
}

.loading__circle {
	position: absolute;
	transform: translate(-50%, -50%);
	background: var(--loader-circle-color);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	animation: horizontal 2s 0s infinite cubic-bezier(0.3, 0, 0.7, 1),
		vertical 1s 0.25s infinite ease-in-out;
	box-shadow: 0px 4px 8px var(--loader-shadow-color);
}

.loading__circle:nth-child(2) {
	animation-delay: 0.2s, 0.45s;
	opacity: 0.9;
}

.loading__circle:nth-child(3) {
	animation-delay: 0.4s, 0.65s;
	opacity: 0.8;
}

.loading__circle:nth-child(4) {
	animation-delay: 0.6s, 0.85s;
	opacity: 0.8;
}

.loading__circle:nth-child(5) {
	animation-delay: 0.8s, 1.05s;
	opacity: 0.9;
}

@keyframes horizontal {
	0% {
		left: 20vw;
	}

	50% {
		left: -20vw;
	}

	100% {
		left: 20vw;
	}
}

@keyframes vertical {
	0% {
		top: -5vh;
	}

	50% {
		top: 5vh;
	}

	100% {
		top: -5vh;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	50% {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}
