/* Nachrichtenfluss-Übersicht (Bahnstrom MaBiS) — portiert aus rag-mako-parser.
   Badges, Sortier-Header und Zeilen-Markierungen für #nfTable. */

/* ── Legende ── */
.nf-legende {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.nf-legende .nf-legende-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.nf-legende .nf-legende-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* ── PlantUML-Diagramm ── */
.nf-diagram {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    overflow: auto;
}
.nf-diagram .plantuml-diagram { text-align: center; }
.nf-diagram .plantuml-diagram svg { max-width: 100%; height: auto; }
.nf-diagram .plantuml-source {
    margin-top: 1rem;
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
}
.nf-diagram .plantuml-source summary {
    cursor: pointer;
    color: #6c757d;
    font-size: 0.85rem;
}
.nf-diagram .plantuml-source pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    overflow: auto;
}

/* ── Akteurs-Badges (Von/Nach) ── */
.akteur-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}
.akteur-badge.akteur-nb,
.akteur-badge.akteur-vnb { background: #bbdefb; color: #1565c0; }
.akteur-badge.akteur-biko { background: #b3e5fc; color: #0277bd; }
.akteur-badge.akteur-bkv  { background: #ffe0b2; color: #e65100; }
.akteur-badge.akteur-lf   { background: #fff3e0; color: #ef6c00; }

/* ── Kategorie-Badges ── */
.kategorie-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}
.kategorie-badge.kategorie-stammdaten     { background: #e6f7ff; color: #1890ff; }
.kategorie-badge.kategorie-zeitreihe      { background: #f6ffed; color: #52c41a; }
.kategorie-badge.kategorie-clearing       { background: #fffbe6; color: #faad14; }
.kategorie-badge.kategorie-pruefmitteilung{ background: #fff2e8; color: #ff7a45; }

/* ── Zeilen-Markierung nach Kategorie ── */
#nfTable tr.nf-kat-stammdaten td:first-child      { border-left: 3px solid #4a9eff; }
#nfTable tr.nf-kat-zeitreihe td:first-child       { border-left: 3px solid #52c41a; }
#nfTable tr.nf-kat-clearing td:first-child        { border-left: 3px solid #faad14; }
#nfTable tr.nf-kat-pruefmitteilung td:first-child { border-left: 3px solid #ff7a45; }

/* ── Format-Badges ── */
.format-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: monospace;
    background: #f0f0f0;
    color: #333;
}
.format-badge.format-utilmd { background: #e3f2fd; color: #1565c0; }
.format-badge.format-mscons { background: #e8f5e9; color: #2e7d32; }
.format-badge.format-iftsta { background: #fff3e0; color: #e65100; }
.format-badge.format-orders { background: #fce4ec; color: #c2185b; }
.format-badge.format-pricat { background: #f3e5f5; color: #7b1fa2; }

/* ── Frist-Badges ── */
.frist-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    background: #e8f5e9;
    color: #2e7d32;
}
.frist-badge.frist-bka  { background: #e3f2fd; color: #1565c0; }
.frist-badge.frist-kbka { background: #fce4ec; color: #c2185b; }

/* ── Use-Case-Badge ── */
.usecase-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    background: #e8eaf6;
    color: #3949ab;
    font-family: monospace;
    font-weight: 600;
}
.usecase-text { font-size: 0.8rem; color: #666; }

/* ── Sortier-Header ── */
#nfTable .nf-sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}
#nfTable .nf-sortable:hover { background-color: #e3f2fd; }
#nfTable .nf-sortable.sort-active { background-color: #bbdefb; }
#nfTable .sort-icon {
    margin-left: 4px;
    font-size: 0.75rem;
    color: #90a4ae;
    transition: color 0.2s;
}
#nfTable .nf-sortable:hover .sort-icon,
#nfTable .nf-sortable.sort-active .sort-icon { color: #1976d2; }

#nfTable code { background: #e3f2fd; padding: 0.1rem 0.3rem; border-radius: 3px; }
