/* Runde 2e (FILTER): Vermittler- und Branchenfilter im Vermittler-Bereich, Pop-ups „Vermittler wählen“ und „Beruf wählen“,
   „Liefert“ in der Vermittler-Liste, Wählvorsatz je Abteilung (Einstellungen) und „Ausgehend als“ im Profil. Nur Klassen mit .vf- */

/* ---------- Chip-Zeilen ---------- */
.vf-filter { display: grid; gap: 6px; margin: 0 0 12px; min-width: 0; }
.vf-filter:empty { display: none; }
.vf-filterzeile { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; }
.vf-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
.vf-chips { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 3px 2px; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.vf-chips::-webkit-scrollbar { height: 6px; }
.vf-chips::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 3px; }
.vf-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; box-sizing: border-box; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--flaeche-2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1;
  white-space: nowrap; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.vf-chip:hover { background: var(--hover); border-color: var(--line-3); }
.vf-chip > .flogo, .vf-chip > .avatar { width: 22px; height: 22px; border-radius: 6px; font-size: 8.5px; margin-left: -5px; box-shadow: none !important; flex: none; }
.vf-chip > img.flogo { padding: 1px; }
.vf-chip > svg.i { width: 14px; height: 14px; flex: none; }
.vf-chip > span { overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.vf-chip > b { min-width: 20px; height: 18px; padding: 0 6px; box-sizing: border-box; border-radius: 9px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; background: var(--flaeche-3); color: var(--text); }
.vf-chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--app); }
.vf-chip[aria-pressed="true"] > b { background: color-mix(in srgb, var(--app) 16%, transparent); color: var(--app); }
.vf-chip.leer:not([aria-pressed="true"]) { color: var(--muted-2); }
.vf-chip.leer:not([aria-pressed="true"]) > b { background: transparent; color: var(--muted-2); }
.vf-chip.leer[aria-pressed="true"] { opacity: .78; }
.vf-chip.leer > .flogo { opacity: .7; }
.vf-chip.gesperrt { border-style: dashed; }
.vf-alle { padding: 0 14px; }
.vf-beruf { border-color: var(--ak-ln); }
.vf-mehr { flex: none; white-space: nowrap; margin: 0; }
.vf-mehr svg.i { width: 14px; height: 14px; }

