/* ============================================
   CBRivals Liga-Tabelle – Match Card Design
   Datei: /wp-content/themes/tet/assets/css/league-table.css
   Einbinden via functions.php (siehe unten)
   ============================================ */

/* ── WRAPPER ── */
.sp-template-league-table {
    font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif !important;
    width: 100% !important;
}

.sp-table-caption {
    display: none !important;
}

.sp-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* ── TABELLE ── */
.sp-league-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 4px 4px !important;
    background: transparent !important;
    font-family: 'Oswald', Arial, sans-serif !important;
    table-layout: auto !important;
    border: none !important;
}

/* ── HEADER AUSBLENDEN ── */
.sp-league-table thead {
    display: none !important;
}

/* ── BODY ZEILEN ── */
.sp-league-table tbody tr {
    background: transparent !important;
    border: none !important;
}

/* ── ALLE ZELLEN RESET ── */
.sp-league-table tbody td {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* Abstand wird via border-spacing auf der Tabelle gesteuert */

/* ── POS FELD – gelbes Quadrat ── */
.sp-league-table tbody td.data-rank {
    background: #eeee22 !important;
    color: #111111 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    text-align: center !important;
    display: table-cell !important;
}

/* ── NAME + LOGO – dunkelgrau, weiße Schrift ── */
.sp-league-table tbody td.data-name {
    background: #1a1a1a !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0 12px !important;
    height: 32px !important;
    text-align: left !important;
    width: auto !important;
    vertical-align: middle !important;
}

.sp-league-table tbody td.data-name a {
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 32px !important;
    line-height: 1 !important;
}

.sp-league-table tbody tr:hover td.data-name a {
    color: #eeee22 !important;
}

/* Logo */
.sp-league-table tbody td.data-name img,
.sp-league-table .team-logo img {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    margin-right: 7px !important;
    flex-shrink: 0 !important;
    position: static !important;
    top: auto !important;
}

/* ── SCORE FELDER – gelbes Quadrat, schwarze Schrift ── */
.sp-league-table tbody td.data-points,
.sp-league-table tbody td.data-win,
.sp-league-table tbody td.data-d,
.sp-league-table tbody td.data-losstwo,
.sp-league-table tbody td.data-gamesplayed,
/* Fallback-Klassen falls andere Tabellen andere Spaltennamen haben */
.sp-league-table tbody td.data-pts,
.sp-league-table tbody td.data-p,
.sp-league-table tbody td.data-w,
.sp-league-table tbody td.data-l,
.sp-league-table tbody td.data-gp {
    background: #eeee22 !important;
    color: #111111 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    text-align: center !important;
}

/* DataTables Controls ausblenden */
.sp-template-league-table .dataTables_wrapper .dataTables_filter,
.sp-template-league-table .dataTables_wrapper .dataTables_length,
.sp-template-league-table .dataTables_wrapper .dataTables_info,
.sp-template-league-table .dataTables_wrapper .dataTables_paginate {
    display: none !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .sp-league-table tbody td.data-name img,
    .sp-league-table .team-logo img,
    .sp-league-table .team-logo {
        display: none !important;
    }
    .sp-league-table tbody td.data-rank,
    .sp-league-table tbody td.data-points,
    .sp-league-table tbody td.data-win,
    .sp-league-table tbody td.data-d,
    .sp-league-table tbody td.data-losstwo,
    .sp-league-table tbody td.data-gamesplayed {
        width: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;
        height: 26px !important;
        line-height: 26px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 400px) {
    /* Nur Pos, Name, Points, Win, Draw, Loss */
    .sp-league-table tbody td.data-gamesplayed {
        display: none !important;
    }
}
