.pl-lang-switcher {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.pl-lang-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 32px;
	padding: 4px 8px;
	border: 1px solid var(--theme-border-color, #e0e0e0);
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	color: var(--theme-text-color, #333);
	text-decoration: none;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.pl-lang-link:hover,
.pl-lang-link:focus {
	background: var(--theme-palette-color-1, #3a7df6);
	border-color: var(--theme-palette-color-1, #3a7df6);
	color: #fff;
	text-decoration: none;
}

.pl-lang-switcher:not(.pl-lang-switcher--dropdown) .pl-lang-link.active {
	background: var(--theme-palette-color-1, #3a7df6);
	border-color: var(--theme-palette-color-1, #3a7df6);
	color: #fff;
	pointer-events: none;
	cursor: default;
}

.pl-lang-switcher--dropdown {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: #aaaaaa;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.pl-lang-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #aaaaaa;
	font: inherit;
	letter-spacing: 0;
	cursor: pointer;
	transition: color 0.2s ease;
}

.pl-lang-trigger-icon {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.2s ease;
}

.pl-lang-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	z-index: 1001;
	display: grid;
	min-width: 96px;
	padding: 0;
	border: 1px solid rgba(33, 84, 78, 0.12);
	border-radius: 0;
	background: #fff;
	box-shadow: 0 12px 28px rgba(25, 54, 50, 0.16);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.pl-lang-menu::before {
	content: '';
	position: absolute;
	right: 0;
	bottom: 100%;
	left: 0;
	height: 10px;
}

/* 展开状态：JS 切换 .pl-lang-open，桌面端 hover 也触发 */
.pl-lang-switcher--dropdown.pl-lang-open,
.pl-lang-switcher--dropdown:hover,
.pl-lang-switcher--dropdown:focus-within {
	color: #333333;
}

.pl-lang-switcher--dropdown.pl-lang-open .pl-lang-trigger,
.pl-lang-switcher--dropdown:hover .pl-lang-trigger,
.pl-lang-switcher--dropdown:focus-within .pl-lang-trigger {
	color: #333333;
}

.pl-lang-switcher--dropdown.pl-lang-open .pl-lang-trigger-icon,
.pl-lang-switcher--dropdown:hover .pl-lang-trigger-icon,
.pl-lang-switcher--dropdown:focus-within .pl-lang-trigger-icon {
	transform: rotate(180deg);
}

.pl-lang-switcher--dropdown.pl-lang-open .pl-lang-menu,
.pl-lang-switcher--dropdown:hover .pl-lang-menu,
.pl-lang-switcher--dropdown:focus-within .pl-lang-menu {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.pl-lang-switcher--dropdown .pl-lang-link {
	display: flex;
	justify-content: flex-start;
	min-width: 0;
	width: 100%;
	height: 34px;
	padding: 0 12px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #555555;
	font-size: 13px;
	font-weight: 600;
	text-align: left;
	transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.pl-lang-switcher--dropdown .pl-lang-link:hover,
.pl-lang-switcher--dropdown .pl-lang-link:focus {
	background: rgba(42, 92, 86, 0.08);
	color: #245850;
	box-shadow: inset 3px 0 0 #2f6f66;
}

.pl-lang-switcher--dropdown .pl-lang-link.active {
	background: rgba(42, 92, 86, 0.12);
	color: #245850;
	box-shadow: inset 3px 0 0 #2f6f66;
	cursor: default;
}

/* 手机端：加宽下拉菜单以容纳完整语言名称 */
@media (max-width: 689.98px) {
	.pl-lang-menu {
		min-width: 140px;
		right: 0;
		left: auto;
		transform: translate(0, 6px);
	}

	.pl-lang-switcher--dropdown.pl-lang-open .pl-lang-menu,
	.pl-lang-switcher--dropdown:hover .pl-lang-menu,
	.pl-lang-switcher--dropdown:focus-within .pl-lang-menu {
		transform: translate(0, 0);
	}
}
