/* ===== ПРЕЛОАДЕР ДЛЯ ПЕРЕКЛЮЧЕНИЯ ТЕМЫ ===== */

#themeLoader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	opacity: 0;
	transition: opacity 0.3s ease, background-color 0.3s ease;
}

/* Фон для темной темы */
#themeLoader[data-target-theme='dark'] {
	background: #2a2a2a;
}

/* Фон для светлой темы */
#themeLoader[data-target-theme='light'] {
	background: #ffffff;
}

#themeLoader.show {
	display: flex;
	opacity: 1;
}

/* Контейнер прелоадера */
.theme-loader-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-15px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Спиннер */
.theme-spinner {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	transition: border-color 0.3s ease;
}

/* Спиннер для темной темы */
#themeLoader[data-target-theme='dark'] .theme-spinner {
	border: 5px solid #555555;
	border-top-color: #3498db;
}

/* Спиннер для светлой темы */
#themeLoader[data-target-theme='light'] .theme-spinner {
	border: 5px solid #dee2e6;
	border-top-color: #3498db;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Текст */
.theme-loader-text {
	font-size: 1.1rem;
	font-weight: 600;
	text-align: center;
	letter-spacing: 0.02em;
	transition: color 0.3s ease;
}

/* Текст для темной темы */
#themeLoader[data-target-theme='dark'] .theme-loader-text {
	color: #ffffff;
}

/* Текст для светлой темы */
#themeLoader[data-target-theme='light'] .theme-loader-text {
	color: #000000;
}

/* Адаптивность */
@media (max-width: 480px) {
	.theme-spinner {
		width: 50px;
		height: 50px;
		border-width: 4px;
	}

	.theme-loader-text {
		font-size: 1rem;
	}
}
