Quelltext des aktuellen Standes
/*
* Gemeinsame Datei-Anhang-Komponente
* --------------------------------------------------------------------------
* - .cs-file-* : einheitliche Anhang-Liste (urspr. aus dem Vertrags-Modul),
* modulübergreifend wiederverwendet (Bestellungen, Verträge, ...).
* - .att-modal-* : Lightbox-Vorschau für Bilder & PDFs (analog zur
* Ticket-Anhang-Vorschau). Wird über templates/partials/_attachment_modal.php
* global eingebunden und per data-att-view-Attributen ausgelöst.
*/
/* ── Datei-Liste ───────────────────────────────────────── */
.cs-file-list { display: flex; flex-direction: column; gap: 0.5rem; }
.cs-file-row {
display: flex; align-items: center; gap: 0.75rem;
padding: 0.625rem 0.75rem; background: var(--gray-50);
border-radius: 0.25rem; border: 1px solid var(--gray-100); transition: border-color 0.15s;
}
.cs-file-row:hover { border-color: var(--color-primary-soft); }
.cs-file-icon-wrap { flex-shrink: 0; width: 28px; display: flex; align-items: center; justify-content: center; }
.cs-file-info { flex: 1; min-width: 0; }
.cs-file-name { color: var(--blue-600); text-decoration: none; font-size: 0.84rem; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-file-name:hover { text-decoration: underline; }
.cs-file-meta { font-size: 0.7rem; color: var(--gray-400); display: block; }
.cs-file-dl, .cs-file-del, .cs-file-view {
width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
border-radius: 0.375rem; border: none; cursor: pointer; flex-shrink: 0;
transition: all 0.15s; text-decoration: none;
}
.cs-file-dl { color: var(--gray-500); background: var(--gray-200); }
.cs-file-dl:hover { background: var(--blue-100); color: var(--blue-600); text-decoration: none; }
.cs-file-view { color: var(--gray-500); background: var(--gray-200); }
.cs-file-view:hover { background: var(--amber-100); color: var(--amber-600); text-decoration: none; }
.cs-file-del { color: var(--gray-400); background: var(--gray-100); }
.cs-file-del:hover { background: var(--red-100); color: var(--red-600); }
/* ── Lightbox-Vorschau (Bilder & PDFs) ─────────────────── */
.att-modal { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; padding: 2.5rem 4rem; }
.att-modal[hidden] { display: none; }
.att-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.82); cursor: zoom-out; }
.att-modal-figure { position: relative; z-index: 1; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; max-width: 100%; max-height: 100%; }
.att-modal-img { max-width: 100%; max-height: calc(100vh - 7rem); border-radius: 0.4rem; box-shadow: 0 12px 40px rgba(0,0,0,0.5); background: var(--color-bg); }
.att-modal-img[hidden], .att-modal-frame[hidden] { display: none; }
.att-modal-frame { width: min(960px, 90vw); height: calc(100vh - 7rem); border: none; border-radius: 0.4rem; box-shadow: 0 12px 40px rgba(0,0,0,0.5); background: var(--color-bg); }
.att-modal-caption { display: flex; align-items: center; gap: 1rem; max-width: 100%; color: var(--gray-200); font-size: 0.85rem; }
.att-modal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.att-modal-open { color: var(--blue-300); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.att-modal-open:hover { color: var(--blue-200); text-decoration: underline; }
.att-modal-btn { position: absolute; z-index: 2; background: rgba(255,255,255,0.12); border: none; color: var(--color-on-accent); cursor: pointer; border-radius: 999px; display: flex; align-items: center; justify-content: center; transition: background-color 0.15s; }
.att-modal-btn:hover { background: rgba(255,255,255,0.25); }
.att-modal-close { top: 1.1rem; right: 1.1rem; width: 2.4rem; height: 2.4rem; font-size: 1.6rem; line-height: 1; }
.att-modal-nav { top: 50%; transform: translateY(-50%); width: 2.8rem; height: 2.8rem; font-size: 1.3rem; }
.att-modal-prev { left: 1rem; }
.att-modal-next { right: 1rem; }
@media (max-width: 640px) {
.att-modal { padding: 1rem; }
.att-modal-nav { width: 2.2rem; height: 2.2rem; }
.att-modal-prev { left: 0.25rem; }
.att-modal-next { right: 0.25rem; }
}