/* The criteria bar of a report, and the sheet that edits it (#747).

   Its own part because the two reports are the only screens that state their
   narrowing in words: every other one leaves it in the boxes it was typed into.
   The lines wrap rather than scroll — a narrowing a reader has to scroll to
   finish is a narrowing they stop reading. */

.bk-panel {
  display: grid;
  gap: 0.75rem;
}

/* The way into the narrowing, at the right edge of the bar's own row and against
   the commands rather than among them: `Auswahl` holds the left, `margin-left: auto`
   takes the slack, and the button lands beside `Einklappen` and `Aktionen` without
   becoming one of them. It is the exception argued for in
   `99d-bericht-kriterien.js`, and it stays visible with the lines folded away —
   a collapsed bar that hid the way to change it would hide the only control on it. */
.bk-anpassen {
  margin-left: auto;
}

.bk-kopf__rechts {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.bk-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
}

/* One criterion is one phrase and never broken across two lines: `Rückstand: ist
   nicht 0,00 €` split after the operator reads as two narrowings. */
.bk-zeile {
  font-size: 0.86rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.bk-form {
  display: grid;
  gap: 0.9rem;
}

/* Field, operator, value and the way out, on one row down to a phone. The value
   column takes the slack because it holds the longest control — a building's
   name — and the row's own label is the field. */
.bk-form__zeile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 0.75rem;
  align-items: end;
}

@media (width <= 40rem) {
  .bk-form__zeile {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Where the Remove would have been. The sentence is why this filter stays, and
   it sits in the row rather than under the form so it is read at the moment the
   removal is looked for. */
.bk-form__fest,
.bk-form__leer {
  align-self: center;
  margin: 0;
  max-width: 18rem;
}

.bk-form__adder {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

/* The way back into the narrowing sits opposite the search, on the table's own
   bar, by the owner's decision on 2026-10-01. The search is told to stop growing
   so the two share the row instead of the button being pushed to the edge of a
   field that has taken all of it: `.search` is `flex: 1 1 14rem` everywhere else,
   where it is the only thing on its side. */
[id^="bericht-"] .dtable__bar .search {
  flex: 0 1 22rem;
}
