/* Shared identity cards. Screen styles own the surrounding content, not card size. */
:root {
  --profile-size: 76px;
  --profile-padding: 6px;
  --profile-unit-font: 11px;
  --profile-name-font: 13px;
  --staff-profile-unit-font: 10px;
  --staff-profile-work-font: 11px;
}

:is(.staff-profile-circle,.construction-team-circle,.staff-profile-unassigned) {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  width: var(--profile-size) !important;
  min-width: var(--profile-size) !important;
  max-width: var(--profile-size) !important;
  height: var(--profile-size) !important;
  min-height: var(--profile-size) !important;
  max-height: var(--profile-size) !important;
  padding: var(--profile-padding) !important;
  margin: 0 !important;
  border-width: 1px;
  border-radius: 14px;
  overflow: hidden !important;
  text-align: center;
  gap: 2px;
}

:is(.staff-profile-circle,.construction-team-circle) > :is(.staff-profile-unit,.staff-profile-name,span,strong) {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  max-width: 100%;
  max-height: 2.4em !important;
  flex: none;
  overflow: hidden !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  text-wrap: balance;
  text-align: center;
  text-overflow: ellipsis;
  line-height: 1.2 !important;
  margin: 0 !important;
}

:is(.staff-profile-circle,.construction-team-circle)>span {font-size: var(--profile-unit-font) !important}
:is(.staff-profile-circle,.construction-team-circle)>strong {font-size: var(--profile-name-font) !important}
.staff-profile-circle > :is(.staff-profile-unit,.staff-profile-work) {
  display: block !important;
  white-space: nowrap !important;
}
.staff-profile-circle > .staff-profile-unit {font-size: var(--staff-profile-unit-font) !important}
.staff-profile-circle > .staff-profile-work {font-size: var(--staff-profile-work-font) !important; font-weight: 500}
.staff-profile-name>.staff-profile-marker {display: block !important; font-size: var(--staff-profile-unit-font); white-space: nowrap}
.staff-profile-detail :is(h3,p), .profile-full-name {overflow-wrap: anywhere; word-break: keep-all}
.profile-full-label {display: block; max-width: 150px; text-align: center; font-size: 12px; overflow-wrap: anywhere; word-break: keep-all}
.ph-staff-option {flex-direction: column; gap: 5px; min-width: 0}
.profile-full-name {margin: 0; line-height: 1.55}
.profile-identity {display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0}
button.profile-name-action {
  min-height: 28px;
  margin: 0;
  padding: 2px 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-decoration: underline;
  white-space: nowrap;
}

.staff-list-row {grid-template-columns: var(--profile-size) minmax(0,1fr)}
.ph-note {grid-template-columns: var(--profile-size) minmax(0,1fr); gap: 12px}
.ph-note>div,.staff-home-profile>div {min-width: 0}
.ph-profile-pair,.ed-profile-pair,.staff-home-profile,.ed-participants {flex-wrap: wrap}
.ed-participant,.project-person-group {position: relative; flex: none}
.ed-participants .ed-participant {
  width: var(--profile-size);
  max-width: none;
  text-align: center;
  overflow-wrap: anywhere;
}
.projects-view .project-card-scheduled .project-people,.project-detail-people,.ed-participants {align-items: flex-start}
.ed-participant+.ed-participant,.project-person-group+.project-person-group {margin-inline-start: 14px}
.ed-participant-arrow,.project-participant-arrow {
  position: absolute;
  inset-inline-end: calc(100% + 2px);
  top: calc(var(--profile-size) / 2);
  transform: translateY(-50%);
  line-height: 1;
  font-size: 16px;
  margin: 0;
  pointer-events: none;
}
.ss-person>:not(.staff-profile-circle) {min-width: 0}

@media (max-width:720px) {
  .ss-person {grid-template-columns: var(--profile-size) minmax(0,1fr)}
}

@media (max-width:390px) {
  :root {
    --profile-size: 68px;
    --profile-padding: 5px;
    --profile-unit-font: 10px;
    --profile-name-font: 12px;
    --staff-profile-unit-font: 9px;
    --staff-profile-work-font: 10px;
  }
  .projects-view .project-card-scheduled .project-people,.project-detail-people,.ed-participants {gap: 6px}
  .ed-participant-arrow,.project-participant-arrow {font-size: 13px}
}
