/* Coworkers — V1 proposal, always on in the prototype (Figma 109:42201, 106:7648; drawer banner 104:30202).
   The Figma dropdown uses another library's colours and Poppins text — mapped to our tokens here. */

/* ---------- "Show coworkers" multi-select (Input Dropdown / Multi Select, size S) ---------- */
.cw-picker { position: relative; margin-left: auto; width: 240px; }
.input--s { min-height: 32px; }
.cw-picker__field { flex-wrap: nowrap; height: 32px; gap: var(--ds-spacing-xs); padding-left: var(--ds-spacing-xs); overflow: hidden; }
/* Chips fill the field's width and are clipped by it (no hugging); the full selection is in the dropdown */
.cw-picker__chips { display: flex; flex-wrap: nowrap; gap: var(--ds-spacing-xs); flex: 1; min-width: 0; overflow: hidden; }
.chip { flex: none; }
.cw-picker__trigger { height: 30px; flex: 1; justify-content: flex-end; }
.cw-picker__chips + .cw-picker__trigger { flex: 0 0 auto; width: auto; padding-left: 0; }
.cw-picker__placeholder { color: var(--ds-palette-content-secondary); }
.cw-picker .input__selector { width: 30px; height: 30px; flex: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-spacing-xxs);
  padding: 0 var(--ds-spacing-xxs) 0 var(--ds-spacing-s);
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  border-radius: var(--ds-border-radius-xs);
  background: var(--ds-palette-background-secondary);
  color: var(--ds-palette-content-primary);
}
.chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: var(--ds-border-radius-2xs);
  background: none;
  cursor: pointer;
}
.chip__remove:hover { background: var(--ds-palette-interactive-hover); }

.cw-picker__panel {
  position: absolute;
  top: calc(100% + var(--ds-spacing-xs));
  right: 0;
  z-index: 5;
  width: 100%;
  padding: 0;
}
.cw-picker__search {
  display: flex;
  align-items: center;
  gap: var(--ds-spacing-s);
  margin: var(--ds-spacing-m);
  padding: 0 var(--ds-spacing-s);
  height: 32px;
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  border-radius: var(--ds-border-radius-xs);
  color: var(--ds-palette-content-tertiary);
}
.cw-picker__search:focus-within { border-color: var(--ds-palette-border-brand); }
.cw-picker__search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ds-palette-content-primary); font-family: var(--ds-ref-font-family-body); }
.cw-picker__search input:focus { outline: none; }
.cw-picker__list {
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-xs);
  margin: 0;
  padding: var(--ds-spacing-xs) var(--ds-spacing-s) var(--ds-spacing-s);
  border-top: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  list-style: none;
}
.cw-picker__foot {
  display: flex;
  justify-content: space-between; /* Select all · Clear all, auto gap */
  padding: var(--ds-spacing-s);
  border-top: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
}
.cw-picker__action { margin-left: 0; }
.cw-picker__empty { margin: 0; padding: var(--ds-spacing-s) var(--ds-spacing-m) var(--ds-spacing-m); color: var(--ds-palette-content-tertiary); }
.cw-option { display: flex; align-items: center; gap: var(--ds-spacing-s); cursor: pointer; }
.cw-option__box { color: var(--ds-palette-border-high); }
.cw-option__box.is-on { color: var(--ds-palette-content-brand); } /* brand checkbox (decision) */
.cw-option:has(input:focus-visible) { outline: var(--ds-border-width-xs) solid var(--ds-palette-border-brand); outline-offset: calc(-1 * var(--ds-border-width-xs)); }

/* ---------- Teammate off bar (Calendar / Leave, Person=Team member) ---------- */
.leave-bar--off { border-color: transparent; background: var(--ds-palette-background-tertiary); color: var(--ds-palette-content-primary); }
.leave-bar--off .leave-bar__label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal__mark--off { background: var(--ds-palette-background-tertiary); }
.cal-dot--off { background: var(--ds-palette-content-tertiary); }
.cal-item--off { border-color: var(--ds-palette-border-low); background: var(--ds-palette-background-tertiary); }

/* ---------- Drawer banner: "2 coworkers are off on these days" ---------- */
/* Figma: #fafafb surface, content/primary border, radius m, padding 10/12, gap 10 (10 isn't a step → s) */
.cw-banner {
  display: flex;
  align-items: center;
  gap: var(--ds-spacing-m);
  padding: 10px var(--ds-spacing-m);
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  border-radius: var(--ds-border-radius-l);
  background: var(--ds-palette-background-secondary);
  color: var(--ds-palette-content-primary);
  text-decoration: none;
}
.cw-banner:hover { background-image: linear-gradient(var(--ds-palette-interactive-hover), var(--ds-palette-interactive-hover)); }
.cw-banner:focus-visible { outline: none; border-color: var(--ds-palette-border-brand); background-image: linear-gradient(var(--ds-palette-interactive-focus), var(--ds-palette-interactive-focus)); }
.cw-banner__text { flex: 1; }
.cw-banner__icon { flex: none; fill: var(--ds-palette-content-secondary); }
.cw-banner__avatars { display: flex; }
.cw-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: var(--ds-border-width-xs) solid var(--ds-palette-background-primary);
  border-radius: var(--ds-border-radius-full);
  background: var(--ds-palette-background-secondary);
  color: var(--ds-palette-content-secondary);
}
.cw-avatar + .cw-avatar { margin-left: calc(-1 * var(--ds-spacing-s)); } /* Figma overlaps photos by half; initials need more room */
.cw-banner__divider { align-self: stretch; width: var(--ds-border-width-xxs); background: var(--ds-palette-border-low); }

@media (max-width: 767px) { /* breakpoint/width/tablet */
  .cw-picker { width: 100%; margin-left: 0; }
}

/* "All coworkers" row (option B) */
.cw-picker__all { border-bottom: var(--ds-border-width-xxs) solid var(--ds-palette-border-low); margin-bottom: var(--ds-spacing-xs); padding-bottom: var(--ds-spacing-xs); }
.cw-picker__all .cw-option { width: 100%; border: 0; background: none; text-align: left; font-weight: var(--ds-ref-font-weight-semibold); }
.cw-picker__all .cw-option:hover { background: var(--ds-palette-interactive-hover); }
