/* Sprachumschalter mit Flaggen (DevWorld.UI.Shared/LangSwitch, ab vier Sprachen). Knopf „[Flagge] SL ▾“ in der Kopfleiste,
   Menü mit allen Sprachen, Suchfeld; am Handy als Blatt unter der Kopfleiste über die ganze Breite. */
.dw-lang { position: relative; display: inline-block; color: inherit; font-size: 13px; line-height: 1.2; }
.dw-lang > summary { list-style: none; }
.dw-lang > summary::-webkit-details-marker { display: none; }
.dw-lang__btn {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
    padding: 4px 6px 4px 8px; border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 45%, transparent);
    border-radius: 999px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; min-height: 30px; box-sizing: border-box;
}
.dw-lang__btn:hover, .dw-lang[open] > .dw-lang__btn { background: color-mix(in srgb, currentColor 14%, transparent); }
.dw-lang__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.dw-lang__flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; display: block; }
.dw-lang__caret { flex: none; transition: transform .15s; }
.dw-lang[open] .dw-lang__caret { transform: rotate(180deg); }
.dw-lang__menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 2000; width: 270px; max-height: min(70vh, 520px);
    display: flex; flex-direction: column; background: #fff; color: #1f2937; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15,23,42,.22), 0 0 0 1px rgba(15,23,42,.08); overflow: hidden; text-align: left;
}
.dw-lang__filter {
    margin: 8px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 14px;
    color: inherit; background: #fff; min-width: 0;
}
.dw-lang__filter:focus { outline: 2px solid #1565c0; outline-offset: 0; border-color: #1565c0; }
.dw-lang__list { list-style: none; margin: 0; padding: 0 6px 6px; overflow-y: auto; overscroll-behavior: contain; }
.dw-lang__list li[hidden] { display: none; }
.dw-lang__item {
    display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 8px 10px; border: 0;
    border-radius: 6px; background: none; color: inherit; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; text-align: left;
}
.dw-lang__item:hover, .dw-lang__item:focus-visible { background: #eef2f7; outline: none; }
.dw-lang__item--on { background: #e3eefc; color: #0d47a1; cursor: default; font-weight: 600; }
.dw-lang__c { width: 26px; flex: none; font-size: 12px; letter-spacing: .04em; color: #64748b; }
.dw-lang__item--on .dw-lang__c { color: inherit; }
.dw-lang__n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-lang__check { flex: none; }
.dw-lang__none { margin: 4px 16px 12px; color: #64748b; font-size: 13px; }
@media (max-width: 600px) {
    .dw-lang__btn { padding: 3px 4px 3px 6px; gap: 4px; }
    .dw-lang__menu { position: fixed; left: 8px; right: 8px; top: 56px; width: auto; max-height: calc(100vh - 72px); }
    .dw-lang__item { padding: 11px 10px; font-size: 15px; }
    .dw-lang__filter { font-size: 16px; } /* iOS zoomt bei < 16 px */
}
/* Auswahlfeld „Sprache“ bei Anmeldung/Registrierung (DevWorld.Apps LoginLanguageField) */
.dw-langfield { position: relative; }
.dw-langfield .dw-lang__flag { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.dw-langfield select.dw-input { padding-left: 46px; appearance: auto; cursor: pointer; }
.dw-langfield__hint { display: block; margin: 4px 2px 0; font-size: .75rem; color: rgba(0,0,0,.6); }
@media print { .dw-lang { display: none !important; } }
