/* VoltLang language switcher — no JavaScript, <details> does the dropdown. */

.voltlang-switcher {
	position: relative;
	display: inline-block;
	font-size: 14px;
	line-height: 1.4;
}

.voltlang-switcher__details {
	position: relative;
}

.voltlang-switcher__summary {
	cursor: pointer;
	list-style: none;
	padding: 6px 12px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	white-space: nowrap;
}

.voltlang-switcher__summary::-webkit-details-marker {
	display: none;
}

.voltlang-switcher__summary::after {
	content: "▾";
	margin-left: 6px;
	font-size: 11px;
	opacity: .7;
}

.voltlang-switcher[open] .voltlang-switcher__summary::after,
.voltlang-switcher__details[open] .voltlang-switcher__summary::after {
	content: "▴";
}

.voltlang-switcher__list {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 60;
	min-width: 150px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	color: #111;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.voltlang-switcher--inline .voltlang-switcher__list {
	position: static;
	display: flex;
	gap: 10px;
	background: none;
	border: 0;
	box-shadow: none;
	padding: 0;
	min-width: 0;
}

.voltlang-switcher__item {
	margin: 0;
}

.voltlang-switcher__link {
	display: block;
	padding: 6px 10px;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.voltlang-switcher__link:hover {
	background: rgba(0, 0, 0, .06);
}

.voltlang-switcher__link.is-current {
	font-weight: 600;
	background: rgba(0, 0, 0, .08);
}

/* RTL: mirror the panel and the caret. */
[dir="rtl"] .voltlang-switcher__list {
	right: auto;
	left: 0;
}

[dir="rtl"] .voltlang-switcher__summary::after {
	margin-left: 0;
	margin-right: 6px;
}

@media (max-width: 480px) {
	.voltlang-switcher__summary {
		padding: 5px 10px;
		font-size: 13px;
	}
}
