/* Dark-theme language switcher for atm topbar */
.lang-wrap,
.atm-lang-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 240;
}
.lang-btn,
.atm-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.lang-btn:hover,
.atm-lang-btn:hover,
.lang-wrap:focus-within .lang-btn,
.atm-lang-wrap:focus-within .atm-lang-btn,
.lang-wrap.is-open .lang-btn,
.atm-lang-wrap.is-open .atm-lang-btn {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.55);
  color: #fff;
}
.lang-menu,
.atm-lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 8px 0;
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.lang-menu::before,
.atm-lang-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}
.lang-wrap:hover .lang-menu,
.lang-wrap:focus-within .lang-menu,
.lang-wrap.is-open .lang-menu,
.atm-lang-wrap:hover .atm-lang-menu,
.atm-lang-wrap:focus-within .atm-lang-menu,
.atm-lang-wrap.is-open .atm-lang-menu,
.atm-nav-lang:hover .atm-lang-menu,
.atm-nav-lang.is-open .atm-lang-menu,
.atm-nav-lang:focus-within .atm-lang-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lang-menu a,
.atm-lang-menu a {
  display: block;
  padding: 9px 16px;
  color: #cbd5e1;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.lang-menu a:hover,
.atm-lang-menu a:hover {
  background: rgba(59, 130, 246, 0.14);
  color: #fff;
}
.lang-menu a.is-active,
.atm-lang-menu a.is-active {
  color: #93c5fd;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.12);
}

html[lang="zh-CN"] .atm-rail-nav a,
html[lang="zh-CN"] .cmhead2 a {
  letter-spacing: 0.14em;
}
html[lang="ru"] .lang-btn,
html[lang="ru"] .atm-lang-btn,
html[lang="ru"] .login-btn,
html[lang="ru"] .atm-login {
  padding-left: 1.2em;
  padding-right: 1.2em;
}

html[dir="rtl"] .lang-menu,
html[dir="rtl"] .atm-lang-menu {
  right: auto;
  left: 0;
}
html[dir="rtl"] .lang-menu a,
html[dir="rtl"] .atm-lang-menu a {
  text-align: right;
}
