/**
 * Eplay Translator — language switcher (frontend)
 */

.ptm-switcher-nav {
	margin: 0;
	padding: 0;
}

.ptm-switcher--inline.ptm-language-switcher {
	flex-wrap: nowrap;
	gap: 0.28rem 0.45rem;
}

.ptm-language-switcher {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.ptm-language-switcher.ptm-switcher--dropdown {
	flex-direction: column;
	align-items: stretch;
	min-width: 10rem;
}

.ptm-language-switcher__item {
	margin: 0;
	padding: 0;
}

.ptm-language-switcher__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	background: color-mix(in srgb, currentColor 6%, transparent);
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ptm-language-switcher__link:hover,
.ptm-language-switcher__link:focus-visible {
	background: color-mix(in srgb, currentColor 12%, transparent);
	border-color: color-mix(in srgb, currentColor 28%, transparent);
	outline: none;
	box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 25%, transparent);
}

.ptm-language-switcher__link.is-current {
	font-weight: 600;
	border-color: color-mix(in srgb, currentColor 45%, transparent);
	background: color-mix(in srgb, currentColor 14%, transparent);
}

.ptm-language-switcher__code {
	font-size: 0.75rem;
	opacity: 0.75;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.ptm-language-switcher__label {
	white-space: nowrap;
}

.ptm-language-switcher__sep {
	opacity: 0.35;
	user-select: none;
	font-weight: 300;
}

/* Fallback se color-mix non è supportato */
@supports not (background: color-mix(in srgb, white 50%, black)) {
	.ptm-language-switcher__link {
		border: 1px solid rgba(128, 128, 128, 0.35);
		background: rgba(128, 128, 128, 0.08);
	}
	.ptm-language-switcher__link:hover,
	.ptm-language-switcher__link:focus-visible {
		background: rgba(128, 128, 128, 0.14);
	}
	.ptm-language-switcher__link.is-current {
		border-color: rgba(128, 128, 128, 0.55);
		background: rgba(128, 128, 128, 0.16);
	}
}
