/* Attachment Viewer Styles */
.attachments-section {
    margin-top: 24px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
}

.attachments-section h4 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
}

.no-attachments {
    color: #718096;
    font-style: italic;
    margin: 0;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.attachment-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.attachment-info {
    margin-bottom: 12px;
}

.attachment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-filename {
    font-weight: 600;
    color: #2d3748;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.file-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-type-image {
    background-color: #e6fffa;
    color: #234e52;
    border: 1px solid #38b2ac;
}

.file-type-video {
    background-color: #fef5e7;
    color: #744210;
    border: 1px solid #ed8936;
}

.file-type-pdf {
    background-color: #fed7d7;
    color: #742a2a;
    border: 1px solid #e53e3e;
}

.file-type-document {
    background-color: #e6f3ff;
    color: #1a365d;
    border: 1px solid #3182ce;
}

.file-type-spreadsheet {
    background-color: #f0fff4;
    color: #22543d;
    border: 1px solid #38a169;
}

.file-type-text {
    background-color: #f7fafc;
    color: #2d3748;
    border: 1px solid #a0aec0;
}

.file-type-file {
    background-color: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.attachment-details {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 14px;
}

.file-size {
    font-weight: 500;
}

.field-name {
    color: #4a5568;
}

.attachment-preview {
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.video-preview {
    max-width: 100%;
    max-height: 300px;
    width: 100%;
    height: auto;
    display: block;
}

.file-icon-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background-color: #f7fafc;
}

.file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: #e2e8f0;
    border-radius: 8px;
    border: 2px dashed #cbd5e0;
}

.file-icon-text {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    line-height: 1.2;
}

.attachment-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.download-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3182ce;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.download-link:hover {
    background-color: #2c5282;
    text-decoration: none;
}

.download-link:focus {
    outline: 2px solid #63b3ed;
    outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .attachment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .attachment-filename {
        margin-bottom: 8px;
    }
    
    .image-preview,
    .video-preview {
        max-height: 200px;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .attachments-section {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .attachments-section h4 {
        color: #e2e8f0;
    }
    
    .attachment-item {
        background-color: #1a202c;
        border-color: #4a5568;
    }
    
    .attachment-filename {
        color: #e2e8f0;
    }
    
    .attachment-details {
        color: #a0aec0;
    }
    
    .field-name {
        color: #cbd5e0;
    }
    
    .attachment-preview {
        border-color: #4a5568;
    }
}
