/* Two explicit language choices, styled as a compact toggle. */
.idioma {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 999px;
  gap: 0;
  margin-right: 8px;
  color: inherit;
}
.idioma button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 500 11px/1 sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
  padding: 10px 9px;
  min-width: 34px;
  min-height: 32px;
  transition: background-color .2s, color .2s;
}
.idioma button[aria-pressed="true"] { background: #9b503b; color: #fff; }
.idioma button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.idioma--avulso { position: fixed; top: 20px; right: 72px; z-index: 9999; background: hsl(var(--background, 40 30% 95%)); }
@media (max-width: 640px) {
  .idioma { margin-right: 3px; }
  .idioma button { padding-inline: 7px; min-width: 31px; min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .idioma button { transition: none; } }

/* On small screens only the new control moves; existing navbar styles stay intact. */
@media (max-width: 640px) {
  .navbar .idioma {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    margin: 0;
    background: hsl(var(--background, 40 30% 95%));
    backdrop-filter: blur(12px);
  }
}
