/**
 * LearnDash Materials Table Styles
 * Clean, minimal table design
 */

.ldmt-materials-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.ldmt-materials-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Table Header */
.ldmt-materials-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.ldmt-materials-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Body */
.ldmt-materials-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.15s ease;
}

.ldmt-materials-table tbody tr:hover {
    background-color: #f8f9fa;
}

.ldmt-materials-table tbody td {
    padding: 12px 15px;
    color: #212529;
    vertical-align: middle;
}

/* Download Cell Specific */
.ldmt-download-cell {
    text-align: center;
    width: 80px;
}

/* Download Link Button */
.ldmt-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ldmt-download-link:hover {
    background-color: #007cba;
    border-color: #007cba;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ldmt-download-link svg {
    width: 16px;
    height: 16px;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .ldmt-materials-table {
        font-size: 13px;
    }
    
    .ldmt-materials-table thead th,
    .ldmt-materials-table tbody td {
        padding: 10px 12px;
    }
    
    .ldmt-materials-table thead th {
        font-size: 12px;
    }
    
    /* Stack table on very small screens */
    @media screen and (max-width: 480px) {
        .ldmt-materials-table thead {
            display: none;
        }
        
        .ldmt-materials-table tbody tr {
            display: block;
            margin-bottom: 15px;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            padding: 10px;
        }
        
        .ldmt-materials-table tbody tr:hover {
            background-color: #f8f9fa;
        }
        
        .ldmt-materials-table tbody td {
            display: block;
            padding: 5px 10px;
            border: none;
            position: relative;
            padding-left: 120px;
        }
        
        .ldmt-materials-table tbody td:before {
            content: attr(data-label);
            position: absolute;
            left: 10px;
            font-weight: 600;
            color: #6c757d;
            font-size: 12px;
            text-transform: uppercase;
        }
        
        .ldmt-materials-table tbody td:nth-child(1):before { content: "Name:"; }
        .ldmt-materials-table tbody td:nth-child(2):before { content: "Course:"; }
        .ldmt-materials-table tbody td:nth-child(3):before { content: "Type:"; }
        .ldmt-materials-table tbody td:nth-child(4):before { content: "Download:"; }
        
        .ldmt-download-cell {
            text-align: left;
        }
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .ldmt-materials-table {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .ldmt-materials-table thead {
        background-color: #2a2a2a;
        border-bottom-color: #444;
    }
    
    .ldmt-materials-table thead th {
        color: #b0b0b0;
    }
    
    .ldmt-materials-table tbody tr {
        border-bottom-color: #333;
    }
    
    .ldmt-materials-table tbody tr:hover {
        background-color: #2a2a2a;
    }
    
    .ldmt-materials-table tbody td {
        color: #e0e0e0;
    }
    
    .ldmt-download-link {
        border-color: #444;
        color: #b0b0b0;
    }
    
    .ldmt-download-link:hover {
        background-color: #007cba;
        border-color: #007cba;
        color: #fff;
    }
}

/* Empty State */
.ldmt-materials-wrapper p {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 14px;
}

/* File Type Badge Styling (optional enhancement) */
.ldmt-materials-table td:nth-child(3) {
    font-weight: 500;
    font-size: 12px;
    color: #6c757d;
}

/* Material Name Column - Make it prominent */
.ldmt-materials-table td:first-child {
    font-weight: 500;
    color: #212529;
}

/* Course Column - Subtle styling */
.ldmt-materials-table td:nth-child(2) {
    color: #6c757d;
    font-size: 13px;
}