/* 파일 첨부 기능 스타일 */

.file-attachment-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
}

.file-attachment-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-upload-area {
    border: 2px dashed #007bff;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    background-color: #f8f9ff;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #0056b3;
    background-color: #e6f3ff;
}

.file-upload-area.dragover {
    border-color: #28a745;
    background-color: #e6ffe6;
}

.file-upload-input {
    display: none;
}

.file-upload-text {
    color: #666;
    font-size: 14px;
}

.file-upload-icon {
    font-size: 24px;
    color: #007bff;
    margin-bottom: 10px;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    background-color: white;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
}

.file-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.file-icon.pdf {
    background-color: #dc3545;
}

.file-icon.image {
    background-color: #28a745;
}

.file-icon.doc {
    background-color: #007bff;
}

.file-icon.other {
    background-color: #6c757d;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #212529;
    font-size: 13px;
    margin-bottom: 2px;
}

.file-meta {
    font-size: 11px;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 5px;
}

.file-action-btn {
    border: none;
    background: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.2s;
}

.file-action-btn:hover {
    background-color: #e9ecef;
}

.file-action-btn.view {
    color: #007bff;
}

.file-action-btn.view:hover {
    background-color: #e6f3ff;
}

.file-action-btn.download {
    color: #28a745;
}

.file-action-btn.download:hover {
    background-color: #e6ffe6;
}

.file-action-btn.delete {
    color: #dc3545;
}

.file-action-btn.delete:hover {
    background-color: #ffe6e6;
}

.upload-progress {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background-color: #007bff;
    width: 0%;
    transition: width 0.3s ease;
}

.file-viewer-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.file-viewer-content {
    position: relative;
    margin: 2% auto;
    width: 90%;
    height: 90%;
    background-color: white;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.file-viewer-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 5px 5px 0 0;
}

.file-viewer-title {
    font-weight: bold;
    color: #212529;
}

.file-viewer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.file-viewer-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

.file-viewer-body {
    flex: 1;
    padding: 20px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 3px;
}

.file-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.no-files-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .file-viewer-content {
        width: 95%;
        height: 95%;
        margin: 1% auto;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}