/* ----------------------------------------------------------------------
    Custom Sorting Styles for jockey page
   ---------------------------------------------------------------------- */
.single-jockeys .detail_horse_list .pl-merge-hidden.jockey {
    width: 81px !important;
}
.second-datatable th.sortable,
.second-datatable td.sortable {
    cursor: pointer !important;
    position: relative;
    padding-right: 20px !important; 
}
.second-datatable thead th.sortable::after, 
.second-datatable thead td.sortable::after {
    font-family: "FontAwesome";
    content: "\f0de" !important; 
    position: absolute;
    right: 5px;
    top: 53%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9f9f9f !important; 
    opacity: 1;      
    display: block !important;
    pointer-events: none;
}
.second-datatable thead th.sortable:hover::after, 
.second-datatable thead td.sortable:hover::after {
    color: #666;
}
.second-datatable thead th.sortable.sort-asc::after, 
.second-datatable thead td.sortable.sort-asc::after {
    content: "\f0de" !important; 
    color: #676767 !important;    
    opacity: 1 !important;
}
.second-datatable thead th.sortable.sort-desc::after, 
.second-datatable thead td.sortable.sort-desc::after {
    content: "\f0dd" !important; 
    color: #676767 !important;     
    opacity: 1 !important;
    top: 43%;
}
.second-datatable thead th.minvideo::after,
.second-datatable thead td.minvideo::after {
    display: none !important;
    content: none !important;
}
.race-results-reset {
    display: block;      
    clear: both;        
    margin-top: 15px;    
    margin-bottom: 15px;
}
.race-results-reset a:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
    color: #000;
}

/* ----------------------------------------------------------------------
    Race Card Table Sorting
   ---------------------------------------------------------------------- */
.page-template-racingpage-racecard.page-template-racingpage-racecard th.sticky-cell.new-width.sortable {
    width: 50px !important;
}
.page-template-racingpage-racecard.page-template-racingpage-racecard table.stc-table.dataTable thead th {
    vertical-align: middle !important;
}
.racecardtb th.sortable {
    cursor: pointer !important;
    position: relative;
    padding-right: 20px !important;
    user-select: none;
}
.racecardtb thead th.sortable::after {
    font-family: "FontAwesome";
    content: "\f0de" !important; 
    position: absolute;
    right: 5px;
    top: 57%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #b0b0b0;   
    opacity: 1;      
    display: block !important;
    pointer-events: none;
}
.racecardtb thead th.sortable:hover::after {
    color: #666;
}
.racecardtb thead th.sortable.sort-asc::after {
    content: "\f0de" !important; 
    color: #676767 !important;
    opacity: 1 !important;
}
.racecardtb thead th.sortable.sort-desc::after {
    content: "\f0dd" !important; /* fa-sort-desc */
    color: #676767 !important;
    opacity: 1 !important;
    top: 45%;
}
.racecard-reset-btn {
    margin-bottom: 10px;
    display: inline-block;
    clear: both;
}
.racecard-reset-btn a:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
    color: #000;
}
.racecardtb thead th:nth-child(9) { 
    min-width: 80px; 
}

.horse_detail_t4.racecardea {
    padding-left: 10px !important;
}

/* ==========================================================
   Horses by Owner Table - Full Sorting UI Styles
========================================================== */

/* ---------- TABLE BASE ---------- */

.owner-horses-table {
    width: 100%;
    border-collapse: collapse;
}

.owner-horses-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    position: relative;
    transition: background 0.2s ease;
}

/* ---------- SORTABLE HEADERS ---------- */

.owner-horses-table thead th.sortable {
    cursor: pointer;
    padding-right: 26px; /* space for arrow */
}

/* Hover effect */
.owner-horses-table thead th.sortable:hover {
    background: #eef2f7;
}

/* ---------- ARROW INDICATORS ---------- */

/* Default hidden arrow */
.owner-horses-table thead th.sortable::after {
    content: "▲";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #666;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

/* Ascending */
.owner-horses-table thead th.sort-asc::after {
    content: "▲";
    opacity: 1;
    color: #464646;
}

/* Descending */
.owner-horses-table thead th.sort-desc::after {
    content: "▼";
    opacity: 1;
    color: #000;
}

/* Active sorted column highlight */
.owner-horses-table thead th.sort-asc,
.owner-horses-table thead th.sort-desc {
    background: #e6f0ff;
}

/* ---------- ROW STYLING ---------- */

.owner-horses-table tbody tr {
    transition: background 0.2s ease;
}

.owner-horses-table tbody tr:hover {
    background: #f9f9f9;
}

/* Keep striped table compatibility */
.owner-horses-table.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafafa;
}

/* Disable sort styling for Owner column */
.owner-horses-table thead th:nth-child(7) {
    cursor: default !important;
}

.owner-horses-table thead th:nth-child(7)::after {
    display: none !important;
}

/* ---------- MOBILE OPTIMIZATION ---------- */

@media (max-width: 768px) {

    .owner-horses-table thead th {
        font-size: 12px;
        padding: 8px 6px;
    }

    .owner-horses-table tbody td {
        font-size: 12px;
        padding: 8px 6px;
    }

    .owner-horses-table thead th.sortable {
        padding-right: 18px;
    }

    .owner-horses-table thead th.sortable::after {
        right: 5px;
        font-size: 10px;
    }

}