/*
 * Language switcher — fixed top-right on landing.
 * Compact pill with flags, active language highlighted.
 */

@import url('../_tokens.css');

@import url('../_motion.css');
.lang-switch {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(10, 14, 28, 0.75);
  border: 1px solid rgba(var(--white-rgb), 0.08);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(var(--black-rgb), 0.4);
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 32px;
}
.lang-switch__btn:hover {
  background: rgba(var(--white-rgb), 0.06);
  color: var(--text);
}
.lang-switch__btn.is-active {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--text);
}

.lang-switch__flag {
  font-size: 14px;
  line-height: 1;
}
.lang-switch__code {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* На узких экранах (телефоны) — только флаги, компактно */
@media (max-width: 640px) {
  .lang-switch { padding: 3px; gap: 2px; top: 8px; right: 8px; }
  .lang-switch__btn { padding: 5px 6px; min-height: 28px; }
  .lang-switch__code { display: none; }
  .lang-switch__flag { font-size: 14px; }
}

/* Очень узкие — сдвигаем ещё плотнее */
@media (max-width: 380px) {
  .lang-switch { padding: 2px; gap: 1px; }
  .lang-switch__btn { padding: 4px 5px; }
  .lang-switch__flag { font-size: 13px; }
}
