/* ================================================================
   DATEI-VORSCHAU
   Gemeinsame Darstellung der Vorschau-Modals (_FilePreviewModal fuer
   Datei-Anhaenge, _LegalDocumentPreviewModal fuer Rechtsdokumente).
   Bewusst eine eigene Datei: die Zustimmungs-Seite (Pages/Legal/Accept)
   rendert ohne Layout und laedt shared.css nicht, braucht die Vorschau
   aber trotzdem.
   ================================================================ */
.file-preview-dialog {
    max-width: min(1400px, 96vw);
    height: calc(100vh - 3.5rem);
}

    .file-preview-dialog .modal-content {
        height: 100%;
    }

.file-preview-body {
    flex: 1 1 auto;
    min-height: 0; /* erlaubt dem Flex-Kind zu schrumpfen statt überzulaufen */
    padding: 0;
    display: flex;
    background: var(--color-border-light);
}

.file-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.file-preview-image {
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-preview-empty {
    margin: auto;
    text-align: center;
    padding: 60px 20px;
}

@media (max-width: 767.98px) {
    .file-preview-dialog {
        max-width: 100%;
        height: calc(100vh - 1rem);
        margin: 0.5rem;
    }
}
