/* 当前选中项限制宽度 + 文字截断 */

header .gt_switcher .gt_selected,
header .gt_switcher .gt_current_lang,
header .skiptranslate .goog-te-gadget-simple,
header .language-selector,
header select.language-switcher {
  max-width: 130px !important;
  min-width: unset !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

/* 下拉选项也限制 */

.gt_switcher .gt_option a,
.goog-te-menu-value span {
  max-width: 180px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* 整个容器限制 */

.gtranslate_wrapper,
.gt_switcher_wrapper,
header .translation-switcher {
  max-width: 150px !important;
}

/* === GTranslate 悬浮修复 (防止撑开页眉) === */

/* 1. 【核心】锁死高度，让列表悬浮 */

div.gt_switcher {
  height: 30px !important;
  /* 强制高度固定 (跟按钮一样高) */
  overflow: visible !important;
  /* 允许列表溢出盒子 */
  z-index: 9999 !important;
  /* 保证浮在最上层 */
  position: relative !important;
  /* 相对定位基准 */
  vertical-align: middle !important;
}

/* 2. 让下拉出来的列表“飘”起来 */

div.gt_switcher .gt_option {
  position: relative !important;
  z-index: 10000 !important;
  /* 比按钮更高 */
  width: 100% !important;
  /* 宽度跟按钮一致 */
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  /* 加个阴影，更有悬浮感 */
}

/* 3. 防止下拉列表的第一项被遮挡 */

div.gt_switcher .gt_option:first-of-type {
  margin-top: 5px !important;
  /* 与按钮拉开一点距离 */
}