/* ABOUTME: Styles for the language switcher UI element. */
/* ABOUTME: Minimal, accessible design that integrates with Genesis themes. */

/* Mode B (frontend) — token layer scoped to plugin output */
.tdls-language-switcher,
.tdls-floating-switcher {
	--tdls-fe-text: inherit;
	--tdls-fe-text-muted: #737373;
	--tdls-fe-surface: rgba(255, 255, 255, 0.95);
	--tdls-fe-border: rgba(0, 0, 0, 0.12);
	--tdls-fe-border-strong: rgba(0, 0, 0, 0.22);
	--tdls-fe-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	--tdls-fe-shadow-hover: 0 3px 14px rgba(0, 0, 0, 0.12);
	--tdls-fe-radius-pill: 999px;
	--tdls-fe-focus-ring: 2px solid currentColor;
}

.tdls-language-switcher {
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.35em 1em;
	font-size: 0.85rem;
	justify-content: flex-end;
}

.tdls-language-switcher--compact .tdls-switch-link {
	font-weight: 600;
}

.tdls-current-lang {
	font-weight: 600;
}

.tdls-separator {
	color: var(--tdls-fe-text-muted);
}

.tdls-switch-link {
	text-decoration: none;
	color: inherit;
}

.tdls-switch-link:hover,
.tdls-switch-link:focus {
	text-decoration: underline;
}

/* Floating switcher: fixed corner button, safe-area aware */
.tdls-floating-switcher {
	position: fixed;
	z-index: 99998;
	margin: 0;
	padding: 0;
	font-size: 1.05rem;
	line-height: 1.25;
}

.tdls-floating-switcher--bottom-right {
	right: max(1rem, env(safe-area-inset-right, 0px));
	bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

.tdls-floating-switcher--bottom-left {
	left: max(1rem, env(safe-area-inset-left, 0px));
	bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

.tdls-floating-switcher--top-right {
	right: max(1rem, env(safe-area-inset-right, 0px));
	top: max(1rem, env(safe-area-inset-top, 0px));
}

.tdls-floating-switcher--top-left {
	left: max(1rem, env(safe-area-inset-left, 0px));
	top: max(1rem, env(safe-area-inset-top, 0px));
}

.tdls-floating-switcher__link {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.85em 1.35em;
	min-height: 2.75em;
	text-decoration: none;
	color: var(--tdls-fe-text);
	font-weight: 600;
	background: var(--tdls-fe-surface);
	border: 1px solid var(--tdls-fe-border);
	border-radius: var(--tdls-fe-radius-pill);
	box-shadow: var(--tdls-fe-shadow);
}

.tdls-floating-switcher__icon {
	display: inline-flex;
	flex-shrink: 0;
	font-size: 1.2em;
	line-height: 1;
}

.tdls-floating-switcher__text {
	line-height: 1.2;
}

.tdls-floating-switcher__link:hover,
.tdls-floating-switcher__link:focus {
	text-decoration: none;
	border-color: var(--tdls-fe-border-strong);
	box-shadow: var(--tdls-fe-shadow-hover);
	outline: none;
}

.tdls-floating-switcher__link:focus-visible {
	outline: var(--tdls-fe-focus-ring);
	outline-offset: 2px;
}
