/* ── TPC Classifica — eaglesgolf.it ──
   Portato da eagles/assets/the-players.css
   Cache-bust: ?v=20260406b
*/

:root {
    --tpc-blue: #155d98;
    --tpc-blue-deep: #0f3660;
    --tpc-header-line: rgba(255,255,255,0.14);
    --tpc-sheet: #f5f2ed;
    --tpc-sheet-line: rgba(17, 24, 39, 0.15);
    --tpc-sheet-text: #111827;
    --tpc-total: #c91f1f;
    --tpc-player-col-width: 22%;
    --tpc-result-col-width: calc(78% / 11);
}

/* ── Hero TPC ── */
.tpc-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 26px 30px 24px;
    background:
        linear-gradient(90deg, rgba(21, 93, 152, 0.96) 0%, rgba(18, 67, 111, 0.96) 42%, rgba(16, 18, 24, 0.96) 100%);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
    isolation: isolate;
}
.tpc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(255,255,255,0.14) 0 1px, transparent 1.5px 100%);
    background-size: 12px 12px;
    opacity: .28;
    mix-blend-mode: screen;
    pointer-events: none;
}
.tpc-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
}
.tpc-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.16);
    color: rgba(255,255,255,0.92);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 800;
}
.tpc-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
}
.tpc-mark {
    width: 112px;
    height: 112px;
    flex: 0 0 auto;
    display: block;
}
.tpc-title {
    display: grid;
    gap: 4px;
}
.tpc-title strong,
.tpc-title span {
    font-family: var(--eagles-heading-family, "Montserrat", sans-serif);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: .92;
    color: #fff;
}
.tpc-title strong {
    font-size: clamp(46px, 7vw, 88px);
}
.tpc-title span {
    font-size: clamp(32px, 5.4vw, 68px);
}
.tpc-subtitle {
    margin: 14px 0 0;
    max-width: 720px;
    color: rgba(255,255,255,0.78);
    font-size: 15px;
    line-height: 1.6;
}
.tpc-summary {
    min-width: 240px;
    display: grid;
    gap: 8px;
    padding: 20px 22px;
    border-radius: 22px;
    border: 1px solid var(--tpc-header-line);
    background: rgba(10, 12, 16, 0.24);
    backdrop-filter: blur(8px);
}
.tpc-summary label {
    color: rgba(255,255,255,0.58);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.tpc-summary strong {
    font-family: var(--eagles-heading-family, "Montserrat", sans-serif);
    font-size: 38px;
    line-height: .95;
    color: #fff;
}
.tpc-summary span {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 600;
}

/* ── Sheet container ── */
.tpc-sheet {
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--tpc-sheet);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ── Table base ── */
.tpc-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--tpc-sheet-text);
}
.tpc-table th,
.tpc-table td {
    padding: 0;
    border-right: 1px solid var(--tpc-sheet-line);
    border-bottom: 1px solid var(--tpc-sheet-line);
    text-align: center;
    vertical-align: middle;
}

/* ── Thead ── */
.tpc-table thead th {
    background: #e8e2dc;
}

/* Player hero cell (logo) */
.tpc-table thead .tpc-player-hero {
    position: sticky;
    left: 0;
    z-index: 7;
    width: var(--tpc-player-col-width);
    min-width: var(--tpc-player-col-width);
    padding: 0;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(21, 93, 152, 0.96) 0%, rgba(18, 67, 111, 0.96) 42%, rgba(16, 18, 24, 0.96) 100%);
    border-right: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid var(--tpc-sheet-line);
    overflow: hidden;
}
.tpc-player-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(255,255,255,0.14) 0 1px, transparent 1.5px 100%);
    background-size: 12px 12px;
    opacity: .24;
    mix-blend-mode: screen;
    pointer-events: none;
}
.tpc-player-hero-inner {
    position: relative;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 24px;
}
.tpc-player-hero-logo {
    width: min(360px, 92%);
    height: 56px;
    max-height: 56px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

/* Stage head colors */
.tpc-table thead .tpc-stage-head-barialto {
    background: #0d72b9;
    color: #ffffff;
}
.tpc-table thead .tpc-stage-head-external {
    background: #0a537f;
    color: #ffffff;
}
.tpc-table thead .tpc-stage-head-team {
    background: #f69220;
    color: #ffffff;
}

/* First row: venue names */
.tpc-table thead tr:first-child th {
    height: 34px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ffffff;
}
/* Second row: dates */
.tpc-table thead tr:nth-child(2) th {
    height: 40px;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #374151;
}
.tpc-table thead tr:first-child .tpc-stage-head-barialto,
.tpc-table thead tr:first-child .tpc-stage-head-external,
.tpc-table thead tr:first-child .tpc-stage-head-team,
.tpc-table thead tr:nth-child(2) .tpc-stage-head-barialto,
.tpc-table thead tr:nth-child(2) .tpc-stage-head-external,
.tpc-table thead tr:nth-child(2) .tpc-stage-head-team {
    color: #ffffff;
}

/* ── Colgroup widths ── */
.tpc-col-player { width: var(--tpc-player-col-width); }
.tpc-col-result { width: var(--tpc-result-col-width); }

/* ── Player column (sticky left) ── */
.tpc-table .tpc-player-col {
    position: sticky;
    left: 0;
    z-index: 3;
    padding-left: 28px;
    text-align: left;
    background: #f7f3ee;
}
.tpc-player-col-custom {
    width: var(--tpc-player-col-width);
    min-width: var(--tpc-player-col-width);
}
.tpc-table thead .tpc-player-col { z-index: 5; }
.tpc-table th:not(.tpc-player-col):not(.tpc-total-col),
.tpc-table td:not(.tpc-player-col):not(.tpc-total-col) {
    width: var(--tpc-result-col-width);
}

/* ── Total column (sticky right) ── */
.tpc-table .tpc-total-col {
    position: sticky;
    right: 0;
    z-index: 4;
    width: var(--tpc-result-col-width);
    min-width: var(--tpc-result-col-width);
    background: var(--tpc-total);
    color: #fff;
    border-right: 0;
}
.tpc-table thead .tpc-total-col {
    z-index: 6;
    color: #ffffff;
    font-weight: 900;
}

/* ── Body cells ── */
.tpc-table tbody td {
    height: 42px;
    font-size: 15px;
    font-weight: 800;
}
.tpc-table tbody .tpc-player-col {
    padding: 0 18px 0 20px;
}

/* Player cell grid */
.tpc-player-cell {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 42px;
}

/* Rank badge */
.tpc-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(17,24,39,0.12);
    color: #374151;
    font-size: 11px;
    font-weight: 800;
}

