/**
 * CoreNext Translate — 前台样式
 * 弹窗挂在 body 上，不受侧栏 overflow / scoped CSS 影响
 */

/* ===== 功能模块侧边栏 🌍 ===== */
.core-next-aside-list .cnt-aside-btn {
	width: 24px;
	height: 24px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	overflow: visible !important;
}

.core-next-aside-list .cnt-aside-emoji {
	font-size: 18px;
	line-height: 1;
	user-select: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
}

/* ===== 遮罩 + 语言弹窗（body 级） ===== */
.cnt-lang-mask {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999998;
	background: transparent;
}
.cnt-lang-mask.is-open {
	display: block;
}

.cnt-lang-panel {
	display: none;
	position: fixed;
	z-index: 999999;
	width: 188px;
	max-height: min(70vh, 380px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #ffffff;
	color: #1a1a1a;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.06);
	padding: 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.cnt-lang-panel.is-open {
	display: block;
}

.cnt-lang-panel-title {
	padding: 12px 16px 10px;
	font-size: 12px;
	font-weight: 600;
	color: #888;
	border-bottom: 1px solid #eee;
	letter-spacing: 0.02em;
}

.cnt-lang-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 6px 0 !important;
}

.cnt-lang-item {
	display: block !important;
	padding: 9px 16px !important;
	margin: 0 !important;
	font-size: 14px !important;
	line-height: 1.35 !important;
	color: #1a1a1a !important;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: transparent !important;
	border: none !important;
	transition: background 0.12s;
}
.cnt-lang-item:hover {
	background: #f3f4f6 !important;
	color: #000 !important;
}
.cnt-lang-item.is-active {
	background: #eef2ff !important;
	color: #3730a3 !important;
	font-weight: 600;
}

/* 深色模式页面 */
body.dark .cnt-lang-panel,
html.dark .cnt-lang-panel {
	background: #2a2a2e;
	color: #f0f0f0;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
body.dark .cnt-lang-panel-title,
html.dark .cnt-lang-panel-title {
	color: #aaa;
	border-bottom-color: rgba(255, 255, 255, 0.1);
}
body.dark .cnt-lang-item,
html.dark .cnt-lang-item {
	color: #f0f0f0 !important;
}
body.dark .cnt-lang-item:hover,
html.dark .cnt-lang-item:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	color: #fff !important;
}
body.dark .cnt-lang-item.is-active,
html.dark .cnt-lang-item.is-active {
	background: rgba(99, 102, 241, 0.25) !important;
	color: #c7d2fe !important;
}

/* ===== 顶部下拉 ===== */
.cnt-select-wrap {
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
}
.cnt-lang-select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	padding: 4px 26px 4px 10px;
	font-size: 13px;
	color: inherit;
	cursor: pointer;
	min-width: 100px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
}
.cnt-lang-select:focus {
	outline: none;
	border-color: rgba(0, 0, 0, 0.35);
}

/* ===== 底部导航 ===== */
.phone-nav .cnt-bottom-item {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-width: 0;
}
.phone-nav .cnt-bottom-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	width: 100%;
}
.phone-nav .cnt-bottom-emoji {
	font-size: 16px;
	line-height: 1;
}
.phone-nav .cnt-bottom-item .cnt-lang-select {
	font-size: 11px;
	min-width: 0;
	border: none;
	padding: 0 14px 0 2px;
	background-position: right 0 center;
	color: inherit;
}

/* 仅 PC */
@media (max-width: 768px) {
	.cnt-pc-only {
		display: none !important;
	}
}
