/* ==========================================================================
   Perfect Game - Event Top Performers (events/Stats/TopPerformers.aspx).

   Draws on the leaderboard scale, so this page reads as the same product as
   Stats/Leaderboard.aspx, a player profile and a team page. Shared pieces -
   the source picker, the empty and error states - live in Stats.Shared.css.

   The board is not a stat-per-column table. Each row carries one score and a
   cloud of contributing stats, so the stat cell holds chips rather than cells.
   That is why this file exists instead of reusing .stat-table.
   ========================================================================== */

.tp {
    font-family: var(--lb-body);
    color: var(--lb-dark);
}

.tp a {
    color: var(--lb-green);
    text-decoration: none;
}

.tp a:hover {
    color: var(--lb-green-dk);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Section bar
   -------------------------------------------------------------------------- */

.tp-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: var(--lb-panel);
    border-left: 3px solid var(--lb-green);
    padding: 8px 12px;
    font-family: var(--lb-head);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--lb-dark);
}

.tp-section-note,
.tp-count {
    font-family: var(--lb-body);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lb-quiet);
}

.tp-spacer {
    flex: 1;
}

@media (max-width: 767px) {
    .tp-section {
        align-items: flex-start;
    }

    .tp-spacer {
        flex-basis: 100%;
        height: 0;
    }
}

/* --------------------------------------------------------------------------
   Podium - the best three under the current filters
   -------------------------------------------------------------------------- */

.tp-podium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.tp-pod {
    background: #fff;
    border: 1px solid var(--lb-line);
    border-radius: var(--lb-r);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease;
}

.tp-pod:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
}

.tp-pod-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--lb-dark);
    border-left: 4px solid var(--lb-green);
    padding: 9px 12px;
}

.tp-pod-title {
    font-family: var(--lb-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
}

.tp-pod-tag {
    font-family: var(--lb-head);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
}

.tp-pod-body {
    padding: 15px 14px 13px;
}

.tp-pod-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tp-pod-score {
    font-family: var(--lb-head);
    font-size: 40px;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: var(--lb-green);
    font-variant-numeric: tabular-nums;
}

.tp-pod-who {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}

.tp-pod-label {
    display: block;
    font-family: var(--lb-head);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lb-faint);
}

.tp a.tp-pod-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--lb-dark);
    line-height: 1.15;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp a.tp-pod-name:hover {
    color: var(--lb-green);
    text-decoration: none;
}

.tp-pod-meta {
    font-size: 11.5px;
    color: var(--lb-quiet);
    margin-top: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-pod-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #e2e2e2;
}

/* --------------------------------------------------------------------------
   Chips - one contributing stat each
   -------------------------------------------------------------------------- */

.tp-chip {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--lb-mute);
    background: var(--lb-bg);
    border: 1px solid #e2e2e2;
    border-radius: var(--lb-r);
    padding: 3px 7px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tp-chip.is-good {
    color: var(--lb-green-dk);
    background: rgba(64, 168, 76, 0.10);
    border-color: rgba(64, 168, 76, 0.30);
}

.tp-chip.is-zero {
    color: var(--lb-faint);
}

.tp-pod-chips .tp-chip {
    font-size: 11px;
}

/* --------------------------------------------------------------------------
   Toolbar - phase tabs, stat source and search. Sticks to the top so the
   controls stay reachable while a hundred rows scroll under them.
   -------------------------------------------------------------------------- */

.tp-toolbar-wrap {
    position: sticky;
    top: var(--pg-stats-head-h);
    z-index: 30;
    background: var(--lb-bg);
    padding: 16px 0 10px;
}

.tp-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--lb-line);
    border-radius: var(--lb-r);
}

.tp-tabs {
    display: flex;
    align-self: stretch;
    align-items: flex-end;
    border-bottom: 3px solid var(--lb-line);
}

.tp-tab,
a.tp-tab {
    font-family: var(--lb-head);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 20px;
    min-height: 44px;
    cursor: pointer;
    border: 1px solid var(--lb-line);
    border-bottom: 3px solid transparent;
    border-radius: var(--lb-r) var(--lb-r) 0 0;
    margin-bottom: -3px;
    margin-left: -1px;
    background: var(--lb-bg);
    color: var(--lb-mute);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color .18s ease, color .18s ease;
}

.tp-tab:hover,
a.tp-tab:hover {
    background: #eef0f2;
    color: var(--lb-dark);
    text-decoration: none;
}

.tp-tab.active,
a.tp-tab.active,
a.tp-tab.active:hover {
    background: var(--lb-dark);
    color: #fff;
    border-bottom-color: var(--lb-green);
}

.tp-toolbar-sep {
    width: 1px;
    height: 26px;
    background: #e6eae6;
}

/* The picker stacks its label over its buttons here, so the toolbar reads as
   one row of controls rather than a label chasing its buttons along the line. */
.tp-toolbar .sv2-filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.tp-toolbar .sv2-filter-label {
    font-family: var(--lb-body);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lb-mute);
}

.tp-search {
    font-family: var(--lb-body);
    font-size: 14px;
    padding: 11px 13px;
    min-height: 44px;
    width: 220px;
    border: 1px solid var(--lb-input);
    border-radius: var(--lb-r);
    background: #fff;
    color: var(--lb-dark);
}

.tp-search:focus {
    border-color: var(--lb-green);
    outline: none;
}

