/* ═══════════════════════════════════════════════════════════════
   SCORERS — Top Scorers / Top Assists leaderboards
   Single source of truth for the markup emitted by
   assets/js/scorers-renderer.js, shared by the league page
   (Statistics tab, Figma 40000241:6941) and the fixture page
   (Scorers tab, Figma 40002017:8239).

   Structure per block (goals / assists):
     .scorers-render-root
       .scorers-tabs > .scorers-tab[data-scorers-tab]
       .scorers-block[data-scorers-panel]
         .stats-podium > .stats-podium-card
         .scorers-table-card > table.scorers-table

   Loaded after the page stylesheet on both pages so these rules
   win the cascade; the page stylesheets no longer carry copies.
   ═══════════════════════════════════════════════════════════════ */

.scorers-render-root {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Pill toggle tabs (Figma 40000241:6942 div.events-filter —
      active pill #6D00CC, inactive 1px #2E2E2E border, radius 20px,
      Montserrat 700/12) ── */
.scorers-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.scorers-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    padding: 6px 16px;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.22;
    white-space: nowrap;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: var(--transition-fast);
}

.scorers-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.scorers-tab.active {
    color: var(--text-white);
    background: var(--accent-purple-dark);
    border-color: var(--accent-purple-dark);
}

/* ── Loading / empty / error states ── */
.scorers-state {
    padding: 32px 16px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

/* ── Top-3 podium cards (Figma 40000241:6945 — column, gap 18px;
      card bg #1C1C1C, 1px #2E2E2E border, radius 8px, padding 24px 12px) ── */
.stats-podium {
    display: flex;
    align-items: stretch;
    gap: 18px;
    margin-bottom: 18px;
}

.stats-podium-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
    padding: 24px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.stats-podium-card:hover {
    border-color: var(--accent-primary);
}

/* Photo with the name pill overlapping underneath (Figma gap -12px) */
.stats-podium-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.stats-podium-photo {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* Deep-purple name chip (Figma fill_KILFXG #2D0054, radius 1000px) */
.stats-podium-name {
    z-index: 1;
    max-width: 110px;
    margin-top: -8px;
    padding: 4px 12px 3px;
    background: var(--bg-footer);
    border-radius: 1000px;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-white);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rank medal icon (assets/images/rank-1|2|3.svg — Figma 32x32) */
.stats-podium-medal {
    width: 32px;
    height: 32px;
}

.stats-podium-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding-top: 12px;
}

/* Stat value — Display/Lg Bold 18 in the brand lime */
.stats-podium-value {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-primary);
}

.stats-podium-team {
    max-width: 140px;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.22;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Leaderboard table card shell (Figma 40000241:6983 div#table-pl) ── */
.scorers-table-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-card);
    overflow: hidden;
}

.scorers-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

/* ── Header row (Montserrat 800/10 uppercase, 5% tracking) ── */
.scorers-table thead th {
    padding: 10px 0;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    color: var(--text-muted);
    background: var(--bg-pill);
    border-bottom: 1px solid var(--border-color);
}

.scorers-table .th-pos {
    width: 52px;
}

.scorers-table .th-player {
    text-align: start;
    padding-inline-start: 14px;
}

.scorers-table .th-goals,
.scorers-table .th-assists {
    width: 107px;
    color: var(--accent-primary);
}

.scorers-table .th-pen {
    width: 96px;
}

/* ── Body rows (1px rgba(255,255,255,0.04) separators) ── */
.scorers-table tbody tr {
    border-bottom: 1px solid var(--border-light);
}

.scorers-table tbody tr:last-child {
    border-bottom: 0;
}

.scorers-table td {
    padding: 0;
    vertical-align: middle;
    color: var(--text-primary);
    border-bottom: none;
}

/* ── Rank cell: zone-style bar + medal icon for the top 3 ── */
.scorers-table .td-pos {
    position: relative;
    width: 52px;
    text-align: center;
}

.scorers-table .z-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--bg-pill);
}

.scorers-table .pos-num {
    display: block;
    padding: 25px 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--text-secondary);
}

/* ── Top-3 medal icon (rank-1/2/3.svg) ── */
.scorers-table .rank-medal {
    display: block;
    width: 18px;
    height: 18px;
    margin: 25px auto;
}

/* ── Player cell (photo 39px + name/team stack) ── */
.scorers-table .td-player {
    text-align: start;
}

.scorers-table .td-player a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-inline-start: 6px;
    color: inherit;
    text-decoration: none;
}

.scorers-table .scorer-photo {
    width: 39px;
    height: 39px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.scorers-table .scorer-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.scorers-table .scorer-name {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.22;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scorers-table .scorer-team {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.22;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Value column (Montserrat 600/12.5, padded 25px like the design) ── */
.scorers-table .td-goals,
.scorers-table .td-assists {
    width: 107px;
    padding: 25px 0;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.scorers-table .td-pen {
    width: 96px;
    padding: 25px 0;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-tertiary);
}

/* ── Top-3 medal highlighting (stat value) ── */
.scorers-table tr.rank-1 .td-goals,
.scorers-table tr.rank-1 .td-assists {
    color: var(--rank-gold);
}

.scorers-table tr.rank-2 .td-goals,
.scorers-table tr.rank-2 .td-assists {
    color: var(--rank-silver);
}

.scorers-table tr.rank-3 .td-goals,
.scorers-table tr.rank-3 .td-assists {
    color: var(--rank-bronze);
}

.scorers-table tr.rank-1 .td-goals,
.scorers-table tr.rank-1 .td-assists,
.scorers-table tr.rank-2 .td-goals,
.scorers-table tr.rank-2 .td-assists,
.scorers-table tr.rank-3 .td-goals,
.scorers-table tr.rank-3 .td-assists {
    font-size: var(--font-size-md);
    font-weight: 500;
}

/* ── Responsive (tablet / mobile) ── */
@media (max-width: 767.98px) {
    .scorers-render-root {
        gap: 14px;
    }

    .stats-podium {
        gap: 12px;
        margin-bottom: 14px;
    }

    .stats-podium-card {
        /* gap: 10px; */
        padding: 18px 8px;
    }

    .stats-podium-photo {
        width: 56px;
        height: 56px;
    }

    .stats-podium-name {
        max-width: 92px;
        font-size: var(--font-size-xs);
    }

    .stats-podium-medal {
        width: 26px;
        height: 26px;
    }

    .stats-podium-value {
        font-size: var(--font-size-md);
    }

    .scorers-tab {
        height: 32px;
        padding: 5px 14px;
        font-size: 11px;
    }

    .scorers-table .th-pos {
        width: 40px;
    }

    .scorers-table .th-goals,
    .scorers-table .th-assists {
        width: 64px;
    }

    .scorers-table .th-pen {
        width: 56px;
    }

    .scorers-table .pos-num {
        padding: 16px 0;
    }

    .scorers-table .rank-medal {
        margin: 16px auto;
    }

    .scorers-table .td-goals,
    .scorers-table .td-assists {
        width: 64px;
        padding: 16px 0;
    }

    .scorers-table .td-pen {
        width: 56px;
        padding: 16px 0;
    }

    .scorers-table .scorer-photo {
        width: 32px;
        height: 32px;
    }

    .scorers-table .scorer-name {
        font-size: 12px;
    }

    .scorers-table .scorer-team {
        font-size: 9px;
    }
}

@media (max-width: 575.98px) {
    .stats-podium-photo {
        width: 48px;
        height: 48px;
    }

    .stats-podium-name {
        max-width: 80px;
        padding: 3px 10px 2px;
    }

    .stats-podium-team {
        max-width: 90px;
    }
}
