/* Senior Presidents - just the bits practice.css/match.css/competition-header.css
   don't already cover. The scorecard and shot boxes are borrowed from
   match.css's real scorecard styling via the .edit-mode class - see
   JS/senior-presidents-competition.js. Unlike pairs/trebles, entrants render
   as rows in one flat table per round rather than per-entrant cards (there
   can be up to 10 rows in Round 1), so most of pairs-competition.css's
   pair-card/shooter-picker rules don't apply here. */

/* Tab bar - one tab per round this roster's field actually plays (see
   roundsPlan()), plus a fixed Standings tab. Same look as Fred Leak's own
   tab bar (CSS/fred-leak-competition.css), duplicated here under neutral
   class names since the two pages don't share a stylesheet. */
.comp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.comp-tab-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e0d6c8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.comp-tab-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.comp-tab-btn.active {
    color: #18181b;
    background: #d4a017;
    border-color: #d4a017;
}

.comp-tab-section[hidden] {
    display: none;
}

/* A decided round's own tab: its standings summary, then a "Scorecards"
   heading straight after it - match.css's .column-title only has a
   margin-bottom, so without this the heading sits flush against the
   standings table above it (same gap fix as Fred Leak's own CSS). */
[id$="DecidedWrap"] > div + h3.column-title {
    margin-top: 24px;
}

/* "Start Tie-Breaker"/"Advance" sit below the table they act on, not up in
   the section header, so each reads as "next" rather than a detached
   toolbar action. */
#presCurrentRoundWrap + .practice-actions,
#presStandingsWrap + .practice-actions {
    margin-top: 24px;
}

/* "Firing N shots" + the editor's "Change" button - sits between the
   tie-breaker's intro paragraph and its standings, so it reads as a
   property of the tie-breaker itself rather than another toolbar action. */
#presReshootShotsBar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #e0d6c8;
    font-size: 0.9rem;
}

#presReshootShotsBar:empty {
    display: none;
    margin-bottom: 0;
}

/* match.css's .edit-lock-bar is display:flex, which - being an author rule -
   always beats the UA [hidden] stylesheet rule regardless of specificity
   (origin outranks both). This bar is static markup that starts hidden. */
#presLockBar[hidden] {
    display: none;
}

#presReshootSection .login-intro {
    margin-bottom: 20px;
    line-height: 1.5;
}

#presReshootStandingsWrap:not(:empty) + #presReshootWrap {
    margin-top: 24px;
}

/* Each already-cut round's read-only scorecard, stacked with room between
   them so the otherwise identical-looking tables (same shot columns as the
   live round above) don't run together. Shown chronologically (Round 1
   first), the reverse of Placings, since this reads as "how we got here". */
.round-history-group + .round-history-group {
    margin-top: 28px;
}

/* Winner/runner-up summary shown in the header once results are submitted -
   same styling as League Pairs' own results summary. */
.results-summary {
    margin: 20px auto 0;
    max-width: 360px;
    border: 2px solid #d4a017;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 14px rgba(212, 160, 23, 0.25);
}

.results-summary-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.04);
}

.results-summary-table td {
    padding: 10px 14px;
    text-align: left;
    color: #e0d6c8;
    font-size: 0.92rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.results-summary-table tr:first-child td {
    border-top: none;
}

.results-place {
    font-weight: 700;
    color: #d4a017;
    white-space: nowrap;
}

.results-row-winner {
    background: rgba(212, 160, 23, 0.18);
}

.results-row-winner td {
    color: #ffd873;
}

.results-row-winner .results-place {
    color: #d4a017;
    text-shadow: 0 0 8px rgba(212, 160, 23, 0.4);
}
