/**
 * Document Manager - Frontend Styles
 * 
 * This file styles the documents table displayed via the [documents_table] shortcode.
 * The styles are designed to be clean, modern, and responsive.
 */

/* 
 * Table wrapper - allows horizontal scrolling on small screens
 * overflow-x: auto creates a scrollbar if table is too wide
 */
.documents-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

/* 
 * Main table styling
 * border-collapse: collapse removes spacing between cells
 * box-shadow adds a subtle shadow for depth
 */
.documents-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 
 * Table header styling
 * Light gray background to distinguish from content
 */
.documents-table thead {
    background: #f5f5f5;
}

/* 
 * Cell padding and borders
 * Applied to both header (th) and data (td) cells
 */
.documents-table th,
.documents-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

/* 
 * Header cell specific styling
 * Uppercase and small size creates a professional look
 */
.documents-table th {
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* 
 * Row hover effect
 * Provides visual feedback when user hovers over a row
 */
.documents-table tbody tr:hover {
    background: #f9f9f9;
}

/* 
 * Remove border from last row
 * Creates a cleaner look at the bottom of the table
 */
.documents-table tbody tr:last-child td {
    border-bottom: none;
}

/* 
 * Document name styling
 * Slightly bolder to make it stand out as the primary identifier
 */
.document-name {
    font-weight: 500;
    color: #2c3e50;
}

/* 
 * Description column styling
 * Better line-height improves readability
 */
.document-description {
    color: #555;
    line-height: 1.6;
}

/* 
 * Download column styling
 * Center aligned and fixed width for consistent button placement
 */
.document-download {
    text-align: center;
    width: 120px;
}

/* 
 * Download button styling
 * Blue color matches WordPress admin theme
 * Transition creates smooth hover effect
 */
.document-download-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

/* 
 * Download button hover state
 * Darker blue provides clear visual feedback
 */
.document-download-btn:hover {
    background: #005a87;
    color: #fff;
}

/* 
 * "No file available" text styling
 * Italic and gray to indicate unavailability
 */
.no-document {
    color: #999;
    font-style: italic;
    font-size: 14px;
}

/* 
 * Responsive styling for mobile devices
 * Reduces font size and padding on smaller screens
 */
@media (max-width: 768px) {
    .documents-table {
        font-size: 14px;
    }
    
    .documents-table th,
    .documents-table td {
        padding: 8px 10px;
    }
}
