.flex-translate-switcher {
	margin: 0.5rem 0;
}

.flex-translate-switcher__label {
	display: none;
}

.flex-translate-switcher__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}

.flex-translate-switcher__item {
	margin: 0;
}

.flex-translate-switcher__link {
	text-decoration: none;
	border: 1px solid currentColor;
	border-radius: 4px;
	padding: 0.25rem 0.6rem;
	display: inline-block;
	line-height: 1.3;
	opacity: 0.85;
}

.flex-translate-switcher__item.is-active .flex-translate-switcher__link {
	font-weight: 600;
	opacity: 1;
}

.flex-translate-switcher__link:hover,
.flex-translate-switcher__link:focus {
	opacity: 1;
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Floating bar — always visible on screen */
.flex-translate-floating-wrap {
	pointer-events: none;
}

.flex-translate-switcher.flex-translate-switcher--floating {
	position: fixed;
	z-index: 999999;
	pointer-events: auto;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	max-width: min(100vw - 2rem, 22rem);
	padding: 0.5rem 0.75rem;
	background: rgba(255, 255, 255, 0.97);
	color: #1d2327;
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Floating pill: EN | HI */
.flex-translate-switcher__pill {
	display: inline-flex;
	align-items: center;
	gap: 0;
	flex-wrap: nowrap;
}

.flex-translate-switcher__pill-sep {
	opacity: 0.35;
	font-weight: 400;
	padding: 0 0.1rem;
	user-select: none;
}

.flex-translate-switcher__pill-link {
	text-decoration: none;
	border: none;
	border-radius: 6px;
	padding: 0.4rem 0.65rem;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1;
	color: inherit;
	opacity: 0.55;
	background: transparent;
}

.flex-translate-switcher__pill-link:hover,
.flex-translate-switcher__pill-link:focus {
	opacity: 0.9;
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.flex-translate-switcher__pill-link.is-active {
	opacity: 1;
	background: rgba(0, 115, 170, 0.15);
	color: #0073aa;
}

.flex-translate-switcher--floating .flex-translate-switcher__label {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.75;
	margin: 0;
	white-space: nowrap;
}

.flex-translate-switcher--floating .flex-translate-switcher__list {
	gap: 0.3rem 0.45rem;
}

.flex-translate-switcher--floating .flex-translate-switcher__link {
	border-radius: 6px;
	padding: 0.35rem 0.55rem;
	font-size: 0.9rem;
	border-color: rgba(0, 0, 0, 0.2);
}

.flex-translate-switcher--bottom-right {
	bottom: 1rem;
	right: 1rem;
}

.flex-translate-switcher--bottom-left {
	bottom: 1rem;
	left: 1rem;
}

.flex-translate-switcher--top-right {
	top: 1rem;
	right: 1rem;
}

.flex-translate-switcher--top-left {
	top: 1rem;
	left: 1rem;
}

/* Logged-in users: WP admin bar overlaps top corners */
body.admin-bar .flex-translate-switcher--top-right,
body.admin-bar .flex-translate-switcher--top-left {
	top: calc(1rem + 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .flex-translate-switcher--top-right,
	body.admin-bar .flex-translate-switcher--top-left {
		top: calc(1rem + 46px);
	}
}

@media (prefers-color-scheme: dark) {
	.flex-translate-switcher.flex-translate-switcher--floating {
		background: rgba(30, 30, 30, 0.96);
		color: #f0f0f0;
		border-color: rgba(255, 255, 255, 0.12);
	}
	.flex-translate-switcher--floating .flex-translate-switcher__link {
		border-color: rgba(255, 255, 255, 0.25);
	}
}
