/* Minimal palette-tokenized styling. Lives in dist/css/lang-switcher.css and is referenced by HTML pages. */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.75rem;
  font: inherit;
}
.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--color-gold, rgba(191, 163, 124, 0.4));
  background: transparent;
  color: inherit;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.lang-switcher__toggle:hover { border-color: var(--color-gold, #BFA37C); }
.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 9rem;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  background: var(--color-bg-card, #1A2226);
  border: 1px solid var(--color-gold, rgba(191, 163, 124, 0.4));
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 1000;
}
.lang-switcher__menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}
.lang-switcher__menu a:hover,
.lang-switcher__menu a[aria-selected="true"] {
  background: rgba(191, 163, 124, 0.12);
}
.lang-switcher__flag { font-size: 1.05rem; line-height: 1; }
[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 0.75rem; }
[dir="rtl"] .lang-switcher__menu { right: auto; left: 0; }
/* On small screens the switcher shares .nav-right with the phone button +
   hamburger — tighten it and drop the ISO-code text (keep the flag) so it fits. */
@media (max-width: 640px) {
  .lang-switcher { margin-left: 0.4rem; }
  .lang-switcher__toggle { padding: 0.3rem 0.5rem; gap: 0.25rem; }
  .lang-switcher__code { display: none; }
}
