/* LinkChannelsModal — 关联群聊弹窗（对齐原型 v19） */

/* 通过组件根节点覆盖 Semi Token 控制内边距 */
.wk-link-channels-modal {
  --semi-modal-content-padding: 0;
  --semi-modal-header-margin: 0;
  --semi-modal-body-wrapper-margin: 0;
  --semi-modal-body-padding: 0;
}
.wk-link-channels-modal [class*="semi-modal-header"] {
  display: none;
}

.wk-lcm {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
}

.wk-lcm__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--wk-border-default, #e4e4e7);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.wk-lcm__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wk-text-primary, #18181b);
}

.wk-lcm__title-id {
  font-family: ui-monospace, monospace;
  color: var(--wk-text-secondary, #52525b);
}

.wk-lcm__sub {
  font-size: 12px;
  color: var(--wk-text-tertiary, #71717a);
  margin-top: 2px;
}

.wk-lcm__close {
  border: none;
  background: transparent;
  color: var(--wk-text-tertiary, #a1a1aa);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.wk-lcm__close:hover {
  color: var(--wk-text-primary, #18181b);
}

.wk-lcm__search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--wk-border-subtle, #f4f4f5);
  position: relative;
}

.wk-lcm__search-icon {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wk-text-tertiary, #a1a1aa);
}

.wk-lcm__search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--wk-border-default, #e4e4e7);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  color: var(--wk-text-primary, #18181b);
  background: var(--wk-bg-surface, #fff);
  transition: border-color 0.12s;
}

.wk-lcm__search-input:focus {
  border-color: var(--wk-text-primary, #18181b);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.wk-lcm__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 240px;
  max-height: 400px;
}

.wk-lcm__empty {
  text-align: center;
  font-size: 12px;
  color: var(--wk-text-tertiary, #a1a1aa);
  padding: 48px 0;
}

.wk-lcm__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.wk-lcm__item:hover {
  background: var(--wk-bg-hover, #fafafa);
}
.wk-lcm__item.is-selected {
  background: rgba(139, 92, 246, 0.08);
}
.wk-lcm__item.is-linked {
  opacity: 0.5;
  cursor: not-allowed;
}

.wk-lcm__check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--wk-border-default, #d4d4d8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.12s;
}

.wk-lcm__check.is-checked {
  background: var(--wk-color-accent);
  border-color: var(--wk-color-accent);
}

.wk-lcm__check.is-linked {
  background: var(--wk-border-default, #d4d4d8);
  border-color: var(--wk-border-default, #d4d4d8);
}

.wk-lcm__item-info {
  flex: 1;
  min-width: 0;
}

.wk-lcm__item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--wk-text-primary, #18181b);
}

.wk-lcm__dm-badge {
  font-size: 10px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--wk-bg-info, #eff6ff);
  color: var(--wk-text-info, #1d4ed8);
  border: 1px solid var(--wk-border-info, #bfdbfe);
  font-weight: 500;
}

.wk-lcm__item-desc {
  font-size: 11px;
  color: var(--wk-text-tertiary, #71717a);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-lcm__item-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.wk-lcm__item-members {
  color: var(--wk-text-tertiary, #a1a1aa);
}

.wk-lcm__item-badge {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--wk-bg-elevated, #f4f4f5);
  color: var(--wk-text-tertiary, #71717a);
  font-weight: 500;
}

.wk-lcm__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--wk-border-default, #e4e4e7);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-lcm__footer-info {
  font-size: 12px;
  color: var(--wk-text-tertiary, #71717a);
}

.wk-lcm__footer-count {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  color: var(--wk-text-primary, #18181b);
}

.wk-lcm__footer-hint {
  color: var(--wk-text-tertiary, #a1a1aa);
}

.wk-lcm__footer-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.wk-lcm__btn-cancel {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  background: transparent;
  color: var(--wk-text-secondary, #52525b);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}

.wk-lcm__btn-cancel:hover {
  background: var(--wk-bg-hover, #f4f4f5);
  color: var(--wk-text-primary, #18181b);
}

.wk-lcm__btn-confirm {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background: var(--wk-text-primary, #18181b);
  color: white;
  cursor: pointer;
  transition: all 0.12s;
}

.wk-lcm__btn-confirm:hover:not(:disabled) {
  background: #27272a;
}

.wk-lcm__btn-confirm:disabled {
  background: var(--wk-border-default, #d4d4d8);
  cursor: not-allowed;
}
