/* Standings and team pages (Phase 9), on look A's tokens (css/lamplit.css) and the shared parts
   in css/scores.css (.ll-table, .ll-chip, .ll-section, .ll-face). No animation here beyond a
   colour fade, so lamplit.css's reduced-motion block covers it. */

/* ---------------------------------------------------------------------------------------
   Standings tables
   --------------------------------------------------------------------------------------- */

.ll-standings th,
.ll-standings td {
    padding: 7px 6px;
}

/* Header buttons that sort: they look like the plain headers until picked. */
.ll-sort {
    min-height: 32px;
    padding: 0 4px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.ll-sort.is-on {
    color: var(--ll-text);
    box-shadow: inset 0 -2px 0 var(--ll-live);
}

.ll-st-row {
    cursor: pointer;
}

.ll-st-row > * {
    transition: background-color .15s ease;
}

@media (hover: hover) {
    .ll-st-row:hover > * {
        background-color: color-mix(in srgb, var(--ll-text) 6%, var(--ll-surface));
    }
}

/* My team's row: lit in its own colour. A solid mix, so the sticky team cell stays opaque. */
.ll-st-row.is-mine > * {
    background-color: color-mix(in srgb, var(--team-1) 20%, var(--ll-surface));
    font-weight: 700;
}

/* The wild card line, under the second wild card. */
.ll-st-row.is-cut > * {
    border-bottom: 2px dashed color-mix(in srgb, var(--ll-live) 70%, transparent);
}

.ll-standings th.is-name {
    z-index: 1;
}

.ll-st-team {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    color: inherit;
    text-decoration: none;
}

.ll-st-rank {
    min-width: 1.4em;
    color: var(--ll-muted);
    text-align: right;
}

/* The full name only where there's room for it. */
.ll-st-name {
    display: none;
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ll-muted);
    font-weight: 400;
}

@media (min-width: 720px) {
    .ll-st-name {
        display: inline;
    }
}

.ll-st-fav {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ll-live);
}

.ll-standings .is-up {
    color: var(--ll-text);
}

.ll-standings .is-down {
    color: var(--ll-muted);
}

/* ---------------------------------------------------------------------------------------
   A team's page
   --------------------------------------------------------------------------------------- */

.ll-team-link {
    color: inherit;
    text-decoration: none;
}

.ll-team-link:hover,
.ll-team-link:focus-visible {
    text-decoration: underline;
    text-decoration-color: var(--team-1);
    text-underline-offset: 3px;
}

.ll-team-hero {
    overflow: hidden;
}

.ll-team-hero-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ll-team-hero .ll-h1 {
    font-size: 36px;
}

.ll-team-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Season figures: label, value and rank, with a bar that's longer the better the rank. */
.ll-rank-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    margin-bottom: 12px;
    font-size: 14px;
}

.ll-rank-label {
    color: var(--ll-muted);
}

.ll-rank-bar {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 3px;
    background: var(--ll-fill);
    overflow: hidden;
}

.ll-rank-bar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--team-1), var(--team-2));
}

.ll-splits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
}

.ll-split {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ll-leaders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 14px 8px;
}

.ll-leader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    text-align: center;
}

.ll-leader-card .ll-sub {
    max-width: 100%;
}

.ll-leader-value {
    font-family: var(--ll-font-cond);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.ll-roster-head {
    margin: 12px 0 6px;
}

.ll-roster-head:first-of-type {
    margin-top: 0;
}

.ll-roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    column-gap: 16px;
}

.ll-roster-player {
    display: grid;
    grid-template-columns: auto 2.6em minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--ll-line);
    font-size: 14px;
}

.ll-roster-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* The team logo standing in for a missing headshot, in the same round frame. */
.ll-face--logo {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ll-line);
}
