/* ===========================================================
   多语言切换按钮 · langSwitch（2026-09-26）
   命名空间 .gwlang-* / .gw-tools，避免与全站样式冲突
   注意：全站 html{font-size:12px} + body{font-size:62.5%!important}
        → 本组件一律使用 px，不要用 rem
   =========================================================== */

/* --- 右侧工具区：电话 + 语言 + 登录 统一为弹性行（原为三个各自 absolute） --- */
.header-box .gw-tools {
	position: absolute;
	right: calc(15% - 112px);
	top: 18px;
	height: 34px;
	display: flex;
	align-items: center;
	gap: 16px;
	z-index: 12;
}

/* 进入弹性行后取消各自的绝对定位（内联 style 的 top 随之失效） */
.header-box .gw-tools .tel-box,
.header-box .gw-tools .login-box {
	position: static;
	top: auto;
	right: auto;
	left: auto;
}

/* --- 登录按钮：沿用语言按钮的胶囊造型，配色（品牌蓝 #00a4ff + 白字）保持不变 --- */
.header-box .login-box .login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 58px;
	height: 28px;
	padding: 0 14px;
	background: #00a4ff;
	color: #fff !important;
	font-size: 12px;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	border-radius: 14px;
	transition: box-shadow .2s;
}

.header-box .login-box .login:hover {
	color: #fff !important;
	background: #00a4ff;
	box-shadow: 0 3px 10px rgba(0, 164, 255, .35);
	text-decoration: none;
}

/* --- 按钮 --- */
.gwlang {
	position: relative;
	display: inline-block;
	font-size: 12px;
	line-height: 1;
}

.gwlang-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 10px;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 14px;
	color: inherit;
	font-size: 12px;
	cursor: pointer;
	white-space: nowrap;
	transition: color .2s, border-color .2s;
}

.gwlang-btn:hover,
.gwlang.open .gwlang-btn,
.gwlang:hover .gwlang-btn,
.gwlang:focus-within .gwlang-btn {
	color: #00a4ff;
	border-color: #00a4ff;
}

.header-box.black .gwlang-btn {
	border-color: rgba(255, 255, 255, .38);
}

/* 描边式地球图标：只描边不填充，避免出现实心黑块 */
.gwlang-ico {
	width: 14px;
	height: 14px;
	flex: none;
	fill: none;
	stroke: currentColor;
}

.gwlang-caret {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: .75;
	transition: transform .2s;
}

.gwlang.open .gwlang-caret,
.gwlang:hover .gwlang-caret,
.gwlang:focus-within .gwlang-caret {
	transform: rotate(180deg);
}

/* --- 下拉菜单 ---
   说明：与站内其它下拉保持一致，采用「悬停/聚焦即展开」，
   菜单顶边紧贴按钮底边（top:28px + padding-top:6px），
   中间不留空隙，鼠标从按钮移到菜单时 hover 不会断。

   2026-10-19 改版：视觉规格对齐「关于我们」下拉（.prod-dd__panel）——
   白底 + 1px #DCE6F2 描边 + 12px 圆角 + 双层柔和阴影 + 8px 内边距；
   条目 14px/600 深墨色、8px 圆角、hover 浅蓝底 #EAF3FB。
   菜单内容（简/繁/EN 三项及徽章）未做任何增删改。 */
.gwlang-menu {
	position: absolute;
	top: 28px;
	right: 0;
	min-width: 152px;
	margin: 6px 0 0;                 /* 与关于我们面板一致：距按钮 6px */
	padding: 8px;
	list-style: none;
	background: #fff;
	border: 1px solid #DCE6F2;
	border-radius: 12px;
	box-shadow: 0 18px 44px -20px rgba(10, 27, 60, .38), 0 2px 6px rgba(10, 27, 60, .06);
	display: none;
	z-index: 20;
}

/* 透明桥接：盖住 margin-top 那 6px，鼠标从按钮划到菜单时 hover 不断
   （与 .prod-dd__panel::before 同一手法） */
.gwlang-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -8px;
	height: 9px;
	background: transparent;
}

.gwlang.open .gwlang-menu,
.gwlang:hover .gwlang-menu,
.gwlang:focus-within .gwlang-menu {
	display: block;
}

.gwlang-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 8px;
	color: #16283D;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: background .16s ease, color .16s ease;
}

/* 行间距 2px，对齐关于我们面板的 gap:2px */
.gwlang-item + .gwlang-item {
	margin-top: 2px;
}

.gwlang-item:hover,
.gwlang-item:focus-within {
	background: #EAF3FB;
	color: #0057A0;
}

.gwlang-item.is-active {
	color: #0057A0;
}

/* 键盘可达时的焦点环（与关于我们条目同一规格） */
.gwlang-item:focus-visible {
	outline: 3px solid #0084C9;
	outline-offset: -3px;
	border-radius: 8px;
}

.gwlang-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 18px;
	border-radius: 4px;
	background: #EDF2F8;
	color: #5C6E85;
	font-size: 11px;
	font-weight: 500;
	flex: none;
	transition: background .16s ease, color .16s ease;
}

.gwlang-item:hover .gwlang-badge,
.gwlang-item.is-active .gwlang-badge {
	background: #0084C9;
	color: #fff;
}

/* --- 轻提示（不依赖 layer / jQuery） --- */
.gwlang-toast {
	position: fixed;
	left: 50%;
	top: 92px;
	transform: translateX(-50%);
	max-width: 78vw;
	padding: 10px 18px;
	background: rgba(7, 12, 65, .92);
	color: #fff;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
	border-radius: 6px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
	z-index: 9999;
}

.gwlang-toast.show {
	opacity: 1;
}

/* --- 窄屏：PC 头隐藏时收起，避免干扰移动端头部 --- */
@media only screen and (max-width: 1120px) {
	.header-box .gw-tools {
		display: none;
	}
}
