/* The Contributors field: an avatar stack plus a gray "add" circle (JS/components/contributor-field.js).
   Own classnames rather than CSS/okr.css's `.okr-contrib-*`; see that file's header.
   `.a-av` (CSS/alt/alt-components.css) is the shared avatar circle; this file only adds the
   stack layout and the gray add variant, never a second circle rule. */

/* Centered against the field row it sits in (Owner/Assignee/Topic are `--a-ctl-lg` tall,
   see CSS/alt/alt-tokens.css). `min-height`, not `height`, so a wrapped stack can still grow. */
.contrib-field{ display:flex; align-items:center; gap:8px; min-width:0; min-height:var(--a-ctl-lg, 36px); }

/* Wraps onto more rows rather than overflowing (one circle per person, no "+N" cap).
   `flex:1 1 auto; min-width:0` is required: with `flex:0 0 auto` the box takes its max-content
   width, wrapping never fires, and on narrow fields the add circle ends up outside the field. */
.contrib-avatars{ display:flex; flex-wrap:wrap; align-items:center; row-gap:6px; flex:1 1 auto; min-width:0; }
/* `display:contents` makes the `.a-av` children true flex siblings of `.contrib-add`,
   which the overlap rule below needs. */
.contrib-av-list{ display:contents; }

/* Ring between overlapping circles (same device as `.a-conv-who` in alt-conversation.css) so
   adjacent same-colour avatars do not blur together. Overlap is modest: this is a form row. */
.contrib-avatars .a-av{ box-shadow:0 0 0 2px var(--panel); cursor:default; }
.contrib-avatars .a-av + .a-av{ margin-left:-6px; }
/* A legacy name has no account, so its circle is lighter than a real contributor's. */
.contrib-av-legacy{ opacity:.7; }

/* The gray "add" circle. Two classes on purpose: this sheet loads before alt-components.css, so a
   bare `.contrib-add` would tie `.a-av` on specificity and lose to the later rule (see
   sys_design-system.md, "Opting a control OUT of the base rule"). The compound wins in any order. */
.contrib-avatars .contrib-add{
  background:var(--panel-2); color:var(--text-faint); cursor:pointer;
  border:1px solid var(--border-soft);
}
.contrib-avatars .contrib-add:hover:not(:disabled){
  background:var(--panel); color:var(--text-dim); border-color:var(--border-strong);
}
.contrib-avatars .contrib-add:disabled{ opacity:.55; cursor:default; }
.contrib-add svg{ flex:0 0 auto; }

/* "Contributors <span class=contrib-label-optional>optional</span>" — the muted qualifier
   beside the label, matching the "optional" wording team_board.html's own account fields
   already use (see #accountAltEmail's "— optional" hint), styled beside a label rather than
   under it since this field's label is one short word. */
.contrib-label-optional{ font-weight:400; text-transform:none; color:var(--text-faint); }

/* Roster pending: a skeleton avatar beside the inert add circle, same 24px row so nothing grows. */
/* After the add circle, not before: a task with nobody on it (the usual case) then loses the shape without the add circle moving. */
.contrib-avatars .skel--av{ flex:0 0 auto; order:2; margin-left:6px; }
.contrib-avatars .contrib-add{ order:1; }
.contrib-avatars .contrib-add[aria-disabled="true"]{ opacity:.55; cursor:default; }

/* The slot for "Still loading… / Couldn't load collaborators · Retry". Always in the row at the avatar height, so
   filling it moves nothing; the gap appears only with text. */
.contrib-note{ display:inline-flex; align-items:center; min-height:24px; min-width:0; }
.contrib-note:not(:empty){ margin-left:8px; }

/* Why a disabled field cannot be changed (`disabledReason`, contributor-field.js), in the note slot beside the
   circle. The type of `.loading-note` (task-editor-core.css), stated here since okrs.html does not load that sheet. */
.contrib-why{ font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--text-dim); min-width:0; }
/* The note follows the circle (and any skeleton, order 2), so a sentence never pushes the circle onto a second row. */
.contrib-avatars .contrib-note{ order:3; }
