/*
 * Floating Language Switcher — front-end styles.
 * Minimal visual style: flat surfaces, soft shadow, subtle motion.
 */

.fls-switcher {
	position: fixed;
	left: 0;
	top: 70%;
	transform: translateY(-50%);
	z-index: 99990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	direction: ltr;
}

.fls-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 10px 10px 12px;
	margin: 0;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-left: 0;
	border-radius: 0 8px 8px 0;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: box-shadow 0.2s ease;
}

.fls-toggle:hover,
.fls-toggle:focus-visible {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.fls-toggle:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.fls-chevron {
	width: 0;
	height: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 5px solid #666666;
	transition: transform 0.2s ease;
}

.fls-switcher.is-open .fls-chevron {
	transform: rotate(180deg);
}

.fls-panel {
	position: absolute;
	left: 100%;
	top: 50%;
	margin-left: 8px;
	min-width: 160px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
	opacity: 0;
	visibility: hidden;
	transform: translate(-12px, -50%);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.fls-switcher.is-open .fls-panel {
	opacity: 1;
	visibility: visible;
	transform: translate(0, -50%);
}

.fls-list {
	list-style: none;
	margin: 0;
	padding: 6px;
}

.fls-list li {
	margin: 0;
}

.fls-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 6px;
	color: #1d2327;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.fls-item:hover,
.fls-item:focus-visible {
	background-color: rgba(0, 0, 0, 0.05);
	color: #1d2327;
	text-decoration: none;
}

.fls-item.is-current {
	background-color: rgba(34, 113, 177, 0.08);
	font-weight: 600;
	pointer-events: none;
}

.fls-flag {
	display: block;
	width: 24px;
	height: 16px;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.fls-code {
	font-weight: 600;
	letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
	.fls-toggle,
	.fls-chevron,
	.fls-panel,
	.fls-item {
		transition: none;
	}
}
