/* ----------------------------------------------------------
   Profiles view
---------------------------------------------------------- */

/* Controls inside profile rows */
.eac-profiles-table .eac-profile-edit-controls label {
    display: block;
    margin-bottom: 4px;
}

.eac-select-short {
    max-width: 8rem;
    width: 100%;
}

.eac-profile-flags {
    margin: 4px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.eac-flag-checkbox {
    font-size: 0.875rem;
}

/* Stack program dropdowns vertically in Profiles view */
.eac-program-selects label {
    display: block;
    margin-bottom: 0.25rem;
}

/* Profiles – Employee: stack Programs / Shift / Edit on a 2nd row */

.eac-wrapper.eac-role-employee .eac-profiles-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: auto;
    column-gap: 8px;
    row-gap: 4px;
}

/* First two cells (e.g., Name/Rank, Supervisor) stay on first row */
.eac-wrapper.eac-role-employee .eac-profiles-table tbody tr > td:nth-child(1),
.eac-wrapper.eac-role-employee .eac-profiles-table tbody tr > td:nth-child(2) {
    grid-column: auto;
}

/* Programs / Shift / Edit and beyond drop to full-width row below.
   If Programs begins at a different column, adjust n+3 accordingly. */
.eac-wrapper.eac-role-employee .eac-profiles-table tbody tr > td:nth-child(n+3) {
    grid-column: 1 / -1;
}

/* Make profile controls wrap neatly */
.eac-wrapper.eac-role-employee .eac-profiles-table .eac-profile-edit-controls,
.eac-wrapper.eac-role-employee .eac-profiles-table .eac-program-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.eac-wrapper.eac-role-employee .eac-profiles-table .eac-profile-edit-controls > *,
.eac-wrapper.eac-role-employee .eac-profiles-table .eac-program-selects > * {
    flex: 1 1 140px;
}
