/* ================================================================
   i18n.css — Language switcher + page transition
   ================================================================ */

/* ── Language switcher ──────────────────────────────────────── */
.lang-switcher {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: var(--space-2);
  padding: 3px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-full);
  background: rgba(30, 22, 48, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: none;
  border-radius: var(--border-radius-full);
  background: transparent;
  font: 600 10px/1 var(--font-body);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lang-btn:hover {
  color: var(--text-secondary);
  background: rgba(201, 169, 110, 0.06);
}

.lang-btn.is-active {
  background: rgba(201, 169, 110, 0.12);
  color: var(--gold);
  cursor: default;
}

.lang-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .lang-switcher {
    display: flex;
  }
}

/* ── Плавная смена языка:
   Анимируем только body — без каскада на дочерние элементы.
   Это предотвращает мерцание картинок и layout-сдвиги.        ── */
body.i18n-transitioning {
  opacity: 0.6;
  transition: opacity 0.12s ease;
}

body {
  transition: opacity 0.15s ease;
  opacity: 1;
}

/* НЕ анимируем отдельные data-i18n элементы — это вызывало
   исчезновение картинок и layout-дёрганье                      */

/* ── Мобильный переключатель в mobile-menu-footer ──────────── */
.mobile-lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-full);
  background: rgba(30, 22, 48, 0.35);
  margin-top: var(--space-3);
  margin-bottom: 10px;
}

.mobile-lang-switcher .lang-btn {
  padding: 7px 14px;
  font-size: 11px;
  min-height: 32px;
}

@media (min-width: 768px) {
  .mobile-lang-switcher {
    display: none;
  }
}
