.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 42px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  background: rgba(147, 51, 234, 0.18);
  color: #e9d5ff;
  font-family: var(--font-Inter);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.lang-switcher__trigger:hover {
  color: #fff;
  background: rgba(147, 51, 234, 0.35);
  border-color: rgba(168, 85, 247, 0.7);
  transform: translateY(-2px);
}

.lang-switcher__current {
  pointer-events: none;
}

.lang-switcher__caret {
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.lang-switcher.is-open .lang-switcher__caret {
  transform: rotate(180deg);
}

.lang-switcher.is-open .lang-switcher__trigger {
  color: #fff;
  background: rgba(147, 51, 234, 0.35);
  border-color: rgba(168, 85, 247, 0.7);
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  margin: 0;
  list-style: none;
  border-radius: 12px;
  background: rgba(12, 8, 24, 0.98);
  border: var(--border-accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  z-index: 1100;
}

.lang-switcher.is-open .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-switcher__option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-Inter);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lang-switcher__option:hover,
.lang-switcher__option.is-active {
  background: rgba(147, 51, 234, 0.2);
  color: var(--color-white);
}

.mobile-menu .lang-switcher {
  padding: 0;
}

.mobile-menu__lang-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.mobile-menu .lang-switcher__trigger {
  width: auto;
  min-width: 42px;
  height: 42px;
  padding: 0 11px;
  justify-content: center;
  gap: 5px;
  transform: none;
}

.mobile-menu .lang-switcher__trigger:hover {
  transform: none;
}

.mobile-menu .lang-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  min-width: 168px;
  margin-top: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.blog-header__actions .lang-switcher__trigger,
.privacy-header__actions .lang-switcher__trigger {
  min-width: 42px;
  height: 42px;
  padding: 0 11px;
}

.blog-header__actions .lang-switcher__caret,
.privacy-header__actions .lang-switcher__caret {
  display: block;
}

@media (max-width: 1100px) {
  .site-header .header__top-actions > .lang-switcher {
    display: none;
  }
}
