/*
 * What account changes do, said before they happen (accounts review, Oct 8, 2026): the "What
 * changes" list in the Disable confirmation (people/_disable_impact; Admin and My Team) and A-04's
 * "Changing … to …" for a new access level (admin/users/_access_level_changes). A notice whose body
 * is a list (AccountChangesHelper#account_effects_notice).
 */
@layer pages {
  .account-effects__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 2px 0 0;
    padding-left: 18px;
  }
  .account-effects__list li { padding-left: 2px; }

  /* The shared row dialog's frame takes no room (no panel gap) until a row's list arrives. */
  .disable-impact { display: contents; }

  /* A-04: the Job role field appears when Employee is chosen. Without it (a Director) the Access
     level takes one line — its label beside the select, which lines up under Status — so the
     dialog keeps the design's height. */
  .user-form__job-role[hidden] { display: none; }
  .user-form__access:has(+ .user-form__job-role[hidden]) {
    grid-column: 1 / -1;
    flex-flow: row wrap;
    align-items: center;
    column-gap: 16px;
  }
  .user-form__access:has(+ .user-form__job-role[hidden]) > .field__label { flex: 1; }
  .user-form__access:has(+ .user-form__job-role[hidden]) > .input { flex: 0 0 calc(50% - 8px); }
  .user-form__access:has(+ .user-form__job-role[hidden]) > .field__error { flex-basis: 100%; }

  @media (max-width: 767px) {
    .user-form__access:has(+ .user-form__job-role[hidden]) { flex-direction: column; align-items: stretch; }
    .user-form__access:has(+ .user-form__job-role[hidden]) > .input { flex-basis: auto; }
  }
}
