.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 7px;
  border-radius: 8px;
  color: var(--ink-soft, #5f544b);
  text-decoration: none;
  white-space: nowrap;
}

.language-switcher a:hover {
  color: var(--ink, #1e1813);
  background: rgba(30, 24, 19, .06);
  text-decoration: none;
}

.language-switcher a:focus-visible {
  outline: 2px solid var(--terracotta, #a84420);
  outline-offset: 2px;
}

.language-switcher a[aria-current="page"] {
  color: var(--ink, #1e1813);
  box-shadow: inset 0 -2px var(--terracotta, #a84420);
}

nav > .language-switcher-top { margin-left: auto; }
.nav-right > .language-switcher-top { margin: -8px 4px -8px 0; }
footer .language-switcher-bottom { margin: -8px 6px -8px 0; }

.language-switcher-standalone {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  padding: 8px clamp(16px, 4vw, 48px);
  background: var(--cream, #f7f3ec);
}

.language-switcher-standalone-top {
  position: absolute;
  inset: 0 0 auto auto;
  background: transparent;
}

.language-switcher-standalone-bottom {
  border-top: 1px solid var(--line, rgba(74, 58, 42, .13));
}

@media (max-width: 700px) {
  /* Bunnvelgeren får egen rad, og lenkerekka i footeren brytes i stedet for å
     gjøre siden bredere enn skjermen (fanget ved 375 px). */
  footer .f-l, footer .footer-links { flex-wrap: wrap; column-gap: 22px; row-gap: 6px; }
  footer .language-switcher-bottom { flex-basis: 100%; margin: 0; }
  .language-switcher { gap: 0; }
  .language-switcher a { min-width: 40px; padding-inline: 5px; }
  .nav-right > .language-switcher-top { margin-right: 0; }
}
