/*
 * EMS roster row alignment layer
 * 2026-09-23
 *
 * Purpose:
 * - Keep the primary control/content lane horizontally level across each roster row.
 * - Normalize input/select/button heights without changing stored values or behavior.
 * - Preserve all existing row backgrounds, alternating shades/gradients, pledge colors,
 *   and ConOps yellow/orange Variant distinction colors.
 *
 * This stylesheet intentionally contains no background-color or text-color rules.
 */

/* Shared table-cell alignment for marked roster tables. */
table.ems-roster-aligned > tbody > tr > td {
    box-sizing: border-box;
}

/*
 * Mission Sign-Up rosters
 * Main controls share the same top edge and control height. Lookup/status text may
 * continue below the control without shifting the neighboring row controls.
 */
#signupTable.ems-roster-aligned > tbody > tr > td {
    vertical-align: top !important;
}

#signupTable.ems-roster-aligned {
    --ems-roster-control-height: 36px;
}

#signupTable.ems-roster-aligned input.roster-control,
#signupTable.ems-roster-aligned select.roster-control,
#signupTable.ems-roster-aligned button.roster-control,
#signupTable.ems-roster-aligned input.mech-id-lookup,
#signupTable.ems-roster-aligned input.mech-variant-select,
#signupTable.ems-roster-aligned select.mech-variant-select,
#signupTable.ems-roster-aligned .pledge-row-btn {
    box-sizing: border-box !important;
    height: var(--ems-roster-control-height) !important;
    min-height: var(--ems-roster-control-height) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    vertical-align: top !important;
}

#signupTable.ems-roster-aligned .mech-choice-cell,
#signupTable.ems-roster-aligned .adv-mech-choice-cell {
    min-height: var(--ems-roster-control-height);
    align-items: start !important;
}

#signupTable.ems-roster-aligned .row-number {
    vertical-align: top !important;
    line-height: var(--ems-roster-control-height) !important;
}

#signupTable.ems-roster-aligned .row-action {
    vertical-align: top !important;
}

#signupTable.ems-roster-aligned .mech-lookup-status {
    margin-top: 2px !important;
    margin-bottom: 0 !important;
}

/* Preserve the compact tablet/kiosk profile dimensions. */
.mission-device-layout #signupTable.ems-roster-aligned {
    --ems-roster-control-height: 30px;
}

/*
 * ConOps rosters
 * Only tables detected as Pilot Rosters are marked. Queue/history summary tables
 * are untouched. Cell padding is normalized to the signup roster's base inset and
 * all displayed values, including Mech Choice, sit on the same vertical centerline.
 */
body.conops-page table.ems-roster-aligned > thead > tr > th,
body.conops-page table.ems-roster-aligned > tbody > tr > td {
    vertical-align: middle !important;
}

body.conops-page table.ems-roster-aligned > tbody > tr > td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

body.conops-page table.ems-roster-aligned > tbody > tr > td.ems-conops-variant-mech-cell {
    vertical-align: middle !important;
}
