/* ===== Language Switcher ===== */

.lang-switcher {
	position: relative;
	display: inline-block;
	user-select: none;
}

/* ---- Trigger ---- */

.lang-switcher__trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	padding: 6px 0;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.lang-switcher__trigger:hover {
	opacity: 0.8;
}

.lang-switcher__current {
	white-space: nowrap;
}

/* Arrow — pure CSS triangle, no icon font */
.lang-switcher__arrow {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.2s ease;
}

.lang-switcher__dropdown--open ~ .lang-switcher__trigger .lang-switcher__arrow,
.lang-switcher__trigger[aria-expanded="true"] .lang-switcher__arrow {
	transform: rotate(180deg);
}

/* Fix: move arrow transform trigger to wrapper-level */
.lang-switcher:has(.lang-switcher__dropdown--open) .lang-switcher__arrow {
	transform: rotate(180deg);
}

/* ---- Dropdown ---- */

.lang-switcher__dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 999;
	margin-top: 4px;
	min-width: 100%;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
	padding: 4px 0;
}

.lang-switcher__dropdown--open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* ---- Options ---- */

.lang-switcher__option {
	display: block;
	width: 100%;
	padding: 8px 14px;
	cursor: pointer;
	font-size: inherit;
	color: #1f2937;
	background: transparent;
	border: none;
	text-align: left;
	white-space: nowrap;
	transition: background 0.12s ease;
}

.lang-switcher__option:hover {
	background: #f3f4f6;
}

.lang-switcher__option--current {
	font-weight: 600;
	color: #111827;
}

.lang-switcher__option--no-translation {
	opacity: 0.5;
	cursor: not-allowed;
}

.lang-switcher__option-name {
	pointer-events: none;
}

/* ---- Notice (when Polylang missing) ---- */

.lang-switcher__notice {
	color: #999;
	font-size: 13px;
	padding: 6px 0;
}
