/* Item 390 follow-up: keep the same-company list inside a bounded modal so
   long rosters (e.g. 20+ clients at one employer) can scroll. Reuses the
   existing admin-dialog-structure grid (sticky header, scrolling body,
   fixed actions). Viewport units go through --cw-vh / --cw-dvh so the
   desktop-scale layout and browser zoom still fit. */
#sameCompanyDialog[open] {
  max-height: min(calc(85 * var(--cw-vh)), 900px);
  max-height: min(calc(85 * var(--cw-dvh)), 900px);
  overflow: hidden;
}
#sameCompanyDialog > form.admin-dialog-structure {
  width: 100%;
  max-height: inherit;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
#sameCompanyDialog .admin-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  background: #fff;
}
#sameCompanyDialog .admin-dialog-header #sameCompanySummary {
  margin: 6px 0 0;
  color: #607686;
  line-height: 1.55;
}
#sameCompanyDialog .admin-dialog-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#sameCompanyList {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) #sameCompanyDialog[open] {
    max-height: none;
  }
  :where(html:not(.cw-desktop-scale)) #sameCompanyDialog > form.admin-dialog-structure {
    height: calc(100 * var(--cw-dvh));
    max-height: none;
  }
}
