/*
 * Liigabrändi tummille tulostaulusivuille (leaderboard, lähtöryhmät, liigatilanne).
 * Ladataan vain liigaturnauksissa, sivujen omien tyylien jälkeen.
 */

header.has-league { border-bottom: 3px solid var(--league-primary); position: relative; }
header.has-league .tabs a.active { border-bottom-color: var(--league-primary); }
header.has-league .league-title-line { color: #cfe0ee; }

header .league-mark { position: absolute; right: 1.5rem; top: 1.1rem; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
header .league-mark img { height: 34px; width: auto; display: block; }
header .league-mark .lbl { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8a9bb0; white-space: nowrap; }
header .league-mark .lbl b { color: #fff; font-weight: 600; }

body.has-league .score-toggle button.toggle-active,
.series-toggle button.on { background: var(--league-primary); color: var(--league-on-primary); }

footer .league-foot { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; flex-wrap: wrap; justify-content: center; }
footer .league-foot img { height: 16px; width: auto; opacity: 0.85; }

@media (max-width: 700px) {
    header.has-league h1, header.has-league .meta { padding-right: 105px; }
    header .league-mark { right: 1rem; top: 0.85rem; }
    header .league-mark img { height: 24px; }
    header .league-mark .lbl { display: none; }
    .tabs a { padding: 0.55rem 0.7rem; }
}

/* Liigatilanne */
.league-strip { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 1.5rem; background: var(--league-primary); color: var(--league-on-primary); flex-wrap: wrap; }
.league-strip img { height: 40px; width: auto; display: block; }
.league-strip .t { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.league-strip .s { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.92; }

.series-toggle { display: none; background: #1f3d59; border-radius: 20px; padding: 3px; gap: 2px; width: max-content; margin: 0 0 12px auto; }
.series-toggle button { border: none; border-radius: 16px; padding: 5px 16px; font-size: 0.8rem; font-weight: 600; cursor: pointer; background: transparent; color: #8a9bb0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.col h2 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.col h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--league-primary); flex-shrink: 0; }
.no-data { text-align: center; color: #6b7c93; padding: 3rem 1rem; }
.league-note { margin-top: 1rem; font-size: 0.75rem; color: #6b8299; }

table.standings { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
table.standings th { background: #1a2738; color: #8a9bb0; padding: 0.55rem 0.5rem; text-align: center; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid var(--league-primary); vertical-align: bottom; }
table.standings th .course { display: block; font-size: 0.6rem; color: #6b7c93; text-transform: none; letter-spacing: 0.02em; margin-top: 2px; }
table.standings th .tag-prov { display: inline-block; background: #ffb200; color: #000; border-radius: 4px; padding: 1px 6px; font-size: 0.58rem; margin-left: 4px; }
table.standings th.left, table.standings td.left { text-align: left; }
table.standings tbody tr:nth-child(even) { background: #102336; }
table.standings td { padding: 0.6rem; text-align: center; border-bottom: 1px solid #1a2435; }
table.standings tr.prize td { background: rgba(255, 255, 255, 0.07); }
table.standings td.pos { font-weight: 700; color: #ffb200; white-space: nowrap; }
table.standings tr.incomplete td { opacity: 0.6; }
table.standings tr.incomplete td.pos { color: #6b7c93; font-weight: 400; }
table.standings tr.incomplete-first td { border-top: 2px solid #1f3d59; }
table.standings td.name { font-weight: 600; }
table.standings td.name small { color: #6b7c93; font-weight: 400; margin-left: 6px; white-space: nowrap; }
table.standings td.total { font-weight: 800; font-size: 1.1rem; color: #fff; }
table.standings td.prov { font-style: italic; }
table.standings td.dropped, table.standings td.dropped span { color: #3f5f7d; text-decoration: line-through; }
table.standings td.dnp { color: #2a3d50; }
table.standings td.fill::after { content: "*"; font-size: 0.7em; vertical-align: super; }
table.standings td .sub { display: block; font-size: 0.68rem; color: #6b7c93; font-weight: 400; }
table.standings .rank-badge { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; padding: 0 6px; border-radius: 11px; background: var(--league-primary); color: var(--league-on-primary); font-size: 0.72rem; font-weight: 700; text-align: center; }
.stp-e { color: #8a9bb0; } .stp-under { color: #27a350; } .stp-over { color: #ff6b6b; }

@media (max-width: 1100px) {
    .series-toggle { display: flex; }
    .two-col { grid-template-columns: 1fr; }
    .two-col.show-scratch .col-hcp, .two-col.show-hcp .col-scratch { display: none; }
    .col h2 { display: none; }
}

@media (max-width: 600px) {
    .league-strip { padding: 0.9rem 1rem; gap: 0.6rem; }
    .league-strip img { height: 26px; }
    .league-strip .t { font-size: 1.2rem; }
    table.standings { font-size: 0.85rem; }
    table.standings th { padding: 0.4rem 0.2rem; font-size: 0.6rem; }
    table.standings td { padding: 0.5rem 0.2rem; }
    table.standings th .course, table.standings th .tag-prov, table.standings .col-played, table.standings td.name small { display: none; }
}
