.file-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
}

.file-preview-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 130px;
}

.file-preview-open {
    height: 96px;
    width: 96px;
    padding: 6px;
    border: 1px solid #e2e4ee;
    border-radius: 6px;
    background: #f7f8fc;
    display: grid;
    place-content: center;
    cursor: zoom-in;
    overflow: hidden;
}

.file-preview-open img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.file-preview-open i {
    font-size: 34px;
    color: #6b7280;
}

.file-preview-meta {
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-preview-item .remove-icon {
    position: absolute;
    top: -8px;
    right: -8px;
    height: 22px;
    width: 22px;
    padding: 0;
    border: 0;
    background: #c7c7c7;
    border-radius: 50px;
    display: grid;
    place-content: center;
    cursor: pointer;
}

.file-preview-item .remove-icon i {
    color: #434343;
    font-size: 12px;
}

.file-preview-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(17, 20, 40, .82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    cursor: zoom-out;
}

/* Capped to the viewport with the overflow inside, so opening a large scan
   never makes the page behind it grow or scroll. */
.file-preview-viewer-body {
    max-height: calc(100vh - 6rem);
    max-width: min(1100px, 94vw);
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    display: grid;
    place-content: center;
}

.file-preview-viewer-body img {
    max-width: 100%;
    display: block;
}

.file-preview-viewer-body iframe {
    width: min(1000px, 90vw);
    height: calc(100vh - 8rem);
    border: 0;
    display: block;
}

.file-preview-viewer-icon {
    font-size: 96px;
    color: #9aa1b1;
    padding: 48px;
}

.file-preview-viewer-caption {
    color: #fff;
    font-size: 13px;
    text-align: center;
    word-break: break-all;
}
