/* 语言切换与首屏防闪烁。独立一份，不动镜像下来的原站 CSS。 */

/* 存了非中文语言的访客，翻译落地前先遮住正文，避免中文闪一下。
   遮罩由 I18nProvider 撤，layout 里的内联脚本还带了兜底定时器。 */
html[data-i18n-pending] body {
  visibility: hidden;
}

/* 下拉是 absolute + right:0，所以这一层要同时满足两件事：作为定位基准，
   且宽度紧贴按钮。
   原来是 display:flex —— 块级盒子，会撑满外层格子 .cbox-14-3 的宽度，
   于是 right:0 落到格子右边缘而不是按钮右边缘，下拉整体飘到旁边。
   inline-flex 收缩到内容宽度，right:0 才等于按钮右边缘。 */
/* 对齐基准是搜索键那格：.nav-search 桌面端 height:80px（整行高），
   把 24px 的 svg 居中在里面。这里照搬同一个盒子，两个图标才在同一条
   中线上、视觉重量也一致。写死 height 反而会错开 —— 之前的 30px 就是。 */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 80px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 1;
  /* 与 .seabtn 同步：页头一直压在 banner 上，桌面端恒白 */
  color: #fff;
}

.lang-icon {
  display: block;
}

/* 16px 跟导航一级标题（.p_level1Item a{font-size:16px}）取齐，
   font-weight 保持 normal —— 导航项也是 normal，600 会显得比旁边重。 */
.lang-short {
  font-size: 16px;
  letter-spacing: 0.02em;
}

/* 手机端 .nav-search 降到 30px，这里跟着降，否则 80px 会把页头撑开 */
@media screen and (max-width: 768px) {
  .lang-switch {
    height: 30px;
  }

  .lang-short {
    font-size: 14px;
  }
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 10px 0 0;
  padding: 6px 0;
  min-width: 132px;
  list-style: none;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  z-index: 60;
}

/* 键盘和鼠标聚焦都能看到选项；即使服务端成型脚本尚未执行，菜单也不应失效。 */
.lang-switch:focus-within .lang-menu {
  display: block !important;
}

.lang-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: none;
  font-size: 14px;
  color: #333;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.lang-item:hover {
  background: #f3f6f9;
}

.lang-item.is-active {
  color: #215eb3;
  font-weight: 600;
}

/* 桌面端页头是 logo | 导航 | 搜索 的 flex 行，语言键作为第四项排在最右。
   z-index 必须给到 5：同级的 .cbox-14-0 与 .cbox-14-2 都是 5，这一格不设的话
   下拉菜单里的 z-index:60 只在本格内部排序，整个菜单会被搜索格压住。 */
#c_navigation_0061635239687823 .e_container-14 .cbox-14-3 {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 4px;
  position: relative;
  z-index: 5;
}

/* ≤768px 时搜索键是 position:absolute right:60px，语言键让到它左边，
   再往右是汉堡菜单，三者不重叠 */
@media screen and (max-width: 768px) {
  #c_navigation_0061635239687823 .e_container-14 .cbox-14-3 {
    position: absolute;
    right: 104px;
    z-index: 5;
    margin-left: 0;
  }

  /* 窄屏页头底色是白的，同 .seabtn svg{fill:#333!important} */
  .lang-btn {
    color: #333;
  }

  .lang-short {
    display: none;
  }
}
