/* 翻译按钮样式优化 - 与其他导航栏按钮保持一致 */
#translate {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	min-width: auto;
	width: auto;
	height: auto;
	padding: 0;
	overflow: visible;
}

/* 完全隐藏 translate.js 自动生成的 select 下拉框 */
#translateSelectLanguage {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	position: absolute !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	font-size: 0 !important;
	line-height: 0 !important;
}

/* 保持按钮图标显示 - 确保图标始终可见 */
#translate i.fa-language {
	position: relative;
	z-index: 2;
	pointer-events: none;
	display: inline-block !important;
	font-size: 16px !important;
	line-height: 1;
	width: auto;
	height: auto;
	opacity: 1 !important;
	visibility: visible !important;
}

/* 确保按钮样式与其他navbar-button一致 */
#translate.navbar-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
}

/* 隐藏 translate.js 可能生成的其他元素 */
#translate > select,
#translate select {
	display: none !important;
}

/* 确保按钮内容区域正确显示 */
#translate::before,
#translate::after {
	display: none;
}

/* 悬停效果 */
#translate:hover {
	opacity: 0.8;
	transition: opacity 0.2s ease;
}

#translate:hover i.fa-language {
	opacity: 1 !important;
}

/* 自定义语言选择下拉菜单样式 */
.van-translate-menu {
	font-size: 14px;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	background: #fff;
	max-height: 300px;
	overflow-y: auto;
}

.van-translate-item {
	padding: 10px 16px;
	cursor: pointer;
	transition: background 0.2s;
	font-size: 14px;
	color: #333;
	white-space: nowrap;
}

.van-translate-item:hover {
	background-color: #f5f5f5 !important;
}

.van-translate-item:first-child {
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
}

.van-translate-item:last-child {
	border-bottom-left-radius: 6px;
	border-bottom-right-radius: 6px;
}

/* 滚动条样式 */
.van-translate-menu::-webkit-scrollbar {
	width: 6px;
}

.van-translate-menu::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.van-translate-menu::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

.van-translate-menu::-webkit-scrollbar-thumb:hover {
	background: #555;
}