/* Player name */
.tpc-player-name {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
}

/* ── Score cells ── */
.tpc-score.is-empty {
    color: #b4a9a0;
    font-weight: 600;
}
.tpc-score.is-future {
    color: #c4b8ae;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* Score pill */
.tpc-score-pill {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.tpc-score-pill.barialto { background: #0d72b9; }
.tpc-score-pill.external { background: #0a537f; }
.tpc-score-pill.team { background: #f69220; }

/* Discarded / zero */
.tpc-score-discard {
    color: #9ca3af;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.tpc-score.is-zero { color: #7c4d4d; }

/* Total value */
.tpc-total-value {
    font-family: var(--eagles-heading-family, "Montserrat", sans-serif);
    font-size: 22px;
    color: #ffffff;
    font-weight: 800;
}

/* ── Mobile cards ── */
.tpc-mobile-list { display: none; }

.tpc-mobile-card {
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    overflow: hidden;
    margin-bottom: 8px;
}
.tpc-mobile-summary {
    margin: 0;
    padding: 18px 18px 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    list-style: none;
    cursor: pointer;
}
.tpc-mobile-summary::-webkit-details-marker { display: none; }
.tpc-mobile-summary::marker { content: ''; }

.tpc-mobile-name { display: grid; gap: 4px; }
.tpc-mobile-name strong {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: #fff;
}
.tpc-mobile-total { text-align: right; }
.tpc-mobile-total strong {
    display: block;
    font-family: var(--eagles-heading-family, "Montserrat", sans-serif);
    font-size: 28px;
    line-height: .9;
    color: #fff;
}
.tpc-mobile-total label {
    color: rgba(255,255,255,0.56);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 800;
}

.tpc-mobile-grid {
    padding: 0 18px 18px;
    display: grid;
    gap: 8px;
}
.tpc-mobile-stage {
    min-height: 34px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tpc-mobile-stage.barialto {
    background: rgba(13, 114, 185, 0.16);
    border-color: rgba(13, 114, 185, 0.24);
}
.tpc-mobile-stage.external {
    background: rgba(10, 83, 127, 0.18);
    border-color: rgba(10, 83, 127, 0.28);
}
.tpc-mobile-stage.team {
    background: rgba(246, 146, 32, 0.18);
    border-color: rgba(246, 146, 32, 0.28);
}
.tpc-mobile-stage.empty {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}
.tpc-mobile-stage-value {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
}
.tpc-mobile-stage.empty .tpc-mobile-stage-value {
    color: #c4b8ae;
    font-size: 12px;
}
.tpc-mobile-stage.discard .tpc-mobile-stage-value {
    color: #9ca3af;
}

/* ── Responsive ── */
@media (max-width: 980px) {
    .tpc-sheet { display: none; }
    .tpc-mobile-list { display: flex; flex-direction: column; gap: 8px; }
    .tpc-hero { padding: 20px; border-radius: 20px; }
    .tpc-hero-grid { grid-template-columns: 1fr; }
    .tpc-mark { width: 72px; height: 72px; }
    .tpc-title strong { font-size: 36px; }
    .tpc-title span { font-size: 26px; }
    .tpc-summary { min-width: 0; }
}
