/* File List Content Styles */
.file-list-container {
    margin: 1rem 0;
}

.file-list-bordered {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f8f9fa;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list-bullets {
    list-style-type: disc;
    padding-left: 2rem;
}

.file-list-numbers {
    list-style-type: decimal;
    padding-left: 2rem;
}

.file-list li {
    margin-bottom: 0.75rem;
}

.file-list li:last-child {
    margin-bottom: 0;
}

/* Header styles */
.file-list-header {
    list-style: none !important;
    margin: 1.5rem 0 1rem 0;
    padding: 0;
}

.file-list-header h3,
.file-list-header h4,
.file-list-header h5 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.file-list-header h3 {
    font-size: 1.5rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.file-list-header h4 {
    font-size: 1.25rem;
    color: #007bff;
}

.file-list-header h5 {
    font-size: 1.1rem;
    color: #6c757d;
}

/* File item styles */
.file-list-item {
    list-style: inherit;
}

.file-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.file-title {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}

.file-title:hover {
    color: #0056b3;
    text-decoration: underline;
}

.file-size {
    color: #6c757d;
    font-size: 0.875rem;
    white-space: nowrap;
}

.file-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #28a745;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.file-download:hover {
    background: #218838;
}

.download-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1); /* Make icon white */
}

.file-description {
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.4;
    padding-left: 2rem; /* Align with file content */
}

/* Empty state */
.file-list-empty {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .file-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .file-title {
        min-width: auto;
        width: 100%;
    }
    
    .file-size {
        order: -1;
        align-self: flex-end;
    }
    
    .file-download {
        align-self: flex-end;
    }
    
    .file-description {
        padding-left: 0;
        margin-top: 0.25rem;
    }
    
    .file-list-bordered {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .file-item-content {
        gap: 0.25rem;
    }
    
    .file-icon {
        width: 20px;
        height: 20px;
    }
    
    .file-download {
        width: 28px;
        height: 28px;
    }
    
    .download-icon {
        width: 14px;
        height: 14px;
    }
}

/* Print styles */
@media print {
    .file-download {
        display: none;
    }
    
    .file-title::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .file-list-bordered {
        border-width: 2px;
        border-color: #000;
    }
    
    .file-title {
        color: #0000EE;
    }
    
    .file-download {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .file-download {
        transition: none;
    }
}

/* Focus styles for accessibility */
.file-title:focus,
.file-download:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .file-list-bordered {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .file-list-header h3,
    .file-list-header h4,
    .file-list-header h5 {
        color: #e2e8f0;
    }
    
    .file-list-header h3 {
        border-bottom-color: #4299e1;
    }
    
    .file-list-header h4 {
        color: #4299e1;
    }
    
    .file-title {
        color: #4299e1;
    }
    
    .file-title:hover {
        color: #63b3ed;
    }
    
    .file-size,
    .file-description {
        color: #a0aec0;
    }
}
