/* The ranking: the look and the names come from tables.css. Without room it leaves out wins, draws and
   losses first, then the games, the difference and the goals; 'compact' leaves out wins, draws and losses. */

td.position,
td.number,
td.pair,
th.number,
th.pair {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

td.position {
    color: var(--muted);
}

td.team {
    width: 100%;
    max-width: 0;
    text-align: left;
}

td.points {
    font-weight: bold;
}

tr.own td {
    font-weight: bold;
}

tr.own td.position {
    box-shadow: inset 0.25rem 0 0 var(--highlight);
    color: var(--text);
}

th.points {
    background-color: var(--highlight);
    color: var(--on-highlight);
}

.compact .detail {
    display: none;
}

@container (max-width: 34rem) {
    .detail {
        display: none;
    }
}

@container (max-width: 28rem) {
    .played {
        display: none;
    }
}

@container (max-width: 21rem) {
    .difference {
        display: none;
    }
}

@container (max-width: 17rem) {
    .goals {
        display: none;
    }
}

/* 'preset': dark with gold, cell by cell like the classic ranking tables it was made after */
.preset th.team {
    text-align: left;
}

.preset .position,
.preset .plus,
.preset .delta {
    text-align: right;
    font-variant-numeric: normal;
}

.preset td.position {
    color: var(--text);
}

.preset th.delta {
    text-align: center;
}

.preset .minus {
    text-align: left;
}

.preset .colon {
    width: 0.5em;
    padding: 0.5em 0;
}

/* the numbers keep their width also with small values: 1.5 of the type size */
.preset th.plus,
.preset th.minus {
    min-width: 1.5em;
}


.preset tr.own td {
    font-weight: normal;
}

.preset tr.own td.position {
    box-shadow: none;
}

/* the names switch where the classic ranking tables did: short names below about 25em of their type */
@container (max-width: 424px) {
    .preset .team .w {
        display: none;
    }

    .preset .team .s {
        display: block;
    }
}

