.lang-switcher {
  position: relative;
  z-index: 50;
  margin-right: 0.25rem;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.5rem;
  padding: 0 0.85rem;
  border: 1px solid hsl(var(--input));
  border-radius: 0.375rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.lang-switcher__btn:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.lang-switcher__btn[aria-expanded="true"] {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.lang-switcher__chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lang-switcher__btn[aria-expanded="true"] .lang-switcher__chevron {
  transform: rotate(180deg);
}

.lang-switcher__list {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 10.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--background));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lang-switcher__list[hidden] {
  display: none;
}

.lang-switcher__link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.375rem;
  color: hsl(var(--foreground) / 0.85);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switcher__link:hover {
  background: hsl(var(--accent));
  color: hsl(var(--primary));
}

.lang-switcher__item--active {
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  font-weight: 600;
  pointer-events: none;
}

.lang-switcher--mobile {
  margin: 0 0 1rem;
}

.lang-switcher--mobile .lang-switcher__btn {
  width: 100%;
  justify-content: space-between;
}

.lang-switcher--mobile .lang-switcher__list {
  position: static;
  margin-top: 0.5rem;
  box-shadow: none;
}
