/* ═══════════════════════════════════════════════════
   LANGUAGE SWITCHER — Desktop dropdown
   ═══════════════════════════════════════════════════ */

.langSwitcher {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 24px;
  flex-shrink: 0;
}

/* ── Trigger button ─────────────────────────────── */

.langSwitcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 14px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-base, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.22s ease,
    background   0.22s ease,
    color        0.22s ease;
}

.langSwitcher__btn:hover {
  border-color: var(--green, #3bd671);
  background: rgba(59, 214, 113, 0.07);
  color: #fff;
}

.langSwitcher__btn[aria-expanded="true"] {
  border-color: var(--green, #3bd671);
  background: rgba(59, 214, 113, 0.12);
  color: var(--green, #3bd671);
}

/* ── Chevron icon ───────────────────────────────── */

.langSwitcher__chevron {
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.langSwitcher__btn:hover .langSwitcher__chevron,
.langSwitcher__btn[aria-expanded="true"] .langSwitcher__chevron {
  opacity: 1;
}

.langSwitcher__btn[aria-expanded="true"] .langSwitcher__chevron {
  transform: rotate(180deg);
}

/* ── Dropdown panel ─────────────────────────────── */

.langSwitcher__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 9999;

  list-style: none;
  margin: 0;
  padding: 5px;

  background: var(--blue, #0c1c3a);
  /* Явный цвет на родителе — a { color: inherit } возьмёт его, а не body #222 */
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(59, 214, 113, 0.22);
  border-radius: 10px;
  min-width: 74px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);

  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  transition:
    opacity    0.18s ease,
    transform  0.18s ease,
    visibility 0.18s ease;
}

/* Visible state — triggered by JS aria-expanded */
.langSwitcher__btn[aria-expanded="true"] ~ .langSwitcher__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.langSwitcher__dropdown li {
  margin: 0;
  padding: 0;
}

/* ── Dropdown option ────────────────────────────── */

/* Двойная специфичность чтобы перебить base.css a { color: inherit } */
.langSwitcher__dropdown .langSwitcher__option {
  display: block;
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-base, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.langSwitcher__dropdown .langSwitcher__option:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.langSwitcher__dropdown .langSwitcher__option.is-active {
  background: rgba(59, 214, 113, 0.12);
  color: var(--green, #3bd671);
}

/* ═══════════════════════════════════════════════════
   MOBILE LANG SWITCHER — Horizontal pills in mobile menu
   ═══════════════════════════════════════════════════ */

.mobileLangSwitcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.mobileLangSwitcher__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-base, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mobileLangSwitcher__btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.mobileLangSwitcher__btn.is-active {
  border-color: var(--green, #3bd671);
  background: rgba(59, 214, 113, 0.12);
  color: var(--green, #3bd671);
}

/* ── Responsive: hide desktop switcher on mobile ── */

@media (max-width: 900px) {
  .langSwitcher {
    display: none;
  }
}