@media (max-width: 767px) {
    .tp-toolbar-sep {
        display: none;
    }

    .tp-tabs {
        width: 100%;
    }

    .tp-tab,
    a.tp-tab {
        flex: 1 1 0;
        justify-content: center;
        padding: 12px 10px;
    }

    .tp-toolbar .sv2-filter-row,
    .tp-search {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Board - wide screens
   -------------------------------------------------------------------------- */

.tp-table-wrap {
    background: #fff;
    border: 1px solid var(--lb-line);
    border-radius: var(--lb-r);
    overflow: hidden;
}

.tp-table-scroll {
    overflow-x: auto;
}

.tp-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    background: #fff;
}

.tp-table thead tr {
    background: var(--lb-dark);
}

.tp-table th {
    background: var(--lb-dark);
    font-family: var(--lb-head);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
    padding: 13px 12px;
    border: 0;
    white-space: nowrap;
}

/* Rank and player stay put while the stats scroll sideways. */
.tp-table th.tp-who,
.tp-table td.tp-who {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 300px;
    min-width: 300px;
    border-right: 1px solid var(--lb-line-soft);
}

.tp-table th.tp-who {
    z-index: 3;
    padding: 0 14px;
    border-right-color: rgba(255, 255, 255, 0.08);
}

.tp-th-mini {
    font-family: var(--lb-head);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    display: inline-flex;
    align-items: center;
    height: 46px;
}

.tp-th-mini.is-rank {
    width: 49px;
}

.tp-table th.tp-th-score {
    width: 92px;
    text-align: right;
    font-weight: 700;
    color: #fff;
    background: rgba(64, 168, 76, 0.22);
    padding: 13px 10px;
}

.tp-table th.tp-th-grad {
    width: 92px;
    text-align: right;
    padding: 13px 10px;
}

.tp-row {
    border-bottom: 1px solid var(--lb-line-soft);
    background: #fff;
    transition: background-color .12s ease;
}

.tp-row td {
    padding: 10px 12px;
    vertical-align: middle;
}

.tp-table td.tp-who {
    background: #fff;
    padding: 10px 14px;
    border-left: 3px solid transparent;
}

.tp-row:hover {
    background: #f4f9f5;
}

.tp-row:hover td.tp-who {
    background: #f4f9f5;
    border-left-color: var(--lb-green);
}

.tp-who-inner {
    display: flex;
    align-items: center;
    gap: 11px;
}

.tp-rank {
    font-family: var(--lb-head);
    font-size: 14px;
    font-weight: 700;
    min-width: 38px;
    height: 30px;
    flex: 0 0 38px;
    border-radius: var(--lb-r);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lb-panel);
    color: var(--lb-mute);
}

.tp-rank.is-top {
    background: var(--lb-line-soft);
    color: var(--lb-dark);
}

.tp-rank.is-first {
    background: var(--lb-dark);
    color: #fff;
}

.tp-names {
    min-width: 0;
    flex: 1;
}

.tp a.tp-name {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--lb-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp a.tp-name:hover {
    color: var(--lb-green);
    text-decoration: none;
}

.tp a.tp-team {
    display: block;
    font-size: 11.5px;
    color: var(--lb-quiet);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp a.tp-team:hover {
    color: var(--lb-green-dk);
    text-decoration: none;
}

.tp-table td.tp-score {
    width: 92px;
    text-align: right;
    font-family: var(--lb-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--lb-dark);
    font-variant-numeric: tabular-nums;
    background: rgba(64, 168, 76, 0.05);
}

.tp-row:hover td.tp-score {
    background: rgba(64, 168, 76, 0.10);
}

.tp-table td.tp-stats {
    min-width: 300px;
}

.tp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tp-table td.tp-grad {
    width: 92px;
    text-align: right;
    font-size: 13.5px;
    color: var(--lb-mute);
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Board - phones. Each row becomes a card.
   -------------------------------------------------------------------------- */

.tp-cards {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.tp-card {
    background: #fff;
    border: 1px solid var(--lb-line);
    border-left: 3px solid var(--lb-line);
    border-radius: var(--lb-r);
    padding: 12px 13px;
}

.tp-card.is-top {
    border-left-color: var(--lb-green);
}

.tp-card-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.tp-card .tp-rank {
    font-size: 15px;
    height: 32px;
}

.tp-card-who {
    flex: 1;
    min-width: 0;
}

.tp a.tp-card-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--lb-dark);
}

.tp a.tp-card-team {
    display: block;
    font-size: 12.5px;
    color: var(--lb-quiet);
    margin-top: 2px;
}

.tp-card-grad {
    display: block;
    font-size: 12px;
    color: var(--lb-faint);
    margin-top: 1px;
}

.tp-card-score-wrap {
    text-align: right;
}

.tp-card-score {
    display: block;
    font-family: var(--lb-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--lb-green);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tp-card-score-label {
    display: block;
    font-family: var(--lb-head);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lb-faint);
    margin-top: 3px;
}

.tp-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--lb-line-soft);
}

@media (max-width: 859px) {
    .tp-table-wrap {
        display: none;
    }

    .tp-cards {
        display: flex;
    }
}

/* --------------------------------------------------------------------------
   No search match. Server-rendered empty states use .sv2-empty; this one is
   raised by the client filter, so it ships hidden.
   -------------------------------------------------------------------------- */

.tp-nomatch {
    display: none;
    background: #fff;
    border: 1px dashed var(--lb-input);
    border-radius: var(--lb-r);
    padding: 48px 24px;
    text-align: center;
}

.tp-nomatch.is-on {
    display: block;
}

.tp-nomatch-head {
    font-family: var(--lb-head);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--lb-dark);
}

.tp-nomatch-body {
    font-size: 14px;
    color: var(--lb-mute);
    margin-top: 8px;
    line-height: 1.55;
}

