﻿/* ===========================================
   File Modal - Модальное окно для файлов
   =========================================== */

.file-modal-root {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.file-modal-root.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.file-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.file-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8faf8;
    flex-shrink: 0;
}

.file-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2e7d32;
}

.file-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.file-modal-close:hover {
    color: #c00;
    background: #fee;
}

.file-modal-body {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.file-modal-iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
    display: block;
}

body.file-modal-open {
    overflow: hidden;
}

/* ===========================================
   Document Block - Компактные стили
   =========================================== */

.doc-block {
    padding: 0.75rem;
    font-size: 0.9rem;
}

.doc-block .file-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.doc-block .file-section-title {
    font-weight: 600;
    color: #2e7d32;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-block .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    color: #666;
}

.doc-block .form-control-sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
}

.doc-block .btn-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
}

.doc-block .table {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.doc-block .table th {
    font-weight: 600;
    color: #495057;
    padding: 0.4rem 0.5rem;
}

.doc-block .table td {
    padding: 0.35rem 0.5rem;
    vertical-align: middle;
}

.doc-block .btn-outline-success,
.doc-block .btn-outline-danger {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
}

.doc-block .alert {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.doc-block-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #eee;
    text-align: right;
}
