/* Sprachumschalter — <details>/<summary>-Dropdown, RTL-korrekt (logical properties). */
.lang-switch-item {
  position: relative;
  list-style: none;
  display: flex;
  align-items: center;              /* Trigger vertikal in der Nav-Zeile zentriert */
}
.lang-switch { position: relative; display: flex; align-items: center; }

/* Trigger — Look & Feel wie die anderen Nav-Items (.nav-link) */
.lang-switch__summary {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  box-sizing: border-box;
  min-height: 40px;                 /* = Nav-Item-Höhe */
  padding: .5rem 1rem;              /* wie .nav-link */
  cursor: pointer;
  user-select: none;
  white-space: nowrap;             /* eine Zeile mobil UND desktop */
  font-weight: 600;
  line-height: 1;
  color: inherit;
  list-style: none;                 /* Default-Dreieck weg */
  border-radius: .25rem;
  transition: background-color .15s ease;
}
.lang-switch__summary::-webkit-details-marker { display: none; }
.lang-switch__summary::marker { content: ""; }
.lang-switch__summary:hover { background: rgba(0, 0, 0, .05); }
.lang-switch__summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.lang-switch__current { letter-spacing: .03em; }

.lang-switch__chevron { flex: none; transition: transform .18s ease; }
.lang-switch[open] .lang-switch__chevron { transform: rotate(180deg); }

/* Panel — Card-Look, ~8px unter dem Trigger, am Trigger-Ende ausgerichtet (RTL-safe) */
.lang-switch__list {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;              /* flippt automatisch in RTL */
  min-inline-size: 12rem;
  max-block-size: min(70vh, 420px); /* mobil: scrollt bei Bedarf */
  overflow-y: auto;
  margin: 0;
  padding: .35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: .5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
  z-index: 10001;                   /* über Cookie-Banner (cc-window 9999 / cc-window-config 10000) */
}
.lang-switch__item { margin: 0; }

.lang-switch__link {
  display: block;
  padding: .5rem 1.1rem;
  white-space: nowrap;
  text-align: start;                /* logisch: links LTR / rechts RTL */
  text-decoration: none;
  color: inherit;
}
.lang-switch__link:hover,
.lang-switch__link:focus-visible { background: rgba(0, 0, 0, .06); }
.lang-switch__link.is-active {
  font-weight: 700;
  background: rgba(0, 0, 0, .045);
}
