bericht/css/bericht.css
Eduard Wisch 4102ebfe5b
All checks were successful
Deploy bericht / deploy (push) Successful in 13s
Editor-Ueberarbeitung 1.5.0: Anhaenge-Kacheln, echte Seitengeometrie, Arbeiten ohne Reload [deploy]
Anhaenge-Spalte: Kachelraster mit Server-Thumbnails statt Dateinamen-Liste (Bilder per GD,
PDFs per PDF.js), Grossansicht per Klick, Auswahlreihenfolge sichtbar, Sortierung/Filter
(Aufnahmezeit per eigenem EXIF-Parser, da im Prod-Container ohne exif-Modul), ziehbare
Spaltenbreite, Kachelgroesse, Drag & Drop auf Seitenliste/Arbeitsflaeche/Raster-Plaetze.

Arbeitstisch zeigt jetzt Kopf-, Inhalts- und Fussbereich passend zur echten Seitengeometrie
(bericht_page_geometry()) - Editor und PDF-Erzeugung rechnen mit denselben Werten, das PDF
setzt die Arbeitsflaeche 1:1 statt sie ein zweites Mal einzupassen.

Neu: Bild einer Seite austauschen (auch einzelne Raster-Plaetze), Seiten mehrfach markieren
und sammeln loeschen/duplizieren, Autosave mit Verlassen-Warnung, Tastenkuerzel, kein
location.reload() mehr nach Hinzufuegen/Loeschen/Hochladen (ajax/fragments.php).

Nebenbei behoben: dol_dir_list() ohne mode=1 (Dateigroesse leer), PDF.js-Worker-Pfad ohne
/custom-Praefix, PDFs liefen als Download statt inline, Groessen-Select blieb leer,
Mehrfach-Upload nahm nur die erste Datei, Race-Condition bei schnellem Seitenwechsel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 00:33:20 +02:00

1186 lines
38 KiB
CSS