/* ---------- Pop-ups ---------- */
.modal-box.vf-pop { width: min(600px, 100%); display: flex; flex-direction: column; }
.vf-pop .vm-modal-kopf h2 { margin-bottom: 0; }
.vf-pop-suche { margin: 4px 0 10px; }
.vf-pop-suche input { width: 100%; }
.vf-pop-liste, .vf-kat { display: grid; gap: 2px; max-height: min(54vh, 480px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.vf-pop-zeile { color: var(--text); font-size: 13.5px; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; margin: 0; }
.vf-pop-zeile:hover, .vf-kat-lbl:hover, .vf-kat-beruf:hover { background: var(--hover); }
.vf-pop-zeile input, .vf-kat input { margin: 0; width: 17px; height: 17px; flex: none; }
.vf-pop-name { display: grid; gap: 2px; min-width: 0; }
.vf-pop-name b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-pop-name small { font-size: 12px; color: var(--muted); }
.vf-pop-name small.vf-gesperrt { color: var(--warn-tx); }
.vf-pop-zahl, .vf-kat-zahl { min-width: 22px; height: 20px; padding: 0 7px; box-sizing: border-box; border-radius: 10px; display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 700; background: var(--flaeche-3); color: var(--text); }
.vf-pop-zeile.leer .vf-pop-zahl, .vf-kat-zahl.leer { background: transparent; color: var(--muted-2); }
.vf-pop-akt { flex-wrap: wrap; align-items: center; }
.vf-pop-akt .spacer { flex: 1; }
.vf-kat-hilfe { margin: 0 0 8px; }
.vf-kat-br { border-radius: 9px; }
.vf-kat-kopf { display: flex; align-items: center; gap: 6px; }
.vf-kat-lbl { flex: 1; display: flex; flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 13.5px; padding: 8px 10px; border-radius: 9px; cursor: pointer; margin: 0; font-weight: 650; min-width: 0; }
.vf-kat-lbl > span, .vf-kat-beruf > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vf-kat-auf { flex: none; width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.vf-kat-auf svg.i { width: 15px; height: 15px; transition: transform .15s; }
.vf-kat-auf[aria-expanded="true"] svg.i { transform: rotate(90deg); }
.vf-kat-berufe { display: grid; gap: 1px; margin: 0 0 6px 26px; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.vf-kat-beruf { display: flex; flex-direction: row; align-items: center; gap: 10px; color: var(--text); padding: 6px 10px; border-radius: 8px; cursor: pointer; margin: 0; font-size: 13.5px; }

/* ---------- Posteingang: Hinweis bei Branchenfilter ---------- */
.vf-pe-hinweis { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.vf-pe-hinweis svg.i { width: 14px; height: 14px; flex: none; }

/* ---------- Vermittler-Liste: „Liefert“ ---------- */
.vf-liefert { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12px; min-width: 0; }
.vf-liefert-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-right: 2px; }
.vf-liefert-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--flaeche-2); color: var(--text); font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.vf-liefert-chip b { font-weight: 700; color: var(--muted); }
.vf-liefert-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-liefert-chip b { flex: none; }
.vf-liefert-chip.an { border-color: var(--text); background: var(--text); color: var(--app); }
.vf-liefert-chip.an b { color: var(--app); }
.vf-liefert-chip.mehr { color: var(--muted); cursor: help; }
.vf-liefert-link { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.vf-liefert-link:hover { color: var(--text); text-decoration: underline; }
.vf-liefert-link svg.i { width: 13px; height: 13px; }
.vf-liefert-t { gap: 4px; }
.vf-liefert-t .vf-liefert-link { margin-left: 0; flex-basis: 100%; }
/* Tabelle mit Spalte Branchen: feste Breiten, damit Ansprechperson und E-Mail lesbar bleiben (ab 1280 px ohne Scrollen) */
.ag-tabelle col.ag-c-agentur { width: 22%; }
.ag-tabelle col.vf-c-zahlen { width: 13%; }
.ag-tabelle col.vf-c-branchen { width: 17%; }
.ag-tabelle col.vf-c-status { width: 12%; }

/* ---------- Wählvorsatz je Abteilung (Einstellungen, Reiter Schnittstellen) ---------- */
.vf-waehlen-liste { display: grid; gap: 10px; margin: 4px 0 12px; }
.vf-waehlen-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); align-items: center; gap: 10px 20px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); }
.vf-waehlen-name > b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.vf-waehlen-name small b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.vf-waehlen-name small { color: var(--muted); font-size: 12.5px; }
.vf-waehlen-nr { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.vf-waehlen-nr b { color: var(--text); font-variant-numeric: tabular-nums; }
.vf-waehlen-nr a { color: var(--muted); }
.vf-waehlen-zeile label { margin: 0; }
.vf-waehlen-zeile input { font-variant-numeric: tabular-nums; }
.vf-waehlen-bsp { font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.vf-waehlen-warn { margin: 0 0 12px; }
.vf-waehlen-hilfe { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 10px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.vf-waehlen-hilfe b { color: var(--text); }
.vf-waehlen-fehler { color: var(--gefahr-tx, #e5484d); font-size: 13px; min-height: 1em; margin: 6px 0 0; }
.vf-ausgehend { margin: 6px 0 0; color: var(--muted); }
.vf-ausgehend b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Mobil ---------- */
@media (max-width: 700px) {
  .vf-filterzeile { grid-template-columns: minmax(0, 1fr) auto; row-gap: 3px; }
  .vf-lbl { grid-column: 1 / -1; }
  .vf-chip > span { max-width: 180px; }
  .vf-waehlen-zeile { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .modal:has(.vf-pop) { padding: 0; place-items: stretch; }
  .modal-box.vf-pop { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .vf-pop-liste, .vf-kat { max-height: none; flex: 1; min-height: 0; }
}
.vf-ausgehend svg.i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
/* Weicher Rand, wenn eine Chip-Zeile waagrecht weitergeht */
.vf-chips.vf-mehr-rechts { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.vf-chips.vf-mehr-links { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px); mask-image: linear-gradient(to right, transparent, #000 36px); }
.vf-chips.vf-mehr-links.vf-mehr-rechts { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
