/* Стили для переключателя языка */

/* Переключатель в стиле horizontal-radio (Pills) */
.lang-switcher-radio {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
	background: white;
	padding: 10px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-switcher-radio__group {
	overflow: hidden;
	font-size: 0px;
}

.lang-switcher-radio__item {
	display: inline-block;
}

.lang-switcher-radio__input {
	position: absolute;
	left: -9999px;
}

.lang-switcher-radio__label {
	position: relative;
	display: inline-block;
	vertical-align: top;
	padding: 10px 20px;
	border: 1px solid #ccc;
	background: #ffffff;
	color: #000000;
	font-size: 14px;
	cursor: pointer;
	transition: all .15s ease;
	font-family: inherit;
}

.lang-switcher-radio__label_first {
	border-radius: 6px 0 0 6px;
	-webkit-border-radius: 6px 0 0 6px;
	-moz-border-radius: 6px 0 0 6px;
	-ms-border-radius: 6px 0 0 6px;
	-o-border-radius: 6px 0 0 6px;
	-khtml-border-radius: 6px 0 0 6px;
}

.lang-switcher-radio__label_last {
	border-radius: 0 6px 6px 0;
	-webkit-border-radius: 0 6px 6px 0;
	-moz-border-radius: 0 6px 6px 0;
	-ms-border-radius: 0 6px 6px 0;
	-o-border-radius: 0 6px 6px 0;
	-khtml-border-radius: 0 6px 6px 0;
}

.lang-switcher-radio__label_center {
	margin: 0 -1px;
}

.lang-switcher-radio__label:hover {
	color: #ffffff;
	background: rgba(255, 141, 0, 0.15);
}

.lang-switcher-radio__input:checked + .lang-switcher-radio__label {
	background-color: #ff6900;
	color: #ffffff;
}

/* Мобильная версия */
@media (max-width: 768px) {
	.lang-switcher-radio {
		top: 10px;
		right: 10px;
		padding: 6px;
	}
	
	.lang-switcher-radio__label {
		padding: 8px 14px;
		font-size: 12px;
	}
}

/* Базовый стиль select */
.lang-switcher {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 12px 16px;
	background: white;
	border: 2px solid #ff6900;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	z-index: 1000;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
	outline: none;
	font-family: inherit;
}

.lang-switcher:hover {
	background: #fff5f0;
	box-shadow: 0 4px 12px rgba(255, 105, 0, 0.2);
	transform: translateY(-1px);
}

.lang-switcher:focus {
	border-color: #ff6900;
	box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}

/* Мобильная версия */
@media (max-width: 768px) {
	.lang-switcher {
		top: 10px;
		right: 10px;
		padding: 8px 12px;
		font-size: 14px;
	}
}

/* Вариант с кнопками */
.lang-buttons {
	position: fixed;
	top: 20px;
	right: 20px;
	display: flex;
	gap: 8px;
	z-index: 1000;
	background: white;
	padding: 8px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-buttons button {
	padding: 8px 16px;
	background: #f5f5f5;
	color: #333;
	border: 2px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	font-weight: bold;
	font-size: 14px;
	transition: all 0.2s ease;
	font-family: inherit;
}

.lang-buttons button:hover {
	background: #fff5f0;
	border-color: #ff6900;
	color: #ff6900;
}

.lang-buttons button.active {
	background: #ff6900;
	color: white;
	border-color: #ff6900;
}

/* Мобильная версия кнопок */
@media (max-width: 768px) {
	.lang-buttons {
		top: 10px;
		right: 10px;
		gap: 6px;
		padding: 6px;
	}

	.lang-buttons button {
		padding: 6px 12px;
		font-size: 12px;
	}
}

/* Вариант с выпадающим меню */
.lang-dropdown {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
}

.lang-dropdown-toggle {
	padding: 10px 16px;
	background: white;
	border: 2px solid #ff6900;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
}

.lang-dropdown-toggle:hover {
	background: #fff5f0;
	box-shadow: 0 4px 12px rgba(255, 105, 0, 0.2);
}

.lang-dropdown-toggle::after {
	content: '▼';
	font-size: 10px;
	transition: transform 0.2s ease;
}

.lang-dropdown-toggle.active::after {
	transform: rotate(180deg);
}

.lang-dropdown-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: white;
	border: 2px solid #ff6900;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 150px;
	display: none;
	overflow: hidden;
}

.lang-dropdown-menu.show {
	display: block;
}

.lang-dropdown-item {
	padding: 12px 16px;
	cursor: pointer;
	transition: background 0.2s ease;
	font-size: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.lang-dropdown-item:hover {
	background: #fff5f0;
}

.lang-dropdown-item.active {
	background: #ff6900;
	color: white;
	font-weight: bold;
}

/* Флаги (опционально, если используете emoji флаги) */
.lang-flag {
	font-size: 20px;
	line-height: 1;
}

/* Анимация при смене языка */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.i18n-fade-in {
	animation: fadeIn 0.3s ease;
}

/* Loader при загрузке переводов */
.lang-switcher.loading {
	opacity: 0.6;
	pointer-events: none;
}

.lang-switcher.loading::after {
	content: '...';
	position: absolute;
	right: 10px;
	animation: dots 1.5s infinite;
}

@keyframes dots {
	0%, 20% { content: '.'; }
	40% { content: '..'; }
	60%, 100% { content: '...'; }
}

/* Компактный вариант для мобильных */
.lang-switcher-compact {
	position: fixed;
	top: 10px;
	right: 10px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 105, 0, 0.3);
	border-radius: 20px;
	padding: 6px 12px;
	font-size: 14px;
	z-index: 1000;
}

/* Для интеграции в существующий header */
.header .lang-switcher {
	position: static;
	display: inline-block;
	margin-left: 20px;
}

/* RTL поддержка (если понадобится в будущем) */
[dir="rtl"] .lang-switcher,
[dir="rtl"] .lang-buttons,
[dir="rtl"] .lang-dropdown {
	right: auto;
	left: 20px;
}
