/* SnipX-site · 语言切换器样式 */

.lang-switcher {
  position: relative;
  display: inline-block;
  margin-right: 6px;
}

.lang-switcher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.lang-switcher-toggle:hover {
  background: var(--panel-strong);
  border-color: var(--line-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.lang-switcher-toggle:active {
  transform: translateY(0);
}

.lang-switcher-toggle:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.lang-switcher-chevron {
  font-size: 11px;
  opacity: 0.7;
  transition: transform 180ms ease;
}

.lang-switcher-toggle[aria-expanded="true"] .lang-switcher-chevron {
  transform: rotate(180deg);
}

.lang-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 180px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.32),
    0 0 0 1px var(--line-soft);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  z-index: 50;
}

.lang-switcher-menu[hidden] {
  display: none;
}

.lang-switcher-menu li {
  margin: 0;
  padding: 0;
}

.lang-switcher-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--muted);
  transition: background 140ms ease, color 140ms ease;
  text-decoration: none;
}

.lang-switcher-menu a:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.lang-switcher-menu a[aria-selected="true"] {
  background: rgba(106, 167, 255, 0.14);
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 560px) {
  .lang-switcher-toggle {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
  .lang-switcher-menu {
    min-width: 160px;
  }
}