/* ===================================
   FILE VIEWER MODAL STYLES
   =================================== */

.file-viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.file-viewer-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-viewer-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-2xl);
}

.file-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.file-viewer-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.file-viewer-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.file-viewer-content {
    flex: 1;
    overflow: auto;
    padding: var(--spacing-lg);
    background: white;
}

.file-viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.file-viewer-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.file-viewer-unsupported {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-secondary);
    text-align: center;
    padding: var(--spacing-2xl);
}

.file-viewer-unsupported svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-tertiary);
}

/* Print styles */
@media print {
    .file-viewer-modal {
        background: white !important;
    }

    .file-viewer-header,
    .file-viewer-actions {
        display: none !important;
    }

    .file-viewer-container {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .file-viewer-content {
        padding: 0 !important;
    }
}

/* Dark mode */
[data-theme="dark"] .file-viewer-content {
    background: var(--color-bg);
}

[data-theme="dark"] .file-viewer-unsupported {
    color: var(--color-text);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .file-viewer-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .file-viewer-title {
        font-size: var(--font-size-base);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }
}