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

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a2e;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background 0.2s, border-color 0.2s;
}

.lang-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.25);
}

.lang-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.lang-code {
  letter-spacing: 0.04em;
}

.lang-chevron {
  width: 9px;
  height: 9px;
  opacity: 0.55;
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

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

.lang-dropdown {
  position: absolute;
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 140px;
  background: #3101a3;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #e0d8ff;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  white-space: nowrap;
}

.lang-option:hover {
  background: rgba(144, 121, 251, 0.25);
  color: #fff;
}

.lang-option.is-active {
  background: rgba(144, 121, 251, 0.35);
  color: #fff;
  font-weight: 700;
}

.opt-flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.opt-label {
  font-size: 11px;
  opacity: 0.55;
  margin-left: auto;
  padding-left: 8px;
}

.lang-switcher--header {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lang-switcher--header .lang-dropdown {
  top: calc(100% + 8px);
  bottom: auto;
  right: 0;
  left: auto;
  transform: translateY(-4px);
}

.lang-switcher--header .lang-dropdown.is-open {
  transform: translateY(0);
}

.footer-lang-social {
  display: flex;
  gap: 80px;
}

@media (max-width:700px) {
  .footer-lang-social {
    gap: 40px;
  }
}

.footer-lang-social__right h4 {
  margin: 24px 0px 12px;
}

.lang-switcher--footer .lang-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.lang-switcher--footer .lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.lang-switcher--footer .lang-dropdown {
  bottom: calc(100% + 8px);
  top: auto;
  left: 0;
  right: auto;
  transform: translateY(4px);
}

.lang-switcher--footer .lang-dropdown.is-open {
  transform: translateY(0);
}

@media (max-width: 900px) {
  .lang-switcher--header {
    right: 16px;
  }
}

@media (max-width: 480px) {
  .lang-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .lang-flag {
    font-size: 15px;
  }
}