/* OwnerEditor �?负责人编辑下�?
 *
 * 设计基线�?9-Matters-prototype.html > OwnersEditor
 *   - trigger: 头像堆叠 + 名字串联，hover 浅灰�?
 *   - dropdown: 纯白卡，边框 + 阴影，候选项 16px 头像
 *
 * 颜色 / 圆角 / 间距 全部�?--wk-* token，dark mode 自动继承�?
 */

/* ─── 根容�?────────────────────────────────────────── */
.wk-owner-editor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* ─── Trigger 按钮 ─────────────────────────────────── */
.wk-owner-editor__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  margin: 0 -6px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  color: inherit;
  transition: background 0.12s;
}

.wk-owner-editor__trigger:hover:not(:disabled) {
  background: var(--wk-bg-hover, #f4f4f5);
}

.wk-owner-editor__trigger.is-readonly,
.wk-owner-editor__trigger:disabled {
  cursor: default;
}

/* ─── 头像堆叠 ─────────────────────────────────────── */
.wk-owner-editor__avatars {
  display: inline-flex;
  align-items: center;
}

.wk-owner-editor__avatar-wrap {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--wk-bg-surface, #fff);
  border-radius: 50%;
  flex-shrink: 0;
}

.wk-owner-editor__avatar-wrap .wk-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: block;
}

/* ─── 名字 ─────────────────────────────────────────── */
.wk-owner-editor__names {
  color: var(--wk-text-secondary, #3f3f46);
  font-weight: 500;
  line-height: 1;
}

.wk-owner-editor__names-more {
  color: var(--wk-text-tertiary, #6b7075);
  font-weight: 400;
}

/* ─── Dropdown ─────────────────────────────────────── */
.wk-owner-editor__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  background: var(--wk-bg-surface, #fff);
  border: 1px solid var(--wk-border-default, #e4e4e7);
  border-radius: 6px;
  box-shadow: var(--wk-shadow-lg, 0 8px 24px -6px rgb(0 0 0 / 0.12), 0 4px 8px -2px rgb(0 0 0 / 0.06));
  animation: wk-owner-editor-fade-up 0.12s ease-out both;
}

@keyframes wk-owner-editor-fade-up {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wk-owner-editor__hint {
  padding: 4px 8px;
  font-size: 11px;
  color: var(--wk-text-tertiary, #a1a1aa);
}

/* 次要提示 (候选人来源说明): 比主 hint 再淡一�? 且收�?padding 避免视觉堆叠 */
.wk-owner-editor__hint--sub {
  padding-top: 0;
  color: var(--wk-border-default, #d4d4d8);
  font-size: 10.5px;
}

.wk-owner-editor__empty {
  padding: 12px 8px;
  font-size: 12px;
  color: var(--wk-text-tertiary, #a1a1aa);
  text-align: center;
}

/* ─── Option ───────────────────────────────────────── */
.wk-owner-editor__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  text-align: left;
  color: var(--wk-text-secondary, #3f3f46);
  transition: background 0.1s;
}

.wk-owner-editor__option:hover:not(:disabled) {
  background: var(--wk-bg-hover, #fafafa);
}

.wk-owner-editor__option.is-picked {
  background: var(--wk-bg-active, #f4f4f5);
}

.wk-owner-editor__option.is-picked:hover:not(:disabled) {
  background: var(--wk-bg-active-hover, #e4e4e7);
}

.wk-owner-editor__option.is-disabled,
.wk-owner-editor__option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wk-owner-editor__option .wk-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wk-owner-editor__option-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-owner-editor__option-check {
  color: var(--wk-text-primary, #18181b);
  font-weight: 600;
  font-size: 12px;
}
