/* bo-rueckblick.css — [NEUE-VERSION] (Fenster BR1, Auftrag 292): Knöpfe, Maske und Blatt «Rückblick und Rückmeldung zur Schnupperstelle».
   Nur neue Klassen .rb-… Das Blatt ist schwarz auf weiss, ohne Flächen, und bricht nie ab: Langer Text läuft auf eine weitere Seite,
   die Rückmeldung des Betriebs steht immer auf einer eigenen. */

/* --- Am Bildschirm: Zelle rechts in der Schnupperzeile --- */
.bo-rb-reihe { display: none; }
.bo-rb-unten { background: #fbfcfd; }
.bo-tabelle--rb .bo-tag { white-space: normal; }
@media screen and (min-width: 1001px) {
  .bo-tabelle--rb th:nth-child(1) { width: 9%; }
  .bo-tabelle--rb th:nth-child(2) { width: 10%; }
  .bo-tabelle--rb th:nth-child(3) { width: 16%; }
  .bo-tabelle--rb th:nth-child(4) { width: 14%; }
  .bo-tabelle--rb th:nth-child(5) { width: 13%; }
  .bo-tabelle--rb th:nth-child(6) { width: 38%; }
}
/* iPad: Spalten wie ohne Rückblick, die Knöpfe stehen in einer eigenen Zeile unter der Stelle. Sonst bricht «Produktionsmechaniker» mitten im Wort. */
@media screen and (max-width: 1000px) {
  .bo-tabelle--rb thead th:nth-child(6), .bo-tabelle--rb .bo-rb-zelle { display: none; }
  .bo-tabelle--rb .bo-rb-reihe { display: table-row; }
  .bo-tabelle--rb .bo-tag { white-space: nowrap; }
  .bo-tabelle--rb th:nth-child(1) { width: 12%; }
  .bo-tabelle--rb th:nth-child(2) { width: 15%; }
}
.bo-rb-zelle { background: #fbfcfd; }
.bo-rb-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.35rem; margin-bottom: 0.3rem; }
.rb-chip { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; border: 1px solid #9aa7b4; font-size: 0.8rem; line-height: 1.5; background: #fff; color: #1f2d3a; }
.rb-chip--begonnen { border-color: #b98a2f; background: #fdf6ec; }
.rb-chip--gespeichert { border-color: #2f7d4f; background: #edf7f0; }
.rb-chip--hochgeladen { border-color: #1f4e8c; background: #e9f0fa; font-weight: 600; }
.rb-knoepfe { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.rb-knopf { min-height: 44px; padding: 0.15rem 0.5rem; border: 1px solid #9aa7b4; border-radius: 6px; background: #fff; color: #1f2d3a; font: inherit; font-size: 0.84rem; line-height: 1.15; cursor: pointer; text-align: left; }
.rb-knopf:hover, .rb-knopf:focus-visible { border-color: #1f4e8c; background: #eef2f6; }
.rb-knopf--haupt { border-color: #1f4e8c; background: #1f4e8c; color: #fff; }
.rb-knopf--haupt:hover, .rb-knopf--haupt:focus-visible { background: #173c6c; }
.rb-knopf[disabled] { opacity: 0.55; cursor: default; }
.rb-info { font-size: 0.82rem; }
.rb-info > summary { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; list-style: none; color: #1f4e8c; }
.rb-info > summary::-webkit-details-marker { display: none; }
.rb-info__text { margin: 0.1rem 0 0.3rem; padding: 0.3rem 0.5rem; background: #f4f6f9; border-radius: 4px; color: #2b3844; }
.rb-meldung { margin: 0.25rem 0 0; font-size: 0.84rem; color: #a3261b; overflow-wrap: anywhere; }
.rb-meldung--gut { color: #1f6b3e; }
.bo-rb-karte { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px dashed #c9d2dc; }

/* --- Maske --- */
.rb-maske { width: min(760px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); padding: 0; border: 1px solid #9aa7b4; border-radius: 8px; background: #fff; color: #1f2d3a; overflow: hidden; }
.rb-maske::backdrop { background: rgba(20, 30, 40, 0.45); }
.rb-maske__rahmen { display: flex; flex-direction: column; max-height: calc(100dvh - 18px); }
.rb-maske__kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid #d5dce3; }
.rb-maske__kopf h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.rb-maske__unter { margin: 0.1rem 0 0; font-size: 0.86rem; color: #4d5a67; overflow-wrap: anywhere; }
.rb-maske__inhalt { flex: 1 1 auto; overflow-y: auto; padding: 0.7rem 0.9rem; -webkit-overflow-scrolling: touch; }
.rb-maske__fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; border-top: 1px solid #d5dce3; }
.rb-maske__stand { flex: 1 1 12rem; font-size: 0.84rem; color: #4d5a67; min-width: 0; }
.rb-feld { display: block; margin: 0 0 0.75rem; }
.rb-feld__titel { display: block; margin-bottom: 0.15rem; font-weight: 600; font-size: 0.93rem; }
.rb-feld input[type="text"], .rb-feld input[type="date"], .rb-feld textarea { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0.4rem 0.5rem; border: 1px solid #9aa7b4; border-radius: 6px; font: inherit; font-size: 16px; color: inherit; background: #fff; }
.rb-feld textarea { min-height: 4.6rem; resize: vertical; line-height: 1.35; }
.rb-zaehler { display: block; margin-top: 0.1rem; font-size: 0.78rem; color: #5a6875; text-align: right; }
.rb-zaehler--voll { color: #a3261b; font-weight: 600; }
.rb-raster-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
.rb-gruppe { margin: 0 0 0.9rem; padding: 0; border: 0; min-width: 0; }
.rb-gruppe > legend { padding: 0; margin-bottom: 0.25rem; font-weight: 700; font-size: 0.98rem; }
.rb-tag { margin: 0 0 0.6rem; padding: 0.5rem; border: 1px solid #d5dce3; border-radius: 6px; }
.rb-tag[hidden], .rb-knopf[hidden] { display: none; }
.rb-tag__titel { margin: 0 0 0.3rem; font-weight: 600; font-size: 0.88rem; }
.rb-tag__oben { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.6rem; }
.rb-wahlen { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; }
.rb-wahlen label { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.6rem; border: 1px solid #c9d2dc; border-radius: 6px; font-size: 0.92rem; cursor: pointer; }
.rb-wahlen input { width: 20px; height: 20px; margin: 0; }
.rb-mass { font-size: 0.82rem; color: #4d5a67; margin: 0 0 0.3rem; }
.rb-fassungen { margin: 0; padding: 0; list-style: none; }
.rb-fassungen li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.3rem 0; border-bottom: 1px solid #e3e8ed; overflow-wrap: anywhere; }
.rb-vorschau-bild { display: block; max-width: 100%; height: auto; margin: 0.4rem auto; border: 1px solid #c9d2dc; }
.rb-vorschau-pdf { display: block; width: 100%; height: min(70dvh, 760px); border: 1px solid #c9d2dc; }

@media screen and (max-width: 600px) {
  .rb-raster-2, .rb-tag__oben { grid-template-columns: 1fr; }
  .rb-maske__fuss .rb-knopf { flex: 1 1 auto; text-align: center; }
}

/* --- Das Blatt. Muss allein stehen können: bau_rueckblick.py druckt es ohne die Hausregeln. --- */
.rb-seite { color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 1.28; }
.rb-seite h1 { margin: 0; font-size: 15.5pt; line-height: 1.15; font-weight: 700; }
.rb-seite h2 { margin: 2.6mm 0 0.8mm; font-size: 10.5pt; font-weight: 700; line-height: 1.2; break-after: avoid; page-break-after: avoid; }
.rb-titelzeile { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
.rb-logo { height: 9mm; width: auto; display: block; flex: none; }
.rb-schule { font-size: 9.5pt; font-weight: 700; white-space: nowrap; }
.rb-unter { margin: 1mm 0 2mm; font-size: 9.5pt; }
.rb-kopf { display: grid; grid-template-columns: 1fr 1fr; column-gap: 5mm; row-gap: 0.4mm; }
.rb-kopf-zelle { display: flex; align-items: flex-end; gap: 1.6mm; min-height: 6.4mm; border-bottom: 0.25mm solid #000; min-width: 0; }
.rb-kopf-zelle--ganz { grid-column: 1 / -1; }
.rb-bez { font-size: 8.5pt; white-space: nowrap; padding-bottom: 0.3mm; }
.rb-wert { font-weight: 600; overflow-wrap: anywhere; padding-bottom: 0.3mm; }
.rb-teil { margin: 0; break-inside: auto; }
.rb-zwei { display: grid; grid-template-columns: 1fr 1fr; column-gap: 5mm; }
.rb-zwei > .rb-teil { min-width: 0; }
.rb-linie { height: 6.2mm; border-bottom: 0.2mm solid #000; }
.rb-seite-betrieb .rb-linie { height: 5.4mm; }
.rb-seite-betrieb h2 { margin-top: 2.2mm; }
.rb-seite-betrieb .rb-wert { font-size: 9pt; }
.rb-text { min-height: 6mm; padding: 0.4mm 0 0.8mm; border-bottom: 0.2mm solid #000; overflow-wrap: anywhere; }
.rb-unterbez { margin-top: 0.8mm; font-size: 9pt; }
table.rb-tage { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9pt; line-height: 1.22; }
table.rb-tage th { text-align: left; font-weight: 700; padding: 0.4mm 1mm; border: 0.25mm solid #000; background: none; color: #000; }
table.rb-tage td { padding: 0.5mm 1mm; border: 0.2mm solid #000; vertical-align: top; overflow-wrap: anywhere; }
table.rb-tage tr { break-inside: avoid; page-break-inside: avoid; }
table.rb-tage .rb-sp-datum { width: 19mm; }
table.rb-tage .rb-sp-zeit { width: 21mm; }
table.rb-tage--leer td { height: 9.6mm; }
.rb-k { display: inline-block; box-sizing: border-box; width: 3.8mm; height: 3.8mm; border: 0.3mm solid #000; vertical-align: -0.6mm; text-align: center; font-size: 8.5pt; line-height: 3.2mm; font-weight: 700; }
.rb-wahl { white-space: nowrap; }
.rb-skala, .rb-schritte { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8mm 4.5mm; }
.rb-skala-ende { font-size: 9pt; }
.rb-unterschriften { display: grid; column-gap: 6mm; margin-top: 3mm; break-inside: avoid; page-break-inside: avoid; }
.rb-unterschriften--kind { grid-template-columns: 1fr 2fr; }
.rb-unterschriften--betrieb { grid-template-columns: 1fr 1fr; row-gap: 1mm; }
.rb-feld-linie { min-height: 9mm; border-bottom: 0.25mm solid #000; font-size: 8.5pt; }
.rb-feld-kasten { grid-column: 1 / -1; min-height: 18mm; margin-top: 1.5mm; padding: 0.8mm 1.2mm; border: 0.3mm solid #000; font-size: 8.5pt; }
table.rb-raster { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9.5pt; line-height: 1.18; }
table.rb-raster th { padding: 0 0.5mm 0.8mm; border: 0; border-bottom: 0.4mm solid #000; font-size: 9pt; font-weight: 700; text-align: center; vertical-align: bottom; background: none; color: #000; }
table.rb-raster th:first-child { width: 94mm; text-align: left; font-weight: 400; }
table.rb-raster td { padding: 0.9mm 0.5mm; border: 0; border-bottom: 0.2mm solid #000; vertical-align: middle; }
table.rb-raster .rb-sp-wahl { text-align: center; }
.rb-was { display: block; font-size: 8.5pt; }
.rb-empfehlung { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8mm 5mm; }
.rb-klein { margin: 1.6mm 0 0; font-size: 8.5pt; }
.rb-fuss { display: flex; justify-content: space-between; gap: 4mm; margin-top: 2.4mm; padding-top: 0.8mm; border-top: 0.2mm solid #000; font-size: 8pt; break-inside: avoid; page-break-inside: avoid; }

/* Die App-Druckregel in beurteilen-druck.css macht aus jeder .bd-seite ein neues Blatt; Teil 1 darf auf eine weitere Seite laufen. */
@media print {
  .rb-seite { width: auto; }
  .rb-text, .rb-kopf-zelle { color: #000; }
}
