/* Sprachwechsel „DE · EN“ im Kopf. Wird von quelle/englisch/bauen_en.py in beide Sprachen eingebunden. */
.sprachwahl {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--marine, currentColor);
  white-space: nowrap;
}

.sprachwahl a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 32px;
  padding: 0 4px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.sprachwahl a:hover {
  opacity: 1;
}

.sprachwahl a[aria-current] {
  opacity: 1;
}

.sprachwahl span {
  opacity: 0.35;
}

@media (max-width: 860px) {
  .sprachwahl {
    margin-right: 2px;
  }
}

/* Handy: nur die andere Sprache zeigen, damit Logo und Knopf ihre Breite behalten */
@media (max-width: 560px) {
  .kopf .sprachwahl {
    margin-right: 0;
  }

  .kopf .sprachwahl a[aria-current],
  .kopf .sprachwahl span {
    display: none;
  }

  .kopf .sprachwahl a {
    opacity: 0.7;
  }
}

/* Zweite Ausgabe in der dunklen Leiste ganz oben: nur auf sehr schmalen Handys, wo der Kopf voll ist */
.sprachwahl--leiste {
  display: none;
  margin: 0;
  color: var(--weiss, #fff);
}

.leiste .sprachwahl a {
  gap: 0;
}

.leiste .sprachwahl a:hover {
  text-decoration: none;
}

@media (max-width: 380px) {
  .kopf .sprachwahl {
    display: none;
  }

  .sprachwahl--leiste {
    display: inline-flex;
  }

  .leiste__zeile:has(.sprachwahl--leiste) {
    justify-content: space-between;
  }
}
