/* =========================================================
   语言切换器（国旗 + 语言名称 下拉）
   样式规范：与主题 niankang 配色一致（主色 #0089A6）
   ========================================================= */
.nk-lang {
  position: relative;
  display: inline-block;
  direction: ltr;
  font-size: 14px;
  line-height: 1.4;
}

/* 触发按钮（默认浅色底） */
.nk-lang__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--servixa-bdr-color, #e6e6e6);
  border-radius: 8px;
  padding: 7px 12px;
  min-width: 132px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--servixa-black, #111);
  transition: border-color .2s, box-shadow .2s;
}
.nk-lang__btn:hover {
  border-color: var(--servixa-base, #0089A6);
}
.nk-lang__btn:focus-visible {
  outline: none;
  border-color: var(--servixa-base, #0089A6);
  box-shadow: 0 0 0 3px rgba(0, 137, 166, .18);
}

/* 国旗 */
.nk-lang__flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
  flex: 0 0 auto;
}

/* 当前语言名称 */
.nk-lang__name {
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 箭头 */
.nk-lang__chev {
  flex: 0 0 auto;
  color: inherit;
  opacity: .65;
  font-size: 14px;
  transition: transform .2s;
}
.nk-lang.is-open .nk-lang__chev {
  transform: rotate(180deg);
}

/* 下拉列表（白色面板，参考截图样式） */
.nk-lang__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 236px;
  max-height: 288px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--servixa-bdr-color, #e6e6e6);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(17, 17, 17, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 996;
}
.nk-lang.is-open .nk-lang__list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 列表项 */
.nk-lang__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--servixa-black, #111);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nk-lang__item:hover,
.nk-lang__item:focus-visible {
  background: #f2f7f8;
  color: var(--servixa-base, #0089A6);
  outline: none;
}
.nk-lang__item.is-current {
  background: #f2f7f8;
  color: var(--servixa-base, #0089A6);
  font-weight: 700;
}

/* 深色头部变体（顶部通栏为深色背景时使用） */
.nk-lang--dark .nk-lang__btn {
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
  color: var(--servixa-white, #fff);
  min-width: 108px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
}
.nk-lang--dark .nk-lang__btn:hover {
  border-color: var(--servixa-base, #0089A6);
  background: rgba(255, 255, 255, .06);
}

/* 紧凑变体（移动端顶部控制区） */
.nk-lang--compact .nk-lang__btn {
  min-width: 0;
  padding: 4px 8px;
  gap: 6px;
  font-size: 12px;
}
.nk-lang--compact .nk-lang__name {
  max-width: 88px;
}
.nk-lang--compact .nk-lang__list {
  left: auto;
  right: 0;
  max-width: 200px;
  max-height: 260px;
}
.nk-lang--compact .nk-lang__item {
  padding: 7px 9px;
  font-size: 13px;
}

/* 与旧版顶部语言切换器占位对齐 */
.main-menu-three__language-switcher .language-switcher .nk-lang {
  display: block;
}
.main-menu-three__language-switcher .language-switcher .nk-lang__list {
  left: 0;
}
