/* © 2026 Mike Pollow, Digitalroots. Alle Rechte vorbehalten. */
.ew {
  --ew-unten: 0px;
  width: min(560px, calc(100vw - 24px)); max-width: none;
  max-height: calc(100dvh - 32px); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--linie-stark) transparent;
  padding: 24px 24px 20px;
  color: var(--text); background: #050B0C; border: 1px solid var(--linie-stark);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}
.ew:modal { margin: auto; }
.ew::backdrop { background: rgba(2, 6, 7, .74); }
.ew.pflicht::backdrop { background: #070D0E; }
html.ew-sperre { overflow: hidden; }
.ew[open] { animation: ew-auf 240ms var(--kurve); }
.ew[open]::backdrop { animation: ew-schleier 200ms ease-out; }
@keyframes ew-auf { from { opacity: 0; transform: translateY(12px); } }
@keyframes ew-schleier { from { opacity: 0; } }
.ew:not(:modal) {
  position: fixed; z-index: 44; inset: auto 132px calc(var(--ew-unten) + 16px) auto; margin: 0;
  width: min(560px, calc(100vw - 132px - var(--rand)));
  max-height: calc(100dvh - var(--kopf-hoehe) - var(--ew-unten) - 32px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .62);
}
body:has(.dock) .ew { --ew-unten: var(--dock-hoch, 132px); }
body:has(.leiste.unten) .ew { --ew-unten: 58px; }
body:has(.dock.weg) .ew, body:has(.leiste.unten.weg) .ew { --ew-unten: 0px; }
.ew-titel { display: flex; align-items: center; gap: .5em; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.011em; color: var(--tinte); }
.ew-titel::before { content: ''; flex: 0 0 auto; width: 9px; height: 9px; background: var(--gruenspan); }
.ew-titel:focus { outline: none; }
.ew-text { margin-top: 12px; font-size: 15px; line-height: 1.55; max-width: 60ch; }
.ew-hinweis { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--meta); max-width: 60ch; }
.ew-hinweis a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--linie-stark); }
.ew-gruppen { margin-top: 16px; border-top: 1px solid var(--linie); }
.ew-gruppen[hidden] { display: none; }
.ew-gruppe {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 20px;
  width: 100%; min-height: 60px; padding: 10px 0; text-align: left; cursor: pointer;
  font-family: var(--sans); color: var(--text); background: none; border: 0; border-bottom: 1px solid var(--linie);
}
.ew-name { display: block; font-size: 16px; font-weight: 600; color: var(--tinte); }
.ew-was { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--meta); }
.ew-zustand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--meta); white-space: nowrap; }
.ew-gruppe[aria-checked='false'] .schalter { background: transparent; border-color: var(--linie); }
.ew-gruppe[aria-checked='false'] .schalter::after { transform: none; background: var(--meta); }
.ew-gruppe[aria-disabled='true'] { cursor: default; }
.ew-gruppe[aria-disabled='true'] .schalter { opacity: .55; }
.ew-wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.ew-wahl .knopf { min-height: 44px; padding: 0 12px; font-size: 15px; white-space: nowrap; }
.ew-wahl .ew-speichern { grid-column: 1 / -1; }
.ew-wahl .ew-speichern[hidden] { display: none; }
.ew-mehr {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 15px; color: var(--text); background: none; border: 0;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--linie-stark);
  transition: color 160ms ease;
}
.ew-mehr::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 180ms var(--kurve); }
.ew-mehr[aria-expanded='true']::after { transform: translateY(2px) rotate(-135deg); }
.ew-oeffnen { padding: 0; cursor: pointer; font: inherit; color: var(--text); background: none; border: 0; text-align: left; }
@media (hover: hover) and (pointer: fine) {
  .ew-mehr:hover, .ew-hinweis a:hover, .ew-oeffnen:hover { color: var(--tinte); }
  .ew-gruppe:not([aria-disabled='true']):hover .ew-name { color: var(--gruenspan-hell); }
}
html.ew-offen .chat-hinweis { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 760px) {
  .ew { padding: 20px 16px 16px; }
  .ew:not(:modal) { inset: auto 12px calc(var(--ew-unten) + 12px) 12px; width: auto; }
  .ew.auf .ew-text { display: none; }
  html.ew-offen .chat { opacity: 0; visibility: hidden; }
}
@media (max-width: 359px) {
  .ew-wahl { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ew[open] { animation: ew-schleier 160ms ease-out; }
  .ew-mehr::after { transition: none; }
}
.ew-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ew-sprache { flex: 0 0 auto; margin-top: -2px; }
.ew-sprache a { min-height: 28px; padding: 0 8px; }
.ew-weiter { margin: 10px 0 0; padding: 9px 12px; font-size: 14px; line-height: 1.4; color: var(--text); border: 1px solid var(--linie-stark); border-left: 3px solid var(--gruenspan); border-radius: 12px; background: rgba(108, 195, 204, .1); }
.ew-weiter a { font-weight: 700; color: var(--gruenspan-hell); }
