/* The approved HR directory frame is the layout for this page at both widths; type, fields, cards,
   avatars and status words are the shared rules. */

/* Search takes two shares and the four selects one each, on one row. */
#akashic-health-records-patient-portal-root .staff-directory-filters {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

#akashic-health-records-patient-portal-root .staff-directory-filter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
}

#akashic-health-records-patient-portal-root .staff-directory-clear {
  grid-column: 1 / -1;
}

/* The row: avatar, name and role line, and the state in words. */
#akashic-health-records-patient-portal-root .staff-directory-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#akashic-health-records-patient-portal-root .staff-directory-row > :first-child {
  flex: 1;
}

#akashic-health-records-patient-portal-root .staff-directory-status .ahr-row-status {
  text-align: right;
}

/* On a phone the filters go two across under a full-width search. A short state stays on the name
   line; a long one drops under the name, in line with the text beside the avatar. */
@media (max-width: 639px) {
  #akashic-health-records-patient-portal-root .staff-directory-filters {
    grid-template-columns: 1fr 1fr;
  }
  #akashic-health-records-patient-portal-root .staff-directory-filters > :first-child {
    grid-column: 1 / -1;
  }
  #akashic-health-records-patient-portal-root .staff-directory-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  #akashic-health-records-patient-portal-root .staff-directory-row > .staff-directory-status {
    order: 3;
    flex-basis: 100%;
    margin-left: 46px;
  }
  #akashic-health-records-patient-portal-root .staff-directory-row > .staff-directory-status .ahr-row-status {
    text-align: left;
    white-space: normal;
  }
  #akashic-health-records-patient-portal-root .staff-directory-row > .staff-directory-status--short {
    order: 0;
    flex-basis: auto;
    margin-left: 0;
  }
  #akashic-health-records-patient-portal-root .staff-directory-row > .staff-directory-seat {
    order: 4;
    flex-basis: 100%;
    margin-left: 46px;
  }
}
