/**
 * Floating language switcher — fixed-position pill + dropdown.
 * Pairs with includes/class-ls-floating.php and public/js/floating.js.
 */

.ls-floating {
	position: fixed;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
}
.ls-floating--top-right    { top: 20px;    right: 20px; }
.ls-floating--top-left     { top: 20px;    left: 20px; }
.ls-floating--bottom-right { bottom: 20px; right: 20px; }
.ls-floating--bottom-left  { bottom: 20px; left: 20px; }

.ls-floating__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	margin: 0;
	background: #fff;
	color: #1f2937;
	border: 1px solid #e5e7eb;
	border-radius: 9999px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
	cursor: pointer;
	font: inherit;
	line-height: 1;
	transition: box-shadow .12s ease, border-color .12s ease;
}
.ls-floating__trigger:hover {
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.07);
	border-color: #d1d5db;
}
.ls-floating__trigger:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}
.ls-floating__trigger[aria-expanded="true"] {
	border-color: #d1d5db;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

.ls-floating__flag {
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}
.ls-floating__label {
	font-weight: 500;
	white-space: nowrap;
}
.ls-floating__caret {
	font-size: 12px;
	opacity: 0.6;
	margin-left: 2px;
}

.ls-floating__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 160px;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}
.ls-floating--top-left .ls-floating__menu,
.ls-floating--bottom-left .ls-floating__menu {
	right: auto;
	left: 0;
}
.ls-floating--bottom-right .ls-floating__menu,
.ls-floating--bottom-left .ls-floating__menu {
	top: auto;
	bottom: calc(100% + 6px);
}
.ls-floating__menu[hidden] { display: none !important; }

.ls-floating__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	color: #1f2937;
	text-decoration: none;
	cursor: pointer;
}
.ls-floating__item:hover,
.ls-floating__item:focus-visible {
	background: #f3f4f6;
	outline: none;
}
.ls-floating__item.is-current {
	font-weight: 600;
}
.ls-floating__item.is-current::after {
	content: "✓";
	margin-left: auto;
	color: #10b981;
	font-weight: 400;
}

/* Small-screen tweak: slightly smaller pill, still tappable. */
@media (max-width: 480px) {
	.ls-floating--top-right    { top: 12px;    right: 12px; }
	.ls-floating--top-left     { top: 12px;    left: 12px; }
	.ls-floating--bottom-right { bottom: 12px; right: 12px; }
	.ls-floating--bottom-left  { bottom: 12px; left: 12px; }
	.ls-floating__trigger { padding: 7px 10px; }
	.ls-floating__label   { font-size: 13px; }
}
