/* ==========================================================================
   Druckregeln – A4 Hochformat.
   Gedruckt wird ausschließlich der Berichtsbereich, unabhängig davon, welcher
   Bereich am Bildschirm geöffnet ist. Der Bericht wird vor jedem Druck neu aus
   dem aktuellen Datenbestand erzeugt (view-bericht.js, beforeprint).
   ========================================================================== */

@page {
  size: A4 portrait;
  margin: 14mm 13mm 16mm;
}

html, body {
  background: #fff !important;
  color: #000 !important;
  font-size: 9.5pt;
  line-height: 1.32;
}

/* Bedienelemente erscheinen grundsätzlich nicht im Ausdruck. */
.kopf,
.nav,
.no-print,
.filter,
.chips,
.ansicht-kopf,
.karte,
.karten-hinweis,
.toast,
.trefferzeile,
.protokoll-form,
.raster-form,
.ort-aktionen,
.zelle-aktionen,
.zeilen-select,
.protokoll-aktionen,
button,
input,
select,
textarea,
dialog {
  display: none !important;
}

/* Nur der Bericht wird gedruckt – auch wenn ein anderer Bereich aktiv ist. */
.ansicht { display: none !important; }
#ansicht-bericht,
#ansicht-bericht[hidden] { display: block !important; }

.rahmen { display: block; }
main { padding: 0 !important; }

.bericht-buehne { display: block; }

.bericht {
  width: auto;
  max-width: none;
  padding: 0;
  border: 0;
  background: #fff;
  color: #000;
  font-size: 9.5pt;
}

/* Kopfzeile des Berichts auf jeder Seite sinnvoll trennen. */
.bericht-kopf {
  border-bottom: 1.5pt solid #000;
  padding-bottom: 4pt;
  margin-bottom: 8pt;
  break-after: avoid;
}
.bericht-kopf h2 { font-size: 14pt; }
.bericht-kopf-zeile, .bericht-meta, .bericht-untertitel { color: #333 !important; }

.bericht-abschnitt {
  margin-bottom: 8pt;
  break-inside: auto;
}
.bericht-abschnitt h3 {
  font-size: 10.5pt;
  border-bottom: .75pt solid #000;
  break-after: avoid;
}
.bericht-teilblock { break-inside: avoid; }
.bericht-teilblock h4 { break-after: avoid; }
.bericht-hinweis { color: #333 !important; }

/* Tabellen: Kopfzeile auf Folgeseiten wiederholen, Zeilen nicht zerreißen. */
.bericht-tab {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
  break-inside: auto;
}
.bericht-tab thead { display: table-header-group; }
.bericht-tab tfoot { display: table-footer-group; }
.bericht-tab tr { break-inside: avoid; break-after: auto; }
.bericht-tab th, .bericht-tab td {
  border: .5pt solid #666;
  padding: 2pt 3pt;
  color: #000 !important;
  background: #fff !important;
}
.bericht-tab thead th {
  background: #e8e8e8 !important;
  font-size: 8pt;
}

.bericht-daten { font-size: 9pt; break-inside: avoid; }
.bericht-daten dt { font-weight: 700; }

.bericht-meldung {
  border-left: 2pt solid #000;
  background: #f0f0f0 !important;
  padding: 3pt 5pt;
  break-inside: avoid;
}

.bericht-leer { font-style: italic; color: #333 !important; }

.bericht-fuss {
  margin-top: 10pt;
  padding-top: 4pt;
  border-top: .75pt solid #000;
  font-size: 8pt;
  color: #000 !important;
  break-inside: avoid;
}
.bericht-unterschrift { display: flex; gap: 20mm; margin-top: 12pt; }

/* Tabellenüberschriften der Bildschirmtabellen im Druck sichtbar machen,
   falls einzelne Tabellen (z. B. über die Druckvorschau) mitgedruckt werden. */
.nur-druck { display: table-caption; font-weight: 700; font-size: 10pt; padding-bottom: 2pt; }

a { color: #000 !important; text-decoration: none; }
