/* DMN Decision-Table: matching Regel-Zeilen optisch hervorheben.
   Wird per JS auf <tr>-Elemente in der dmn-js-Tabelle angewendet, sobald
   ein Eval-Result mit matchedRules vorliegt. !important nötig, weil
   dmn-js-decision-table eigene Hintergründe pro tr setzt (vor allem die
   Sticky-erste-Spalte mit White-BG). */
.qs-dmn-matched-row,
.qs-dmn-matched-row td,
.qs-dmn-matched-row th {
    background-color: #fef3c7 !important;
}
/* Akzent-Bar nur einmal pro Zeile am linken Rand (statt pro Zelle) — sonst
   sieht's aus wie eine zerhackte Vertikale durch die Zell-Trenner. */
.qs-dmn-matched-row > td:first-child,
.qs-dmn-matched-row > th:first-child {
    box-shadow: inset 5px 0 0 #f59e0b !important;
}
.qs-dmn-matched-row:hover,
.qs-dmn-matched-row:hover td {
    background-color: #fde68a !important;
}

/* === DMN Decision-Table: Text-Farbe sicherstellen ===
   Admin und ggf. andere dunkle UIs vererben white als Text-Farbe in die
   DMN-Zellen, was die erste Spalte (Regel-Index 1, 2, 3 …) weiß-auf-weiß
   unsichtbar macht. Vendor setzt color nur auf .input-cell/.output-cell —
   nicht auf die sticky erste Zelle. Daher hier global dunkel forcieren. */
.dmn-decision-table-container,
.dmn-decision-table-container td,
.dmn-decision-table-container th {
    color: #1f2937;  /* slate-800 */
}

/* === DMN Decision-Table: verfügbaren Platz besser ausnutzen ===
   Vendor setzt .tjs-container/.tjs-table auf width:min-content und
   thead th auf 192px — Tabelle bleibt schmal, links/rechts entsteht
   leerer Bereich im Container. Wir überschreiben das so, dass die
   Tabelle die volle Container-Breite nutzt; Spalten dehnen sich
   proportional, behalten aber eine Mindestbreite zur Lesbarkeit.
   Vertikal: Tabelle vertikal mittig im Canvas, damit nicht oben
   gequetscht wird wenn nur wenige Regeln existieren. */
.dmn-decision-table-container .tjs-container {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center;  /* tjs-container ist flex-column */
}
.dmn-decision-table-container .tjs-table {
    width: 100% !important;
    max-width: 100% !important;
}
/* Spaltenbreite: vendor setzt 192px; wir lassen die Spalten wachsen,
   halten aber eine Mindestbreite, damit sie auf schmalen Screens
   noch lesbar bleiben. */
.dmn-decision-table-container thead th {
    width: auto !important;
    min-width: 160px;
}
.dmn-decision-table-container thead th.create-inputs,
.dmn-decision-table-container thead th.input-editor,
.dmn-decision-table-container thead th.output-editor {
    min-width: 0;
    width: auto !important;
}
/* Bei sehr breiten Screens (>1600px) etwas mehr vertikale Luft in
   den Zellen, damit die Tabelle sich nicht nur in die Breite zieht
   sondern auch optisch füllt. */
@media (min-width: 1600px) {
    .dmn-decision-table-container tbody td {
        padding-top: 14px;
        padding-bottom: 14px;
    }
    .dmn-decision-table-container thead th {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}
