/* ===== DOCUMENTS LIST STYLES ===== */

/* Home page specific styles */
.documents-list-home .documents-list {
    max-width: none;
}

.documents-list-home .document-list-item {
    border-radius: 8px;
    border: 1px solid #e8e9ea;
}

.documents-list-home .document-list-item:hover {
    border-color: #007bff;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.08);
}

/* Sidebar layout specific styles */
.documents-main .documents-list-container {
    margin: 0;
}

.documents-main .document-list-item {
    margin-bottom: 1rem;
}

.documents-list-container {
    width: 100%;
    margin: 0;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* ===== DOCUMENT LIST ITEM ===== */
.document-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e8e9ea;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    min-height: 120px;
}

.document-list-item:hover {
    border-color: #007bff;
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

/* ===== DOCUMENT CONTENT ===== */
.document-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-right: 1.5rem;
}

/* ===== DOCUMENT HEADER ===== */
.document-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.document-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.document-icon .fa-file-pdf {
    color: #ffffff;
}

.document-icon .fa-file-word {
    color: #ffffff;
}

.document-icon .fa-file-excel {
    color: #ffffff;
}

.document-icon .fa-file-powerpoint {
    color: #ffffff;
}

.document-main-info {
    flex: 1;
}

.document-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.document-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.document-title a:hover {
    color: #007bff;
}

.document-description {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== DOCUMENT METADATA ===== */
.document-metadata {
    margin: 0;
}

.metadata-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.metadata-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6c757d;
    font-size: 0.85rem;
    white-space: nowrap;
}

.category-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.metadata-item i {
    color: #adb5bd;
    font-size: 0.8rem;
    width: 12px;
    text-align: center;
}

/* ===== DOCUMENT EXTRAS ===== */
.document-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.document-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.tag-more {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 500;
}

.document-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
}

.badge-public {
    background-color: #d4edda;
    color: #155724;
}

.badge-student {
    background-color: #cce5ff;
    color: #004085;
}

.badge-teacher {
    background-color: #fff3cd;
    color: #856404;
}

.badge-file-type {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* ===== DOCUMENT ACTIONS ===== */
.document-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 120px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-action:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary.btn-action {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary.btn-action:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-outline-secondary.btn-action {
    background-color: transparent;
    color: #6c757d;
    border-color: #dee2e6;
}

.btn-outline-secondary.btn-action:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* ===== NO RESULTS STYLES ===== */
.no-results-container {
    width: 100%;
    padding: 4rem 0;
}

.no-results {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #adb5bd;
}

.no-results-title {
    color: #495057;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.no-results-description {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.no-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .document-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .document-content {
        margin-right: 0;
    }
    
    .document-header {
        gap: 0.75rem;
    }
    
    .document-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .metadata-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .metadata-group {
        gap: 1rem;
        justify-content: space-between;
        width: 100%;
    }
    
    .document-extras {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .document-actions {
        flex-direction: row;
        width: 100%;
        min-width: auto;
    }
    
    .btn-action {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .document-list-item {
        padding: 0.75rem;
    }
    
    .document-title {
        font-size: 1rem;
    }
    
    .metadata-item {
        font-size: 0.8rem;
    }
    
    .tag, .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}