/* Optional game boxes. Disable ICF_DESKTOP_GAME_SCORES in app/view.php to revert. */
.sheet-game-summary,.card-game-summary{display:none}
.public-site .ko-tree-node .competitor>span.card-game-summary{display:none;flex:none;overflow:visible;white-space:nowrap}
.public-site .ko-tree-node .competitor>.match-entrant-name{flex:1;min-width:0}
@media(min-width:900px){
 .sheet-game-summary{display:flex;align-items:center;gap:6px;flex:none}
 .sheet-game-points{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--sheet-game-box-size,28px);height:var(--sheet-game-box-size,28px);background:#223047;border:0;color:#c6d3e3;font-size:var(--sheet-game-font-size,13px);font-weight:500;font-variant-numeric:tabular-nums;line-height:1}
}
/* On touchscreens the game scores stay in the match-card footer. */
@media(min-width:900px) and (hover:hover) and (pointer:fine){
 :is(.public-site,.organizer-site) .score-match .competitor:has(>.card-game-summary){grid-template-columns:24px minmax(0,1fr) auto var(--result-box-size,28px)}
 .score-match .competitor>.card-game-summary{display:flex;align-items:center;flex:none;gap:var(--card-game-gap,4px);overflow:visible;margin-left:auto}
 .score-match:has(>.score-match-body .card-game-summary)>.match-bottom>.match-bottom-result{display:none}
 .public-site .ko-tree-node .competitor>span.card-game-summary{display:flex;flex:none;gap:var(--card-game-gap,4px);overflow:visible}
}

/* Match totals carry the emphasis; all individual game scores stay neutral. */
.sheet-pairing-row .sheet-games:not(.is-match-winner),
.score-match .competitor:not(.winner)>strong[data-match-score],
.rubber-player .rubber-games:not(.is-rubber-winner){background:#2b405a;color:#f2f5fa;box-shadow:none;font-weight:700}
.sheet-pairing .sheet-pairing-row .sheet-games.is-match-winner,
.score-match .competitor.winner>strong[data-match-score],
.rubber-player .rubber-games.is-rubber-winner{box-shadow:none;font-weight:700}

.sheet-game-points.is-game-winner,.card-game-point.is-game-winner{font-weight:700}

/* Scale score boxes with the visitor text controls and keep their contents centered. */
.public-site.visitor-large-text{--card-game-box-size:26px;--card-game-font-size:13px;--sheet-game-box-size:32px;--sheet-game-font-size:15px;--sheet-match-box-size:36px;--sheet-match-font-size:18px}
.public-site.visitor-extra-large-text{--card-game-box-size:30px;--card-game-font-size:15px;--sheet-game-box-size:36px;--sheet-game-font-size:17px;--sheet-match-box-size:40px;--sheet-match-font-size:21px}
.score-match .competitor>strong[data-match-score],.rubber-player .rubber-games,.sheet-pairing-row .sheet-games{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0;line-height:1}
.public-site.visitor-large-text .sheet-pairing-row .sheet-games{flex-basis:var(--sheet-match-box-size);width:var(--sheet-match-box-size);height:var(--sheet-match-box-size);font-size:var(--sheet-match-font-size)}

/* Tree names shrink; individual points remain beside the games-won box. */
:is(.public-site,.organizer-site) .ko-tree-node .score-match .competitor{display:flex;min-width:0}
:is(.public-site,.organizer-site) .ko-tree-node .score-match .competitor>.match-entrant-name{display:block;flex:1 1 0;width:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:900px) and (hover:hover) and (pointer:fine){
 :is(.public-site,.organizer-site) .ko-tree-node .score-match .competitor>span.card-game-summary{display:flex;flex:0 0 auto;width:auto;min-width:0;max-width:none;margin-left:0;overflow:visible;gap:var(--card-game-gap,4px)}
 :is(.public-site,.organizer-site) .ko-tree-node .score-match .competitor>strong[data-match-score]{flex:0 0 auto}
}
