/* ----------------------------------------------------------
   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-select-medium {
    max-width: 14rem;
    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;
}

/* Name cell controls (Prefix + AFSC) */
.eac-profiles-table .eac-profile-name-controls {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.eac-profiles-table .eac-profile-name-controls label {
    display: block;
    margin-bottom: 4px;
}

.eac-input-short {
    max-width: 10rem;
    width: 100%;
}

/* Address fields (Profiles view) */
.eac-input-wide {
    max-width: 22rem;
    width: 100%;
}

.eac-profile-address-controls {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eac-profile-address-controls label span {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.eac-city-state-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.eac-city-state-row > label {
    flex: 1 1 160px;
}

.eac-city-state-row > label.eac-state-field {
    flex: 0 0 110px;
}


/* Stack Shift + Skill Level in one cell */
.eac-shift-skill-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eac-profiles-table .eac-skill-level {
    width: 100%;
}

/* Password change controls (Profiles view) */
.eac-password-details {
    margin-top: 8px;
}

.eac-password-details > summary {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.eac-password-details > summary .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.eac-password-fields {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eac-password-fields label span {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.eac-password-hint {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* v1.1.3: ensure profiles table can use full container width */
.eac-profiles-bulk-form,
.eac-profiles-container,
.eac-profiles-wrap{
    width:100% !important;
    max-width:none !important;
}
table.eac-profiles-table,
.eac-profiles-table{
    width:100% !important;
    max-width:none !important;
    table-layout:auto;
}

/* ------------------------------------------------------------
 * Profiles autosave (View Users)
 * ---------------------------------------------------------- */
.eac-autosave-status{
    display:inline-block;
    margin-left:10px;
    font-size:12px;
    line-height:1;
    opacity:.85;
}
.eac-autosave-status[data-mode="saving"]{ opacity:.95; }
.eac-autosave-status[data-mode="saved"]{ opacity:.65; }
.eac-autosave-status[data-mode="error"]{ opacity:1; }

