/* ─── MemberPicker Container ──────────────────────────── */

.wk-member-picker {
  position: relative;
  width: 100%;
}

.wk-member-picker--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Input Wrapper with Tags ────────────────────────── */

.wk-member-picker__input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  min-height: 36px;
  border: 1px solid var(--wk-border-default, #e5e5e5);
  border-radius: 6px;
  background: var(--wk-bg-surface, #fff);
  cursor: text;
  transition: border-color 150ms, box-shadow 150ms;
}

.wk-member-picker__input-wrapper:hover {
  border-color: var(--wk-border-hover, #d0d0d0);
}

.wk-member-picker__input-wrapper--focused {
  border-color: var(--wk-brand-primary, #7C5CFC);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
}

.wk-member-picker--disabled .wk-member-picker__input-wrapper {
  background: var(--wk-bg-disabled, #f5f5f5);
  cursor: not-allowed;
}

/* ─── Input Field ────────────────────────────────────── */

.wk-member-picker__input {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--wk-text-primary, #1a1a1a);
  padding: 0;
  line-height: 20px;
}

.wk-member-picker__input::placeholder {
  color: var(--wk-text-placeholder, #bbb);
}

.wk-member-picker__input:disabled {
  cursor: not-allowed;
}

/* ─── Member Tag ─────────────────────────────────────── */

.wk-member-picker__tag {
  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;
  flex-shrink: 0;
}

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

.wk-member-picker__tag-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-member-picker__tag-remove {
  display: inline-flex;
  align-items: center;
  border: none;
  background: none;
  color: var(--wk-text-disabled, #bbb);
  cursor: pointer;
  font-size: 10px;
  padding: 0 2px;
  line-height: 1;
  transition: color 150ms;
}

.wk-member-picker__tag-remove:hover {
  color: var(--wk-color-error, #ef4444);
}

/* ─── Dropdown Menu ──────────────────────────────────── */

.wk-member-picker__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  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: 240px;
  overflow-y: auto;
  z-index: 1000;
}

/* ─── Member Option ──────────────────────────────────── */

.wk-member-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 150ms, opacity 150ms;
}

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

.wk-member-picker__option:first-child {
  border-radius: 6px 6px 0 0;
}

.wk-member-picker__option:last-child {
  border-radius: 0 0 6px 6px;
}

/* 已选成员 dimmed 效果 */
.wk-member-picker__option--selected {
  opacity: 0.5;
}

.wk-member-picker__option--selected:hover {
  opacity: 0.7;
}

.wk-member-picker__option-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--wk-bg-base, #f0f0f0);
}

.wk-member-picker__option-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wk-member-picker__option-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.wk-member-picker__option-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

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

/* ─── Loading & Empty States ─────────────────────────── */

.wk-member-picker__loading,
.wk-member-picker__empty {
  padding: 16px 12px;
  font-size: 13px;
  color: var(--wk-text-disabled, #bbb);
  text-align: center;
}

/* ─── Scrollbar Styling ──────────────────────────────── */

.wk-member-picker__dropdown::-webkit-scrollbar {
  width: 6px;
}

.wk-member-picker__dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.wk-member-picker__dropdown::-webkit-scrollbar-thumb {
  background: var(--wk-border-default, #e5e5e5);
  border-radius: 3px;
}

.wk-member-picker__dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--wk-border-hover, #d0d0d0);
}
