/* Mitglied-Auswahl (24.11.2026): Suchfeld + «Liste» + gewählte Person,
   Optik wie die Käufer:in-Suche in Kasse Mobile (js/mitglied-auswahl.js). */
/* Eine Zeile wie Kasse Desktop (24.11.2026): Suchfeld | Liste | gewählte
   Person nebeneinander, sobald die Breite reicht; in schmalen Feldern
   (z.B. Formularspalten, Handy) bricht die gewählte Person automatisch
   in eine zweite Zeile um. */
.ma { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 6px 8px; width: 100%; min-width: 0; font-weight: 400; }
.ma-zeile { position: relative; display: flex; gap: 6px; align-items: stretch; flex: 1 1 230px; min-width: 0; }
.ma .ma-suche {
  flex: 1; min-width: 0; margin: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--grey-line);
  border-radius: 10px;
  background: var(--white);
  font: inherit; font-size: 0.9rem;
  color: var(--anthracite);
}
.ma .ma-suche:focus { outline: none; border-color: var(--red); }
.ma .ma-liste-btn { flex: none; }
.ma .ma-liste-btn.active { background: var(--anthracite); border-color: var(--anthracite); color: var(--white); }
/* Trefferliste und «Liste» liegen ÜBER dem Formular (nicht im Fluss),
   damit sich die übrigen Felder beim Aufklappen nicht verschieben. */
.ma-treffer, .ma-liste {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  max-height: 260px; overflow-y: auto;
  border: 1.5px solid var(--grey-line); border-radius: 10px;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.ma-treffer[hidden], .ma-liste[hidden] { display: none; }
.ma-treffer button, .ma-liste button {
  display: block; width: 100%;
  padding: 8px 12px;
  border: 0; border-bottom: 1px solid var(--grey-line);
  background: transparent;
  text-align: left; font: inherit; font-size: 0.88rem; color: var(--anthracite);
  cursor: pointer;
}
.ma-treffer button:last-child, .ma-liste button:last-child { border-bottom: 0; }
.ma-treffer button:hover, .ma-liste button:hover, .ma-treffer button:focus-visible, .ma-liste button:focus-visible { background: var(--off-white); outline: none; }
.ma-liste button.active { background: var(--off-white); font-weight: 700; }
.ma-liste .ma-leer { color: #5b5b5b; font-style: italic; }
.ma-keine { padding: 8px 12px; font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.ma-gewaehlt { flex: 1 1 170px; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; box-sizing: border-box; padding: 6px 10px; border-radius: 10px; font-size: 0.9rem; }
.ma-gewaehlt-person { border: 1.5px solid #2f8f4e; background: #eef8f1; font-weight: 700; color: var(--anthracite); }
.ma-gewaehlt-person .ma-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-gewaehlt-leer { border: 1.5px dashed var(--grey-line); color: var(--text-muted); font-style: italic; }
.ma-weg { flex: none; border: 0; background: transparent; font-size: 1.3rem; line-height: 1; cursor: pointer; color: #555; padding: 0 4px; }

/* Das ersetzte <select> bleibt als Datenhalter – immer unsichtbar, auch wenn
   Seiten-CSS es sonst als Block/Flex anzeigen würde. */
select[data-mitglied-auswahl] { display: none !important; }
/* Variante «nach oben» (z.B. Kaufleiste, am Handy unten fixiert) */
.ma-oben .ma-treffer, .ma-oben .ma-liste { top: auto; bottom: calc(100% + 4px); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.1); }

/* Mitglied-Suche als Filter über einer Liste (Stammdaten -> Mitglieder,
   Bestellungen, Ticket-Buchungen, Ticketausgang): zentriert, unter den
   Filter-Pillen. Markup: <div class="ma-filterzeile"><div class="ma-filterbox"><select ...> */
.ma-filterzeile { display: flex; justify-content: center; margin: -4px 0 14px; }
.ma-filterbox { width: 100%; max-width: 780px; }
.ma-filterzeile-links { justify-content: flex-start; } /* wo die Filter-Pillen links stehen (Mail-/Loginprotokoll) */
