/* Language switch: .languageswitch hosts are filled by language-switch.js */
.languageswitch {
	display: inline-flex;
	align-items: center;
}

.ppq-lang-switch {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	line-height: 1;
	color: inherit;
	user-select: none;
}

.ppq-lang-switch__label {
	opacity: 0.85;
}

.ppq-lang-switch__track {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	margin: 0;
	cursor: pointer;
}

.ppq-lang-switch__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.ppq-lang-switch__thumb {
	position: absolute;
	inset: 0;
	background: #bfbfbf;
	border-radius: 999px;
	transition: background 0.15s ease;
}

.ppq-lang-switch__thumb::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease;
}

.ppq-lang-switch__input:checked + .ppq-lang-switch__thumb {
	background: #1677ff;
}

.ppq-lang-switch__input:checked + .ppq-lang-switch__thumb::after {
	transform: translateX(18px);
}

.ppq-lang-switch__input:focus-visible + .ppq-lang-switch__thumb {
	outline: 2px solid #1677ff;
	outline-offset: 2px;
}

.ppq-stem-zh {
	display: none !important;
	margin-top: 0.75em;
	padding-top: 0.75em;
	border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.ppq-stem-zh::before {
	content: '中文';
	display: inline-block;
	margin-bottom: 0.35em;
	padding: 1px 6px;
	border-radius: 3px;
	background: rgba(22, 119, 255, 0.1);
	color: #1677ff;
	font-size: 12px;
	line-height: 1.4;
}

html.ppq-lang-bilingual .ppq-stem-zh,
body.ppq-lang-bilingual .ppq-stem-zh,
html.ppq-lang-bilingual .ppq-question-text .ppq-stem-zh,
body.ppq-lang-bilingual .ppq-question-text .ppq-stem-zh,
html.ppq-lang-bilingual .ppq-review-stem .ppq-stem-zh,
body.ppq-lang-bilingual .ppq-review-stem .ppq-stem-zh,
html.ppq-lang-bilingual .q-html .ppq-stem-zh,
body.ppq-lang-bilingual .q-html .ppq-stem-zh {
	display: block !important;
}
