.lang-switcher {
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
  margin-right: 15px;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  background: #fff;
  color: #1c1c1c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  text-transform: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.lang-switcher__btn:hover {
  background: #f8f9fa;
  color: #726cf9;
}

.lang-switcher__btn[aria-expanded="true"] {
  border-color: #726cf9;
  color: #726cf9;
}

.lang-switcher__chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lang-switcher__btn[aria-expanded="true"] .lang-switcher__chevron {
  transform: rotate(180deg);
}

.header-navigation-box .lang-switcher__list,
.lang-switcher__list {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  left: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  width: max-content;
  min-width: 10.5rem;
  max-width: min(16rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.header-navigation-box .lang-switcher__list[hidden],
.lang-switcher__list[hidden] {
  display: none !important;
}

.header-navigation-box .lang-switcher__list li,
.lang-switcher__list li {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: normal;
}

.header-navigation-box .lang-switcher__list a,
.lang-switcher__link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border-radius: 0.375rem;
  color: #1c1c1c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.header-navigation-box .lang-switcher__list a:hover,
.lang-switcher__link:hover {
  background: #f8f9fa;
  color: #726cf9;
}

.header-navigation-box .lang-switcher__list a.lang-switcher__item--active,
.lang-switcher__item--active {
  background: rgba(114, 108, 249, 0.1);
  color: #726cf9;
  font-weight: 600;
  pointer-events: none;
}

@media (max-width: 991px) {
  .lang-switcher {
    margin: 15px 0 0;
    width: 100%;
  }

  .lang-switcher__btn {
    width: 100%;
    justify-content: space-between;
  }

  .header-navigation-box .lang-switcher__list,
  .lang-switcher__list {
    position: static;
    margin-top: 0.5rem;
    max-width: none;
    width: 100%;
    box-shadow: none;
  }
}
