/* ─── Assignee Chips ─────────────────────────────────────── */

.wk-assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--wk-brand-tint-06, rgba(124, 92, 252, 0.06));
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--wk-text-primary, #1a1a1a);
  transition: background 150ms;
}

.wk-assignee-chip:hover {
  background: var(--wk-brand-tint-06, rgba(124, 92, 252, 0.1));
}

.wk-assignee-chip__name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-assignee-chip__remove {
  display: none;
  border: none;
  background: none;
  color: var(--wk-text-disabled, #ccc);
  cursor: pointer;
  font-size: 10px;
  padding: 0 2px;
  line-height: 1;
  transition: color 150ms;
}

.wk-assignee-chip:hover .wk-assignee-chip__remove {
  display: inline-flex;
}

.wk-assignee-chip__remove:hover {
  color: var(--wk-color-error, #ef4444);
}

/* ─── Assignee Editor Container ────────────────────────── */

.wk-assignee-editor {
  margin-bottom: 4px;
}

.wk-assignee-editor__label {
  font-size: 14px;
  color: var(--wk-text-primary, #1a1a1a);
  margin-bottom: 8px;
}

.wk-assignee-editor__label strong {
  font-weight: 500;
}

.wk-assignee-editor__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.wk-assignee-editor__empty {
  color: var(--wk-text-disabled, #bbb);
  font-size: 13px;
}

.wk-assignee-editor__add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1.5px dashed var(--wk-border-default, #d9d9d9);
  border-radius: 4px;
  background: transparent;
  color: var(--wk-text-tertiary, #999);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: border-color 150ms, color 150ms;
}

.wk-assignee-editor__add-btn:hover {
  border-color: var(--wk-brand-primary, #7C5CFC);
  color: var(--wk-brand-primary, #7C5CFC);
}

/* ─── Search Dropdown ──────────────────────────────────── */

.wk-assignee-search {
  position: relative;
  margin-top: 8px;
}

.wk-assignee-search__input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--wk-border-default, #e5e5e5);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color 150ms;
  box-sizing: border-box;
}

.wk-assignee-search__input:focus {
  border-color: var(--wk-brand-primary, #7C5CFC);
}

.wk-assignee-search__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--wk-bg-surface, #fff);
  border: 1px solid var(--wk-border-default, #e5e5e5);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.wk-assignee-search__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 150ms;
}

.wk-assignee-search__item:hover {
  background: var(--wk-bg-base, #f7f8fa);
}

.wk-assignee-search__item:first-child {
  border-radius: 6px 6px 0 0;
}

.wk-assignee-search__item:last-child {
  border-radius: 0 0 6px 6px;
}

.wk-assignee-search__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wk-assignee-search__name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--wk-text-primary, #1a1a1a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-assignee-search__uid {
  font-size: 11px;
  color: var(--wk-text-tertiary, #999);
  flex-shrink: 0;
}

.wk-assignee-search__loading,
.wk-assignee-search__empty {
  padding: 12px 10px;
  font-size: 12px;
  color: var(--wk-text-disabled, #bbb);
  text-align: center;
}

/* 分派候选的「@SpaceName」后缀（企微风格）。
   与 .wk-subscrierlist-item-space / .mention-list-item-space 等视觉保持一致。
   只有候选相对当前查看 Space 判定为外部（sourceSpaceName 非空）时由上层渲染。 */
.wk-assignee-search__space {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--wk-text-secondary, rgba(9, 30, 66, 0.6));
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 10rem;
    flex-shrink: 1;
}
