/* Column Sorting Styles */

th.sortable-header {
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

th.sortable-header:hover {
    background-color: rgba(59, 130, 246, 0.08) !important;
    color: #2563eb !important;
}

[data-theme="dark"] th.sortable-header:hover {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

th.sortable-header.sort-asc,
th.sortable-header.sort-desc {
    color: #2563eb !important;
    font-weight: 600 !important;
    background-color: rgba(59, 130, 246, 0.05) !important;
}

[data-theme="dark"] th.sortable-header.sort-asc,
[data-theme="dark"] th.sortable-header.sort-desc {
    color: #60a5fa !important;
    background-color: rgba(59, 130, 246, 0.12) !important;
}

.sort-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    font-size: 0.9em;
    opacity: 0.4;
    transition: all 0.2s ease;
    vertical-align: middle;
    line-height: 1;
}

[dir="rtl"] .sort-icon-wrapper,
html[lang="ar"] .sort-icon-wrapper {
    margin-left: 0;
    margin-right: 6px;
}

th.sortable-header:hover .sort-icon-wrapper {
    opacity: 0.8;
}

th.sortable-header.sort-asc .sort-icon-wrapper,
th.sortable-header.sort-desc .sort-icon-wrapper {
    opacity: 1 !important;
    color: #2563eb !important;
}

[data-theme="dark"] th.sortable-header.sort-asc .sort-icon-wrapper,
[data-theme="dark"] th.sortable-header.sort-desc .sort-icon-wrapper {
    color: #60a5fa !important;
}
