/* File Upload Styles */
.file-upload-area {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.file-upload-area.active {
    border-color: var(--accent-color);
    background: rgba(16, 163, 127, 0.05);
}

.upload-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    margin-left: auto;
}

.upload-close:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.upload-content {
    padding: 20px;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-primary);
}

.upload-dropzone:hover {
    border-color: var(--accent-color);
    background: rgba(16, 163, 127, 0.02);
}

.upload-dropzone.dragover {
    border-color: var(--accent-color);
    background: rgba(16, 163, 127, 0.1);
    transform: scale(1.02);
}

.dropzone-content i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.dropzone-content h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.dropzone-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.browse-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.browse-btn:hover {
    background: #0d8f6d;
    transform: translateY(-1px);
}

/* New File Attachment Styles */
.uploaded-files {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.file-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.file-attachment:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-attachment-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.file-attachment-icon.pdf { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%); 
    color: #ef4444; 
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.file-attachment-icon.docx { 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%); 
    color: #3b82f6; 
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.file-attachment-icon.pdf-small { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
}

.file-attachment-icon.docx-small { 
    background: rgba(59, 130, 246, 0.1); 
    color: #3b82f6; 
}

.file-attachment-icon.generic { 
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(107, 114, 128, 0.05) 100%); 
    color: var(--text-muted); 
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.file-attachment-content {
    flex: 1;
    min-width: 0;
}

.file-attachment-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.file-attachment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-attachment-size {
    font-weight: 500;
}

.file-attachment-type {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.file-attachment-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.file-attachment-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.file-attachment-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-color);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.file-attachment-progress-bar {
    height: 100%;
    background: var(--accent-color);
    border-radius: 0 0 8px 8px;
    transition: width 0.3s ease;
}

/* Compact file list for footer */
.file-attachments-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.file-attachment-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.file-attachment-compact:hover {
    border-color: var(--accent-color);
}

.file-attachment-compact-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: 0.7rem;
}

.file-attachment-compact-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-attachment-compact-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    font-size: 0.7rem;
}

.file-attachment-compact-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.upload-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--hover-color);
    border-color: var(--accent-color);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-text:hover {
    color: var(--text-primary);
    background: var(--hover-color);
}

/* Input Actions */
.input-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    border-right: 1px solid var(--border-color);
}

.input-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.input-action-btn:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.input-action-btn.active {
    background: var(--accent-color);
    color: white;
}

/* File Info in Footer */
.file-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-info i {
    color: var(--accent-color);
}

/* Upload Status */
.upload-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-top: 8px;
}

.status-success { color: var(--accent-color); }
.status-error { color: #ef4444; }
.status-processing { color: #f59e0b; }

/* Animation for file upload */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-upload-area {
    animation: slideDown 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .upload-content {
        padding: 15px;
    }
    
    .dropzone-content {
        padding: 20px 10px;
    }
    
    .dropzone-content i {
        font-size: 2.5rem;
    }
    
    .upload-actions {
        flex-direction: column;
    }
    
    .input-actions {
        padding: 0 12px;
    }
    
    .file-attachment {
        padding: 10px 12px;
    }
    
    .file-attachment-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}