/* Text-attach feature: 文本节点 composer 的已接入素材 chip 行
   （features/text-attach/renderer.js 渲染，× 移除连线）。
   附件 chip：缩略图/图标 + 悬停 × 移除；无连线时整行不渲染。
   通用行布局 .canvas-text-ai-row 保留在 nodes-text.css。 */

.canvas-node-text .canvas-text-ai-row.is-attach {
  flex-wrap: wrap;
}

.canvas-node-text .canvas-text-ai-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.canvas-node-text .canvas-text-ai-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 64px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.canvas-node-text .canvas-text-ai-chip img,
.canvas-node-text .canvas-text-ai-chip video {
  width: 34px;
  height: 34px;
  object-fit: cover;
  display: block;
  background: #000;
}

.canvas-node-text .canvas-text-ai-chip-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

.canvas-node-text .canvas-text-ai-chip.is-audio .canvas-text-ai-chip-icon,
.canvas-node-text .canvas-text-ai-chip.is-video .canvas-text-ai-chip-icon {
  color: rgba(255, 255, 255, 0.8);
}

.canvas-node-text .canvas-text-ai-chip.is-more {
  width: auto;
  min-width: 34px;
  justify-content: center;
  padding: 0 8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.canvas-node-text .canvas-text-ai-chip-remove {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.canvas-node-text .canvas-text-ai-chip:hover .canvas-text-ai-chip-remove,
.canvas-node-text .canvas-text-ai-chip-remove:focus-visible {
  opacity: 1;
}

.canvas-node-text .canvas-text-ai-chip-remove:hover {
  background: rgba(214, 69, 69, 0.9);
  color: #fff;
}
