/**
 * table-sort.css
 * 
 * Styles for sortable tables
 */

/* Sortable table headers */
table[data-sortable="true"] thead th {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hover state for sortable headers */
table[data-sortable="true"] thead th:hover {
    background-color: rgba(45, 161, 74, 0.1);
}

/* Focus state for keyboard navigation */
table[data-sortable="true"] thead th:focus {
    outline: 2px solid #208a3d;
    outline-offset: -2px;
}

/* Sort indicator spacing */
table[data-sortable="true"] thead th .sort-indicator {
    display: inline-block;
    margin-left: 0.25em;
    font-weight: bold;
    color: #208a3d;
}

/* Show sort hint on hover for unsorted columns */
table[data-sortable="true"] thead th[aria-sort="none"]:hover .sort-indicator::before {
    content: ' ↕';
    color: rgba(32, 138, 61, 0.5);
    font-weight: bold;
}

/* Active sort column highlighting */
table[data-sortable="true"] thead th[aria-sort="ascending"],
table[data-sortable="true"] thead th[aria-sort="descending"] {
    background-color: rgba(32, 138, 61, 0.1);
}

/* Smooth transitions */
table[data-sortable="true"] thead th {
    transition: background-color 0.2s ease;
}

/* Print styles - hide sort indicators when printing */
@media print {
    table[data-sortable="true"] thead th .sort-indicator {
        display: none;
    }
    
    table[data-sortable="true"] thead th {
        cursor: default;
    }
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    table[data-sortable="true"] thead th {
        padding: 0.5em;
    }
    
    table[data-sortable="true"] thead th .sort-indicator {
        font-size: 1.2em;
    }
}