/* Bericht-Modul Stylesheet
* Nutzt Dolibarr CSS-Variablen, damit Light- und Dark-Theme automatisch passen.
*/
.bericht-overview-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.bericht-editor { padding-top: 10px; }
/* ================= Kopfbereich des Editors =================
Werte aus dem AwlDark-Theme mit Light-Fallback (KB #512). */
.bericht-meta {
margin-bottom: 14px;
background: var(--colorbacklinepair1, #fff);
border: 1px solid var(--colorbacklinebreak, #e3e3e7);
border-radius: 6px;
overflow: hidden;
}
/* --- obere Zeile: Ref, Version, Status, Eckdaten --- */
.bericht-meta-head {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 10px 18px;
padding: 10px 14px;
background: var(--colorbacktitle1, #f5f5f5);
border-bottom: 1px solid var(--colorbacklinebreak, #e3e3e7);
}
.bericht-meta-ident {
display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
min-width: 0;
}
.bericht-meta-icon { font-size: 17px; line-height: 1; }
.bericht-meta-ref {
font-size: 16px;
font-weight: 600;
letter-spacing: 0.2px;
color: var(--colortexttitlenotab, #2a5d8f);
}
.bericht-meta-version {
font-size: 11px;
color: var(--colortexttitlenotab2, #777);
border: 1px solid var(--colorbacklinebreak, #ddd);
border-radius: 10px;
padding: 1px 7px;
}
.bericht-badge {
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.6px;
padding: 3px 9px;
border-radius: 10px;
white-space: nowrap;
}
.badge-draft { background: #8a6d3b; color: #fff; }
.badge-final { background: #2e8b57; color: #fff; }
.bericht-meta-versions { font-size: 11px; color: var(--colortexttitlenotab2, #777); }
.bericht-meta-versions a { color: var(--colortextlink, #1d99f3); }
.bericht-meta-facts {
display: flex; flex-wrap: wrap; align-items: center;
gap: 6px 22px;
font-size: 12px;
}
.bericht-fact { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.bericht-fact-label {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--colortexttitlenotab2, #888);
}
.bericht-fact strong { font-weight: 600; color: var(--colortext, #222); }
/* --- untere Zeile: bearbeitbare Felder --- */
.bericht-meta-fields {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 12px 18px;
padding: 12px 14px;
}
.bericht-field { display: flex; flex-direction: column; gap: 4px; min-width: 170px; }
.bericht-field.grow { flex: 1 1 260px; }
.bericht-field label {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--colortexttitlenotab2, #888);
}
.bericht-field-row { display: flex; gap: 6px; }
.bericht-editor .bericht-field input[type=text],
.bericht-editor .bericht-field select {
background: var(--inputbackgroundcolor, #fff);
color: var(--colortext, #222);
border: 1px solid var(--inputbordercolor, #ccc);
border-radius: 4px;
padding: 6px 9px;
font-size: 13px;
width: 100%;
box-sizing: border-box;
}
.bericht-editor .bericht-field input[type=text]:focus,
.bericht-editor .bericht-field select:focus {
outline: none;
border-color: var(--btncolorborderhover, #3daee9);
box-shadow: 0 0 0 2px rgba(61,174,233,0.25);
}
.bericht-field-hint {
font-size: 10px;
color: var(--colortexttitlenotab2, #888);
font-style: italic;
}
.bericht-layout {
display: grid;
/* Erste Spalte ist ziehbar (--att-width, per Splitter gesetzt).
minmax(0, 1fr) verhindert, dass die mittlere Spalte über die verfügbare
Breite hinaus wächst, wenn der Canvas-Inhalt zu breit wird */
--att-width: 260px;
grid-template-columns: var(--att-width) 6px minmax(0, 1fr) 220px;
gap: 12px;
align-items: start;
}
/* Eingeklappt: die Spalte verschwindet, die Arbeitsfläche bekommt den Platz */
.bericht-layout.att-collapsed { grid-template-columns: 26px 6px minmax(0, 1fr) 220px; }
.bericht-layout.att-collapsed .bericht-attachments > *:not(.bericht-att-header) { display: none; }
.bericht-layout.att-collapsed .bericht-att-header h4,
.bericht-layout.att-collapsed .bericht-att-viewswitch > *:not(#att-collapse-btn) { display: none; }
.bericht-layout.att-collapsed .bericht-attachments { padding: 6px 3px; overflow: hidden; }
.bericht-layout.att-collapsed .bericht-att-header { justify-content: center; }
.bericht-layout.att-collapsed #att-collapse-btn { margin-bottom: 0; }
/* ---------- Ziehbare Trennlinie ---------- */
.bericht-splitter {
align-self: stretch;
min-height: 120px;
cursor: col-resize;
border-radius: 3px;
background: var(--colorbacklinebreak, #ddd);
opacity: 0.35;
transition: opacity 0.15s ease;
}
.bericht-splitter:hover,
.bericht-splitter.dragging { opacity: 1; background: var(--btncolorborderhover, #3daee9); }
/* Während des Ziehens darf nichts markiert werden */
body.bericht-resizing { cursor: col-resize; user-select: none; }
#att-collapse-btn {
background: transparent;
border: 1px solid var(--colorboxbordertitle1, #555);
color: var(--colortext, inherit);
border-radius: 3px;
cursor: pointer;
font-size: 12px;
line-height: 1;
padding: 3px 6px;
opacity: 0.6;
}
#att-collapse-btn:hover { opacity: 1; background: var(--colorbacklinepairchecked, #337ab7); color: #fff; }
.bericht-attachments,
.bericht-pages {
background: var(--colorbacktitle1, #f7f7f9);
color: var(--colortext, inherit);
border: 1px solid var(--colorboxbordertitle1, #e3e3e7);
border-radius: 6px;
padding: 10px;
max-height: 80vh;
overflow-y: auto;
overflow-x: hidden;
box-sizing: border-box;
min-width: 0; /* verhindert grid-Überlauf */
}
.bericht-attachments *, .bericht-pages * { box-sizing: border-box; }
/* Nur die Haupt-Actions unten in der Anhänge-Spalte einheitlich breit */
.bericht-add-selected select,
.bericht-add-selected .butAction,
.bericht-upload .butAction,
.bericht-upload label.butAction {
display: block;
width: 100%;
box-sizing: border-box;
text-align: center;
padding: 8px 12px;
margin: 4px 0 0 0;
background: var(--colorbackbody, #2a2a30);
color: var(--colortext, #e0e0e0);
border: 1px solid var(--colorboxbordertitle1, #555);
border-radius: 4px;
cursor: pointer;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.bericht-add-selected .butAction:hover,
.bericht-upload .butAction:hover { background: var(--colorbackhmenu1, #337ab7); color: #fff; }
.bericht-attachments h4,
.bericht-pages h4 {
margin: 0 0 8px 0;
font-size: 13px;
text-transform: uppercase;
color: var(--colortextlink, #555);
}
/* ---------- Anhänge: Kopfzeile + Ansicht-Umschalter ---------- */
.bericht-att-header {
display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.bericht-att-header h4 { margin: 0 0 8px 0; }
.bericht-att-viewswitch { display: flex; gap: 2px; margin-bottom: 8px; }
.att-view-btn {
background: transparent;
border: 1px solid var(--colorboxbordertitle1, #555);
color: var(--colortext, inherit);
border-radius: 3px;
cursor: pointer;
font-size: 12px;
line-height: 1;
padding: 3px 6px;
opacity: 0.6;
}
.att-view-btn.active, .att-view-btn:hover { opacity: 1; background: var(--colorbacklinepairchecked, #337ab7); color: #fff; }
#att-size-btn {
background: transparent;
border: 1px solid var(--colorboxbordertitle1, #555);
color: var(--colortext, inherit);
border-radius: 3px;
cursor: pointer;
font-size: 12px;
line-height: 1;
padding: 3px 6px;
opacity: 0.6;
}
#att-size-btn:hover { opacity: 1; background: var(--colorbacklinepairchecked, #337ab7); color: #fff; }
/* ---------- Anhänge: Sortierung + Filter ---------- */
.bericht-att-tools {
display: flex;
gap: 5px;
margin-bottom: 8px;
}
.bericht-att-tools select {
flex: 1;
min-width: 0;
background: var(--inputbackgroundcolor, #fff);
color: var(--colortext, #222);
border: 1px solid var(--inputbordercolor, #ccc);
border-radius: 3px;
font-size: 11px;
padding: 3px 4px;
}
/* ---------- Anhänge: Gruppen ---------- */
.bericht-att-group { margin-bottom: 10px; }
.bericht-att-group-title {
display: flex; align-items: center; justify-content: space-between; gap: 6px;
font-weight: 600;
font-size: 11px;
opacity: 0.75;
padding: 4px 0;
margin-bottom: 6px;
border-bottom: 1px solid var(--colorboxbordertitle1, #ddd);
}
.att-group-ref { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-group-toggle {
flex: 0 0 auto;
background: transparent;
border: 1px solid var(--colorboxbordertitle1, #555);
color: var(--colortext, inherit);
border-radius: 3px;
cursor: pointer;
font-size: 10px;
padding: 1px 5px;
opacity: 0.7;
}
.att-group-toggle:hover { opacity: 1; background: var(--colorbackhmenu1, #337ab7); color: #fff; }
/* ---------- Anhänge: Kachelraster ---------- */
/* Kachelgröße: klein / mittel / groß (Schalter ⤢) */
#bericht-att-list { --tile-min: 96px; --tile-h: 84px; }
#bericht-att-list[data-tilesize="s"] { --tile-min: 68px; --tile-h: 58px; }
#bericht-att-list[data-tilesize="l"] { --tile-min: 130px; --tile-h: 118px; }
.att-view-grid .bericht-att-tiles {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(var(--tile-min, 96px), 1fr));
gap: 6px;
}
.att-view-grid .bericht-att-item {
position: relative;
border: 1px solid var(--colorboxbordertitle1, #444);
border-radius: 4px;
overflow: hidden;
background: var(--colorbackbody, #23232a);
color: var(--colortext, inherit);
cursor: default;
}
.att-view-grid .bericht-att-item:hover { border-color: var(--colorbackhmenu1, #337ab7); }
.att-view-grid .bericht-att-item.selected {
border-color: var(--colorbackhmenu1, #337ab7);
box-shadow: 0 0 0 2px var(--colorbackhmenu1, #337ab7) inset;
}
.att-view-grid .bericht-att-item.is-used { opacity: 0.55; }
.att-view-grid .bericht-att-item.is-used:hover { opacity: 1; }
.att-view-grid .att-thumb {
position: relative;
display: block;
width: 100%;
/* feste Kachelhöhe -> gleichmäßiges Raster, egal ob Hoch- oder Querformat */
height: var(--tile-h, 84px);
background: var(--colorbacktitle1, #1c1c22);
cursor: zoom-in;
overflow: hidden;
}
.att-view-grid .att-thumb-img,
.att-view-grid .att-thumb-canvas {
width: 100%;
height: 100%;
object-fit: cover; /* Kachel füllen, Ausschnitt zeigen */
display: block;
}
/* PDFs: oberen Seitenbereich formatfüllend — der Briefkopf macht das Dokument erkennbar */
.att-view-grid .att-thumb-canvas { object-fit: cover; object-position: top center; background: #fff; }
.att-view-grid .att-thumb-img[data-loaded="0"] { opacity: 0; }
.att-thumb-fallback {
display: flex; align-items: center; justify-content: center;
width: 100%; height: 100%; font-size: 24px; opacity: 0.5;
}
.att-type-badge {
position: absolute; right: 3px; bottom: 3px;
background: rgba(0,0,0,0.72); color: #fff;
font-size: 9px; font-weight: 600; letter-spacing: 0.4px;
padding: 1px 4px; border-radius: 2px;
pointer-events: none;
}
.att-used-badge {
position: absolute; right: 3px; top: 3px;
background: #2e8b57; color: #fff;
font-size: 10px; line-height: 14px;
width: 15px; height: 15px; text-align: center;
border-radius: 50%;
pointer-events: none;
}
/* Auswahl: echte Checkbox verstecken, Label ist das Klickziel auf der Kachel */
.att-view-grid .att-check { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.att-view-grid .att-check-ui {
position: absolute; left: 4px; top: 4px;
width: 18px; height: 18px;
border: 2px solid rgba(255,255,255,0.85);
border-radius: 3px;
background: rgba(0,0,0,0.45);
cursor: pointer;
z-index: 2;
display: flex; align-items: center; justify-content: center;
}
.att-view-grid .att-check-ui:hover { background: rgba(0,0,0,0.7); }
.att-view-grid .att-check:checked + .att-check-ui {
background: var(--colorbackhmenu1, #337ab7);
border-color: #fff;
}
.att-order {
color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
}
.att-view-grid .att-delete {
position: absolute; right: 2px; top: 2px;
background: rgba(0,0,0,0.55);
border: none; border-radius: 3px;
color: #fff;
cursor: pointer;
opacity: 0;
padding: 1px 3px;
font-size: 11px;
z-index: 2;
}
.att-view-grid .bericht-att-item:hover .att-delete { opacity: 0.8; }
.att-view-grid .att-delete:hover { opacity: 1; color: #ff6b6b; background: rgba(0,0,0,0.8); }
/* wenn schon verwendet, sitzt das ✓-Badge oben rechts — Löschen daneben */
.att-view-grid .bericht-att-item.is-used .att-delete { right: 21px; }
#bericht-att-list[data-tilesize="s"] .att-name { -webkit-line-clamp: 1; line-clamp: 1; }
#bericht-att-list[data-tilesize="s"] .att-size { display: none; }
.att-view-grid .att-meta {
padding: 3px 4px 4px 4px;
font-size: 10px;
line-height: 1.25;
cursor: pointer; /* Klick auf die Beschriftung wählt aus */
}
.att-view-grid .att-name {
display: -webkit-box;
-webkit-line-clamp: 2; /* zwei Zeilen, dann Ellipse */
-webkit-box-orient: vertical;
line-clamp: 2;
overflow: hidden;
word-break: break-all;
}
.att-view-grid .att-size { display: block; font-size: 9px; opacity: 0.55; }
/* ---------- Anhänge: kompakte Listenansicht (alter Look) ---------- */
.att-view-list .bericht-att-tiles { display: block; }
.att-view-list .bericht-att-item {
position: relative;
display: flex; align-items: center; gap: 6px;
padding: 3px 2px; font-size: 12px;
color: var(--colortext, inherit);
}
.att-view-list .bericht-att-item:hover { background: rgba(255,255,255,0.05); }
.att-view-list .bericht-att-item.selected { background: rgba(51,122,183,0.25); }
.att-view-list .bericht-att-item.is-used { opacity: 0.6; }
.att-view-list .att-thumb {
flex: 0 0 auto; width: 28px; height: 28px;
background: var(--colorbacktitle1, #1c1c22);
border-radius: 3px; overflow: hidden; cursor: zoom-in;
position: relative;
}
.att-view-list .att-thumb-img,
.att-view-list .att-thumb-canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-view-list .att-thumb-canvas { object-position: top center; background: #fff; }
.att-view-list .att-type-badge { font-size: 7px; right: 1px; bottom: 1px; padding: 0 2px; }
.att-view-list .att-used-badge { display: none; }
.att-view-list .att-thumb-fallback { font-size: 14px; }
.att-view-list .att-check { flex: 0 0 auto; position: static; opacity: 1; width: auto; height: auto; pointer-events: auto; }
.att-view-list .att-check-ui { display: none; }
.att-view-list .att-meta {
flex: 1; min-width: 0;
display: flex; align-items: baseline; gap: 6px;
cursor: pointer;
}
.att-view-list .att-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-view-list .att-size { font-size: 10px; opacity: 0.6; flex: 0 0 auto; }
.att-view-list .att-delete {
flex: 0 0 auto;
background: transparent; border: none; cursor: pointer;
opacity: 0.4; padding: 2px 4px; font-size: 13px;
}
.att-view-list .att-delete:hover { opacity: 1; color: #d9534f; }
/* ---------- Raster-Plätze auf der Arbeitsfläche ---------- */
.bericht-slot-overlay {
position: absolute;
/* Der Fabric-Container liegt auf z-index 10 — das Gitter muss darüber */
z-index: 11;
pointer-events: none; /* nur die Plätze selbst reagieren */
}
/* Beim Zeichnen haben die Werkzeuge Vorrang */
.bericht-slot-overlay.slots-off .bericht-slot { pointer-events: none; opacity: 0.3; }
.bericht-slot {
position: absolute;
pointer-events: auto;
background: transparent;
border: 1px dashed rgba(61,174,233,0.55);
border-radius: 3px;
cursor: pointer;
padding: 0;
transition: background 0.12s ease, border-color 0.12s ease;
}
.bericht-slot:hover,
.bericht-slot.drop-active {
background: rgba(61,174,233,0.18);
border-color: #3daee9;
border-style: solid;
}
.slot-badge {
position: absolute;
left: 4px;
top: 4px;
background: rgba(0,0,0,0.6);
color: #fff;
font-size: 10px;
font-weight: 600;
line-height: 1;
padding: 3px 6px;
border-radius: 3px;
opacity: 0.75;
}
.bericht-slot:hover .slot-badge { opacity: 1; background: #3daee9; color: #10151a; }
/* ---------- Seitenliste: Markierung + Sammelaktionen ---------- */
.bericht-page-bulk {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
padding: 5px 7px;
background: var(--colorbacklinepairchecked, #1e5774);
border: 1px solid var(--btncolorborderhover, #3daee9);
border-radius: 4px;
font-size: 11px;
color: var(--colortext, #fff);
}
.bericht-page-bulk strong { color: #fff; }
.bericht-page-bulk button {
background: rgba(0,0,0,0.3);
border: 1px solid var(--btncolorborderhover, #3daee9);
color: var(--colortext, #fff);
border-radius: 3px;
cursor: pointer;
font-size: 12px;
line-height: 1;
padding: 3px 7px;
}
.bericht-page-bulk button:hover { background: rgba(0,0,0,0.55); }
#btn-pages-unselect { margin-left: auto; }
.page-thumb .page-num { cursor: pointer; padding: 0 4px; border-radius: 3px; }
.page-thumb .page-num:hover { background: var(--btncolorborderhover, #3daee9); color: #10151a; }
.page-thumb.page-selected {
outline: 2px solid var(--btncolorborderhover, #3daee9);
outline-offset: 1px;
}
.page-thumb.page-selected .page-num {
background: var(--btncolorborderhover, #3daee9);
color: #10151a;
font-weight: 700;
}
/* ---------- Ziehen und Ablegen ---------- */
.bericht-att-item.dragging { opacity: 0.45; }
body.bericht-dragging-attachment .att-thumb { cursor: grabbing; }
/* Aktives Ablegeziel */
.drop-active {
outline: 2px dashed var(--btncolorborderhover, #3daee9);
outline-offset: -3px;
background: var(--colorbacklinepairchecked, rgba(61,174,233,0.12));
}
#bericht-page-list.drop-active { position: relative; border-radius: 4px; }
#bericht-page-list.drop-active::before {
content: attr(data-drop-hint);
position: sticky;
top: 0;
z-index: 3;
display: block;
margin-bottom: 6px;
padding: 6px 8px;
background: var(--btncolorborderhover, #3daee9);
color: #10151a;
font-size: 11px;
font-weight: 600;
text-align: center;
border-radius: 3px;
}
.bericht-canvas-wrap.drop-active::after {
content: "Bild dieser Seite ersetzen";
position: absolute;
left: 50%;
top: 12px;
transform: translateX(-50%);
z-index: 6;
padding: 6px 12px;
background: var(--btncolorborderhover, #3daee9);
color: #10151a;
font-size: 12px;
font-weight: 600;
border-radius: 3px;
pointer-events: none;
}
.bericht-attachments.drop-active::after {
content: "Dateien hier ablegen zum Hochladen";
position: sticky;
bottom: 0;
display: block;
margin-top: 6px;
padding: 6px 8px;
background: var(--btncolorborderhover, #3daee9);
color: #10151a;
font-size: 11px;
font-weight: 600;
text-align: center;
border-radius: 3px;
}
/* ---------- Speicherstand in der Fußleiste ---------- */
.save-state {
font-size: 11px;
margin-left: 4px;
align-self: center;
white-space: nowrap;
}
.save-state.dirty { color: #f67400; }
.save-state.saved { color: #2e8b57; }
/* ---------- Austauschmodus: Ersatzbild für eine Seite wählen ---------- */
.bericht-replace-hint {
/* fest am unteren Bildschirmrand: der Austausch ist ein Modus, und der
muss sichtbar bleiben, auch wenn man durch 40 Fotos scrollt */
position: fixed;
left: 0; right: 0; bottom: 0;
z-index: 1200;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 14px;
padding: 10px 18px;
background: var(--colorbacklinepairchecked, #1e5774);
border-top: 2px solid var(--btncolorborderhover, #3daee9);
box-shadow: 0 -3px 12px rgba(0,0,0,0.35);
font-size: 12px;
color: var(--colortext, #fff);
}
.replace-hint-icon { font-size: 15px; }
.replace-hint-text strong { color: #fff; }
.replace-slot-label { opacity: 0.75; margin-right: 6px; }
.replace-slot-picker { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.replace-slot-btn {
background: rgba(0,0,0,0.3);
border: 1px solid var(--btncolorborderhover, #3daee9);
color: var(--colortext, #fff);
border-radius: 3px;
cursor: pointer;
font-size: 11px;
line-height: 1;
padding: 4px 8px;
}
.replace-slot-btn:hover { background: rgba(0,0,0,0.5); }
.replace-slot-btn.active { background: var(--btncolorborderhover, #3daee9); color: #10151a; font-weight: 700; }
#btn-cancel-replace {
margin-left: auto;
background: transparent;
border: 1px solid var(--colorbacklinebreak, #555);
color: var(--colortext, inherit);
border-radius: 3px;
cursor: pointer;
font-size: 10px;
padding: 3px 8px;
}
#btn-cancel-replace:hover { background: rgba(0,0,0,0.35); }
/* Im Austauschmodus: Kacheln als Ziel kennzeichnen */
body.bericht-replacing .att-thumb { cursor: crosshair; }
body.bericht-replacing .att-view-grid .bericht-att-item:hover {
border-color: var(--btncolorborderhover, #3daee9);
box-shadow: 0 0 0 2px var(--btncolorborderhover, #3daee9) inset;
}
body.bericht-replacing .att-view-grid .att-check-ui,
body.bericht-replacing .att-delete { display: none; }
/* Die Seite, deren Bild ersetzt wird */
#bericht-page-list .page-thumb.replace-target {
outline: 2px solid var(--btncolorborderhover, #3daee9);
outline-offset: 1px;
}
.thumb-replace {
background: transparent;
border: none;
cursor: pointer;
opacity: 0.45;
padding: 2px 4px;
font-size: 12px;
}
.thumb-replace:hover { opacity: 1; }
/* ---------- Auswahl-Info über dem Übernehmen-Button ---------- */
.att-selection-info {
display: flex; align-items: center; justify-content: space-between; gap: 6px;
font-size: 11px;
padding: 4px 0;
margin-top: 6px;
border-top: 1px solid var(--colorboxbordertitle1, #444);
}
#att-selected-count { font-weight: 700; }
#att-clear-selection {
background: transparent; border: none; cursor: pointer;
color: var(--colortextlink, #6ea8dc);
font-size: 10px; text-decoration: underline; padding: 0;
}
.bericht-upload { margin-top: 10px; }
.bericht-grid-buttons {
margin-top: 6px;
padding-top: 6px;
border-top: 1px solid var(--colorboxbordertitle1, #444);
}
.bericht-grid-buttons button {
background: var(--colorbacktitle1, #2a2a30);
color: var(--colortext, #ddd);
border: 1px solid var(--colorboxbordertitle1, #555);
border-radius: 3px;
padding: 4px 8px;
margin: 2px;
cursor: pointer;
font-size: 14px;
}
.bericht-grid-buttons button:hover { background: var(--colorbackhmenu1, #337ab7); color: #fff; }
/* Mittlere Spalte: Editor-Canvas — bewusst dunkler Hintergrund (auch im Light-Mode),
* weil ein Canvas auf grauer Fläche besser sichtbar ist.
*/
.bericht-canvas-area {
background: var(--colorbackbody, #2a2a2e);
border: 1px solid var(--colorboxbordertitle1, transparent);
border-radius: 6px;
padding: 10px;
display: flex; flex-direction: column;
}
.bericht-toolbar {
display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center;
background: var(--colorbacktitle1, #fff);
color: var(--colortext, inherit);
padding: 6px;
border-radius: 4px;
margin-bottom: 8px;
border: 1px solid var(--colorboxbordertitle1, transparent);
}
/* Einheitliche Höhe für ALLE Steuerelemente in der Toolbar */
.bericht-toolbar button,
.bericht-toolbar .tool-btn,
.bericht-toolbar select,
.bericht-toolbar input[type="number"],
.bericht-toolbar input[type="text"],
.bericht-toolbar input[type="color"],
.bericht-toolbar input[type="range"] {
height: 30px;
box-sizing: border-box;
line-height: 1;
vertical-align: middle;
margin: 0;
}
.bericht-toolbar button,
.bericht-toolbar .tool-btn {
background: var(--colorbackbody, #2a2a30);
color: var(--colortext, inherit);
border: 1px solid var(--colorboxbordertitle1, #555);
border-radius: 4px;
padding: 0 10px;
cursor: pointer;
font-size: 14px;
display: inline-flex; align-items: center; justify-content: center;
}
.bericht-toolbar input[type="color"] {
width: 32px;
padding: 2px;
border: 1px solid var(--colorboxbordertitle1, #555);
background: var(--colorbackbody, #2a2a30);
border-radius: 4px;
cursor: pointer;
}
.bericht-toolbar input[type="range"] { width: 90px; }
.bericht-toolbar .tool-btn.active {
background: var(--colorbackhmenu1, #5cb85c);
color: var(--colortextbackhmenu, #fff);
border-color: var(--colortextlink, #4cae4c);
}
.bericht-toolbar .sep {
width: 1px;
background: var(--colorboxbordertitle1, #ddd);
height: 24px;
margin: 0 4px;
align-self: center;
}
/* Forciert Zeilenumbruch — alle Elemente nach .row-break gehen auf neue Zeile */
.bericht-toolbar .row-break { flex-basis: 100%; height: 0; margin: 0; }
.bericht-toolbar label {
display: flex; align-items: center; gap: 4px;
font-size: 12px;
color: var(--colortext, inherit);
}
.bericht-toolbar select,
.bericht-toolbar input[type="number"],
.bericht-toolbar input[type="text"] {
background: var(--colorbackbody, #2a2a30);
color: var(--colortext, #ddd);
border: 1px solid var(--colorboxbordertitle1, #555);
border-radius: 3px;
padding: 2px 4px;
font-size: 12px;
}
.bericht-toolbar select option {
background: var(--colorbackbody, #2a2a30);
color: var(--colortext, #ddd);
}
.bericht-toolbar #zoom-label { color: var(--colortext, inherit); }
.bericht-toolbar input[type="checkbox"] { accent-color: var(--colorbackhmenu1, #337ab7); }
.bericht-canvas-wrap {
position: relative;
background: var(--colorbackvmenu1, #444);
padding: 20px; border-radius: 4px;
display: flex; align-items: flex-start; justify-content: center;
min-height: 400px;
}
.bericht-canvas-wrap.empty {
align-items: center;
padding: 40px 20px;
}
/* ---------- Das Blatt: Kopfzone, Inhaltsbereich, Fußzone ----------
Die Zonen bilden ab, was TCPDF später selbst druckt (Logo/Titel oben,
Seitenzahl unten). Der Canvas dazwischen ist 1:1 der Druckbereich. */
.bericht-sheet {
background: #fff;
box-shadow: 0 2px 14px rgba(0,0,0,0.45);
box-sizing: border-box;
display: flex;
flex-direction: column;
/* Höhen/Breiten/Paddings setzt JS aus der echten Seitengeometrie */
}
.bericht-sheet .sheet-body { position: relative; }
.sheet-zone {
position: relative;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
/* dezent schraffiert: gehört zur Seite, ist aber nicht bearbeitbar */
background: repeating-linear-gradient(
45deg,
rgba(0,0,0,0.035) 0 6px,
rgba(0,0,0,0.07) 6px 12px
);
}
.sheet-header { border-bottom: 1px dashed rgba(0,0,0,0.28); }
.sheet-footer { border-top: 1px dashed rgba(0,0,0,0.28); }
.sheet-note {
background: rgba(61,174,233,0.10);
border: 1px dashed rgba(0,0,0,0.28);
}
.sheet-zone-label {
font-size: 10px;
color: rgba(0,0,0,0.45);
letter-spacing: 0.3px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 6px;
pointer-events: none;
}
/* Ränder ausgeblendet (Toolbar-Schalter 📐) oder bei eingebundenen PDF-Seiten */
.bericht-sheet.zones-hidden { padding-left: 0 !important; padding-right: 0 !important; width: auto !important; }
.bericht-sheet.zones-hidden .sheet-zone { display: none !important; }
/* --colorbackhmenu1 ist im AwlDark fast identisch mit dem Toolbar-Grau —
die "ausgewählt"-Farbe des Themes hebt sich dagegen sichtbar ab. */
#btn-toggle-margins.active {
background: var(--colorbacklinepairchecked, #337ab7);
border-color: var(--btncolorborderhover, #3daee9);
color: #fff;
}
/* WICHTIG: kein max-width auf #pdf-canvas, sonst weicht display- von buffer-size ab
und das Fabric-Overlay rutscht weg. Stattdessen rendert JS auf passende Größe. */
#pdf-canvas {
background: #fff;
display: block;
}
/* Leerer Zustand: Blatt in A4 anzeigen, damit der Bereich nicht winzig wirkt */
.bericht-canvas-wrap.empty .bericht-sheet {
width: 100%;
max-width: 900px;
}
.bericht-canvas-wrap.empty #pdf-canvas {
width: 100%;
aspect-ratio: 190 / 251; /* Inhaltsbereich A4 hoch */
height: auto;
}
.bericht-canvas-wrap.empty::after {
content: "Seite wählen oder Fotos hinzufügen";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #aaa;
font-size: 16px;
pointer-events: none;
text-align: center;
background: rgba(255,255,255,0.85);
padding: 8px 16px;
border-radius: 6px;
}
#fabric-canvas.fabric-overlay { position: absolute !important; pointer-events: auto; }
/* Fabric.js wickelt das Canvas in einen .canvas-container ein. Ohne diese Regel
sitzt der Container im normalen Flow neben dem pdfCanvas und verdrängt es
nach links — das ergibt einen "weißen Bereich rechts" der Bilder überlappt. */
.bericht-canvas-wrap .canvas-container {
position: absolute !important;
}
.bericht-page-note { margin-top: 8px; }
.bericht-page-note label {
display: block;
color: var(--colortext, #e0e0e0);
font-size: 12px;
margin-bottom: 4px;
}
.bericht-page-note textarea {
width: 100%;
box-sizing: border-box;
background: var(--colorbackbody, #2a2a30);
color: var(--colortext, #e0e0e0);
border: 1px solid var(--colorboxbordertitle1, #555);
border-radius: 4px;
padding: 10px 12px;
font-size: 14px;
font-family: inherit;
min-height: 60px;
resize: vertical;
}
.bericht-page-note textarea:focus {
outline: 2px solid var(--colortextlink, #7aa2f7);
outline-offset: -1px;
}
/* Generische Input-Styles im Editor.
--inputbackgroundcolor/--inputbordercolor SIND im AwlDark gesetzt (KB #512,
per DevTools nachgeprüft) — dieselben Werte, die Dolibarr für eigene Felder nutzt. */
.bericht-editor textarea,
.bericht-editor input[type="text"],
.bericht-editor input[type="number"],
.bericht-editor input[type="email"],
.bericht-editor input[type="search"] {
background: var(--inputbackgroundcolor, #fff);
color: var(--colortext, #222);
border: 1px solid var(--inputbordercolor, #ccc);
border-radius: 4px;
padding: 8px 10px;
font-size: 14px;
font-family: inherit;
}
.bericht-editor textarea:focus,
.bericht-editor input:focus {
outline: 2px solid var(--colortextlink, #7aa2f7);
outline-offset: -1px;
}
.bericht-pages-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bericht-pages-header h4 { margin: 0; }
#btn-toggle-thumb-bg {
background: transparent;
border: 1px solid var(--colorboxbordertitle1, #555);
color: var(--colortext, inherit);
border-radius: 3px;
cursor: pointer;
padding: 2px 6px;
}
.page-list { display: flex; flex-direction: column; gap: 8px; }
.page-thumb {
border: 2px solid var(--colorboxbordertitle1, #444);
border-radius: 3px;
cursor: pointer;
position: relative;
transition: border-color 0.15s, box-shadow 0.15s;
overflow: hidden;
}
.page-thumb:hover { border-color: var(--colortextlink, #888); }
.page-thumb.active {
border-color: var(--colortextlink, #337ab7);
box-shadow: 0 0 0 3px rgba(51,122,183,0.55), 0 2px 12px rgba(51,122,183,0.3);
transform: scale(1.02);
}
.page-thumb.active .page-thumb-label {
background: var(--colorbackhmenu1, #337ab7);
color: #fff;
font-weight: 600;
}
/* "Papier"-Look — heller Default, mit Papier-Schatten */
.page-list.paper-light .page-thumb-paper { background: #ffffff; }
.page-list.paper-dark .page-thumb-paper { background: #1e1e22; }
.page-thumb-paper {
width: 100%;
aspect-ratio: 1 / 1.414; /* DIN A4 Verhältnis (Hochformat) */
display: flex; align-items: center; justify-content: center;
box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
overflow: hidden;
}
.page-thumb-paper canvas.thumb-canvas {
max-width: 100%;
max-height: 100%;
display: block;
}
.page-thumb-label {
text-align: center;
font-size: 11px;
padding: 3px 0;
background: var(--colorbacktitle1, #2a2a30);
color: var(--colortext, #ddd);
border-top: 1px solid var(--colorboxbordertitle1, #444);
}
.page-thumb-actions { position: absolute; top: 4px; right: 4px; }
.thumb-del, .thumb-verify {
background: rgba(0,0,0,0.6);
color: #fff;
border: 1px solid rgba(255,255,255,0.3);
border-radius: 3px;
cursor: pointer;
padding: 2px 6px;
font-size: 12px;
margin-left: 2px;
}
.thumb-del:hover { background: rgba(217,83,79,0.9); }
.thumb-verify:hover { background: rgba(92,184,92,0.9); }
.page-thumb.page-signature {
border-color: #5cb85c;
box-shadow: 0 0 0 1px rgba(92,184,92,0.4);
}
.page-thumb.page-signature .sig-badge {
margin-left: 4px;
font-size: 12px;
}
.bericht-actions {
margin-top: 16px;
display: flex; gap: 8px; justify-content: flex-end;
}
.bericht-actions .butAction,
.bericht-actions .butActionConfirm,
.bericht-actions .butActionDelete {
background: var(--colorbacktitle1, #f5f5f5);
color: var(--colortext, #222);
border: 1px solid var(--colorboxbordertitle1, #ccc);
padding: 8px 16px;
border-radius: 4px;
text-decoration: none;
cursor: pointer;
font-weight: 500;
}
.bericht-actions .butActionConfirm {
background: var(--colorbackhmenu1, #337ab7);
color: var(--colortextbackhmenu, #fff);
border-color: var(--colorbackhmenu1, #2e6da4);
}
.bericht-actions .butActionDelete {
background: var(--colorbackerror, #d9534f);
color: #fff;
border-color: var(--colorbackerror, #d43f3a);
}
.bericht-actions .butAction:hover,
.bericht-actions .butActionConfirm:hover,
.bericht-actions .butActionDelete:hover {
filter: brightness(1.1);
}
.bericht-toast {
position: fixed; top: 20px; right: 20px;
background: #5cb85c; color: #fff; padding: 12px 20px;
border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,0.4);
z-index: 9999; animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; } }
.bericht-setup-section {
background: var(--colorbacktitle1, #fff);
color: var(--colortext, inherit);
border: 1px solid var(--colorboxbordertitle1, #e3e3e7);
border-radius: 6px;
padding: 16px;
margin-bottom: 16px;
}
.bericht-setup-section h3 { margin-top: 0; color: var(--colortextlink, inherit); }
@media (max-width: 1100px) {
.bericht-layout,
.bericht-layout.att-collapsed { grid-template-columns: 1fr; }
.bericht-attachments, .bericht-pages { max-height: 300px; }
.bericht-splitter { display: none; }
}
/* PDF-Vorschau-Modal */
.bericht-modal {
position: fixed;
inset: 0;
z-index: 9998;
}
.bericht-modal-backdrop {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.7);
}
.bericht-modal-content {
position: absolute;
top: 5vh; left: 5vw;
right: 5vw; bottom: 5vh;
background: var(--colorbacktitle1, #2a2a30);
border: 1px solid var(--colorboxbordertitle1, #555);
border-radius: 8px;
box-shadow: 0 8px 32px rgba(0,0,0,0.6);
display: flex; flex-direction: column;
overflow: hidden;
}
.bericht-modal-header {
display: flex; justify-content: space-between; align-items: center;
padding: 12px 16px;
background: var(--colorbackbody, #222);
border-bottom: 1px solid var(--colorboxbordertitle1, #555);
}
.bericht-modal-header h3 { margin: 0; font-size: 16px; color: var(--colortext, #ddd); }
.bericht-modal-header button {
background: transparent;
border: 1px solid var(--colorboxbordertitle1, #555);
color: var(--colortext, #ddd);
border-radius: 3px;
padding: 4px 12px;
cursor: pointer;
font-size: 16px;
}
.bericht-modal-header button:hover { background: rgba(255,255,255,0.1); }
.bericht-modal-body {
flex: 1;
overflow: hidden;
}
.bericht-modal-body iframe {
width: 100%;
height: 100%;
border: none;
background: #444;
}
.qr-modal {
top: 10vh; left: 50%; right: auto; bottom: auto;
transform: translateX(-50%);
width: 380px; max-width: 90vw;
height: auto; max-height: 80vh;
}
.qr-modal-body { padding: 20px; text-align: center; }
#qr-code-container {
display: inline-block;
background: #fff;
padding: 12px;
border-radius: 8px;
margin-bottom: 16px;
}
.qr-info p { margin: 6px 0; font-size: 13px; color: var(--colortext, #ddd); }
.qr-url-display { word-break: break-all; }
.qr-url-display a { color: var(--colortextlink, #7aa2f7); }
.qr-status { padding: 8px; background: var(--colorbackbody, #1a1a1f); border-radius: 4px; margin-top: 12px; }
/* ---------- dolModal (alert/confirm/prompt Ersatz) ---------- */
.bericht-dolmodal-overlay {
position: fixed; inset: 0;
background: rgba(0,0,0,0.55);
z-index: 100000;
display: flex; align-items: center; justify-content: center;
}
.bericht-dolmodal {
background: var(--colorbackbody, #22222a);
color: var(--colortext, #eee);
border: 1px solid var(--colorboxbordertitle1, #444);
border-radius: 6px;
min-width: 320px; max-width: 520px;
box-shadow: 0 10px 40px rgba(0,0,0,0.6);
font-size: 14px;
}
.bericht-dolmodal-title {
padding: 10px 14px;
font-weight: bold;
background: var(--colorbacktitle1, #2d2d38);
border-bottom: 1px solid var(--colorboxbordertitle1, #444);
border-radius: 6px 6px 0 0;
}
.bericht-dolmodal-body {
padding: 16px 14px;
line-height: 1.5;
white-space: pre-wrap;
}
.bericht-dolmodal-input {
display: block;
width: 100%;
margin-top: 10px;
padding: 6px 8px;
background: var(--colorbackbody, #1a1a1f);
color: var(--colortext, #eee);
border: 1px solid var(--colorboxbordertitle1, #555);
border-radius: 3px;
box-sizing: border-box;
}
.bericht-dolmodal-foot {
padding: 10px 14px;
display: flex; gap: 8px; justify-content: flex-end;
border-top: 1px solid var(--colorboxbordertitle1, #444);
}