/*
 * The results page and the week links on /upcoming.
 *
 * In the brand's own terms -- ink and navy panels, Barlow Condensed for the
 * labels, scarlet for our side -- as the nav and the Instagram posts are. The
 * old cards were the upcoming page's grey-and-white ones with four stock
 * Material colours for the pills.
 */

.result-weeks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 18px 0 26px;
    font-family: 'Barlow Condensed', var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.result-weeks-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    margin: 0 2px 0 10px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 250, 255, 0.18);
}

.result-weeks a {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(62, 146, 204, 0.35);
    background: rgba(10, 36, 99, 0.35);
    color: var(--brand-paper);
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.result-weeks a:hover { background: rgba(62, 146, 204, 0.25); }

.result-weeks a.active {
    background: var(--brand-red);
    border-color: var(--brand-red);
}

/* -- The week's summary -------------------------------------------------- */

.results-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 26px;
}

.results-stat {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: rgba(10, 36, 99, 0.35);
    border: 1px solid rgba(62, 146, 204, 0.22);
    text-align: center;
}

.results-stat-label,
.result-cols,
.result-day,
.result-verdict {
    font-family: 'Barlow Condensed', var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.results-stat-label { color: var(--text-muted); font-size: 16px; }

.results-stat-value {
    font-family: 'Barlow Condensed', var(--font-sans);
    font-weight: 700;
    font-size: 46px;
    line-height: 1.1;
    color: var(--brand-paper);
    font-variant-numeric: tabular-nums;
}

.results-stat-value.ours { color: var(--brand-blue); }
.results-stat-of { font-size: 24px; color: var(--text-muted); }

.results-stat-pair {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.results-stat-pair > div { display: flex; flex-direction: column; align-items: center; }

.results-stat-who {
    font-family: 'Barlow Condensed', var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    color: var(--text-muted);
}

.results-stat-note { margin-top: 4px; font-size: 13px; color: var(--text-dim); }

/* -- The cards ------------------------------------------------------------- */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    gap: 14px;
}

.result-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 10px;
    border-radius: var(--radius-lg);
    background: rgba(10, 36, 99, 0.32);
    border: 1px solid rgba(62, 146, 204, 0.18);
}

.result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-day { color: var(--text-muted); font-size: 15px; }

.result-verdict {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--brand-paper);
}

.result-verdict.won { background: var(--brand-blue); }
.result-verdict.lost { background: var(--brand-red); }
.result-verdict.push { background: rgba(255, 250, 255, 0.18); }

/* Shared by the heads and the rows, so the numbers sit under their labels. */
.result-cols,
.result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px 64px 44px;
    align-items: center;
    gap: 6px;
}

.result-cols {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.result-cols .ours { color: var(--brand-blue); }

.result-team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 4px 6px;
    margin-left: -6px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
}

/* Our side against the Sunday line, boxed as on the post. */
.result-team.picked {
    border-color: var(--brand-red);
    background: rgba(216, 49, 91, 0.12);
}

/* Paper disc: dark logos vanish on navy. */
.result-disc {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-paper);
    border: 3px solid var(--team-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-disc img { width: 26px; height: 26px; object-fit: contain; }

/* Wraps rather than truncating: "@ Jackso..." is not a team. There are no
   short names in the team data to fall back on. */
.result-name {
    font-weight: 600;
    color: var(--text);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.result-line,
.result-score {
    text-align: center;
    font-family: 'Barlow Condensed', var(--font-sans);
    font-weight: 700;
    font-size: 21px;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.result-line.ours { color: var(--brand-blue); }
.result-score { color: var(--text-muted); }
.result-row.won .result-name,
.result-row.won .result-score { color: var(--brand-paper); font-weight: 700; }

.result-foot {
    margin-top: 2px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 250, 255, 0.08);
    font-size: 13px;
    color: var(--text-dim);
}

.result-foot .closer { color: var(--brand-paper); font-weight: 700; }


@media (max-width: 760px) {
    .results-summary { grid-template-columns: 1fr; gap: 10px; }
    .results-stat { padding: 12px 14px; }
    .results-stat-value { font-size: 38px; }
}

@media (max-width: 420px) {
    .results-grid { grid-template-columns: 1fr; }
    .result-team { min-height: 50px; }
    .result-cols,
    .result-row { grid-template-columns: minmax(0, 1fr) 56px 56px 36px; }
}

/* /upcoming: the week's finished games, under the ones still to play. */
.finished-games { margin-top: 40px; }
.finished-title {
    margin: 0 0 18px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 250, 255, 0.18);
    text-align: center;
    font-family: 'Barlow Condensed', var(--font-sans);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}
