﻿/* ============================================
   Просмотр файлов (лайтбокс)
   Общий компонент — используется везде
   ============================================ */

.file-viewer-content {
    width: 100%;
    min-height: 300px;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F6F8;
    border-radius: 12px;
    overflow: auto;
    padding: 12px;
}

.file-viewer-image {
    display: block;
    max-width: min(100%, 900px);
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: #FFFFFF;
    margin: 0 auto;
}

.file-viewer-pdf {
    width: 100%;
    max-width: 1100px;
    height: 80vh;
    border: none;
    border-radius: 8px;
    background: #FFFFFF;
    margin: 0 auto;
}

.file-viewer-dialog {
    max-width: 1200px !important;
    width: 100% !important;
}

@media (max-width: 1280px) {
    .file-viewer-dialog {
        max-width: 95vw !important;
    }
}

@media (max-width: 600px) {
    .file-viewer-content {
        padding: 4px;
        min-height: 200px;
    }

    .file-viewer-image {
        max-width: 100%;
        max-height: 70vh;
        border-radius: 4px;
    }

    .file-viewer-pdf {
        height: 70vh;
        border-radius: 4px;
    }
}

/* Кнопка-скрепка (button вместо a) */
button.attachment-link {
    background: #EFF6FF;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

button.attachment-link:hover {
    background: #DBEAFE;
}