/* Lineup requirements styles (plan:
 * work_logs/team_submission/team_submission_plan.md §5c).
 *
 * The grid and row styles match team.php's .team_grid / .row /
 * .header_element (and .team_total_row for the sport total row); every
 * selector is scoped under .lineup_requirements so a consuming page's
 * copies of those rules cannot override the component's layout (the
 * scoped selectors win on specificity), and team.php's own copies can be
 * dropped without touching this file. */

.lineup_requirements .team_grid {
    display: grid;
    /* Lineup mode: three fixed columns (Position | Slots | Filled),
     * last column at least 10em wide. */
    grid-template-columns: max-content max-content minmax(10em, max-content);
    gap: 2px 10px;
}

/* Roster mode (render() adds the lineup_roster modifier class for a
 * mode: 'roster' payload): five columns (Position | Min | Max | Active |
 * Rostered), the shape team.php's own requirements tables had. */
.lineup_requirements.lineup_roster .team_grid {
    grid-template-columns: max-content max-content max-content max-content minmax(10em, max-content);
}

.lineup_requirements .team_grid .row {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: center;
    gap: 25px;
}

.lineup_requirements .header_element { border-bottom: 1px solid black; }

.lineup_requirements .team_total_row {
    border-top: 1px solid black;
    font-weight: bolder;
}

/* Out-of-range count: red and bold (the Filled cell in lineup mode, the
 * Rostered cell in roster mode). */
.lineup_requirements .lineup_count_bad {
    color: red;
    font-weight: bolder;
}

/* The unsaved-changes notice is placed by the page next to its Submit
 * button, OUTSIDE the render() container, so it cannot be scoped under
 * .lineup_requirements. It is a visible callout: red text on a tinted,
 * bordered background. */
.lineup_notice {
    display: inline-block;
    margin: 5px 0;
    padding: 4px 10px;
    border: 1px solid #b00;
    background: #fff4f4;
    color: #b00;
    font-weight: bolder;
}
