/* UVL Design – Global Tables (Standings, Leaders, Calendars) */
.sp-template-league-table,
.sp-template-player-list,
.sp-template-calendar,
.sp-template-event-list {
    font-family: 'Inter', sans-serif;
    color: #334155;
    background-color: transparent;
    padding: 20px 0;
}

/* Tabulka Wrapper - Remove the box! */
.sp-table-wrapper {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    overflow: hidden;
    margin: 0 auto 30px;
    max-width: 1400px;
}

/* Tabulka Title */
.sp-post-caption,
h4.sp-table-caption {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #0a1128 !important;
    background: transparent !important;
    padding: 0 0 16px 0 !important;
    margin: 0 0 16px 0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-transform: uppercase !important;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sp-post-caption::before,
h4.sp-table-caption::before {
    content:'';
    width: 6px;
    height: 24px;
    background: #004FA3 !important;
    border-radius: 3px;
    display: inline-block;
}

/* Tabulka Struktura */
.sp-data-table {
    border: none !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin-top: 0 !important;
}

/* Hlavicka tabulky */
.sp-data-table thead th {
    background: transparent !important;
    color: #64748b !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 12px 16px !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-align: center;
}

/* Rádky */
.sp-data-table tbody td {
    padding: 16px 16px !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    color: #334155 !important;
    background: #fff !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle;
    transition: background 0.2s;
    text-align: center;
}

.sp-data-table tbody tr:hover td {
    background: #f8fafc !important;
}

/* Zvýraznění pozice */
.sp-data-table td.data-rank {
    font-weight: 800 !important;
    color: #004FA3 !important;
    width: 50px;
    font-size: 1rem !important;
}

/* Odkazy (Název týmu / Hráče) */
.sp-data-table td.data-name a,
.sp-data-table td.data-event a,
.sp-data-table td.data-team a {
    color: #0a1128 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.sp-data-table td.data-name a:hover,
.sp-data-table td.data-event a:hover,
.sp-data-table td.data-team a:hover {
    color: #004FA3 !important;
    transform: translateX(4px);
}

/* Loga v tabulce */
.sp-data-table td.data-name img.sp-default-logo,
.sp-data-table td.data-event img.sp-default-logo,
.sp-data-table td.data-team img.sp-default-logo {
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06)) !important;
}

/* Specific Columns highlighting */
.sp-data-table td.data-date,
.sp-data-table td.data-time,
.sp-data-table td.data-results,
.sp-data-table td.data-pts,
.sp-data-table td.data-points {
    color: #004FA3 !important;
    font-weight: 800 !important;
}

.sp-data-table th.data-name, .sp-data-table td.data-name {
    text-align: left;
}

@media (max-width: 768px) {
    .sp-data-table {
        display: block;
        overflow-x: auto;
    }
}

/* Leaderboard tops */
.sp-template-player-list h4.sp-table-caption::before {
    background: #004FA3 !important; /* No red */
}

.sp-template-player-list .sp-data-table td.data-team {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
}

.sp-template-player-list .sp-data-table td:not(.data-name):not(.data-team):not(.data-rank) {
    font-weight: 800 !important;
    color: #004FA3 !important;
    background: #f8fafc !important;
}

/* Leaderboard top 3 highlights */
.sp-template-player-list .sp-data-table tbody tr:nth-child(1) td {
    background: rgba(0, 79, 163, 0.04) !important;
}

.sp-template-player-list .sp-data-table tbody tr:nth-child(1) td.data-rank {
    color: #004FA3 !important; /* Accent pro prvni misto (zlatá/červená) */
    font-size: 1.3rem !important;
}

.sp-template-player-list .sp-data-table tbody tr:nth-child(1) td.data-name a {
    color: #004FA3 !important;
}

/* -----------------------------------------------------------------
   UVL DataTables.js Interactive UI Styling
----------------------------------------------------------------- */

.dataTables_wrapper {
    width: 100%;
    margin-top: 15px;
}

/* Hide default DataTables border */
table.dataTable.no-footer {
    border-bottom: none !important;
}

/* Beautiful Search Input */
.dataTables_filter {
    margin-bottom: 20px;
    text-align: left !important;
    float: none !important;
    display: flex;
    justify-content: flex-end;
}

.dataTables_filter label {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dataTables_filter input[type="search"] {
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #0a1128;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    min-width: 250px;
}

.dataTables_filter input[type="search"]:focus {
    border-color: #004FA3;
    box-shadow: 0 0 0 3px rgba(0, 79, 163, 0.1);
}

/* Sorting Icons in Headers */
table.dataTable thead th {
    position: relative;
    cursor: pointer;
    background-image: none !important;
    text-align: left !important;
}

table.dataTable thead th {
    padding-right: 25px !important;
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    content: "⬍";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.2;
    font-family: sans-serif;
    font-size: 14px;
}

table.dataTable thead .sorting_asc::after {
    content: "⬆";
    opacity: 1;
    color: #004FA3 !important;
    font-size: 16px;
}

table.dataTable thead .sorting_desc::after {
    content: "⬇";
    opacity: 1;
    color: #004FA3 !important;
    font-size: 16px;
}

table.dataTable thead th:hover {
    background-color: #f1f5f9 !important;
    color: #004FA3 !important;
}

/* No data empty state */
.dataTables_empty {
    padding: 30px !important;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: #94a3b8;
    background: transparent;
}