/* ===== 待发送队列 PendingQueueRenderer（Q19 · SPEC §2.13，round-26 S2） =====
 * 宿主 CSS（dtcoder-glass-react.css，§2.13 抄录）：
 *   .pending-queue-renderer{border:1px solid var(--border);border-radius:12px;background:card-light}
 *   __header{min-height:2.5rem;padding:4px 8px}
 *   __count{min-width:1.25rem;height:1.25rem;border-radius:999px;background:muted;font-size:xs}
 *   __list{grid;gap:4px;padding:0 8px 8px}
 *   __item{flex;gap:8px;padding:8px;border-radius:8px;background:var(--background)}
 *   __item--dragging{opacity:.55}
 *   __preview{ellipsis} __admission{margin-top:2px;xs;muted}
 * token 映射（tokens.css）：card-light→--am-gray-1 #fcfcfc；border→--am-gray-6 #d8d8d8（styles.css --border #ddd 同族）；
 *   muted 文本→--am-muted-foreground #0000007d；xs→12px。
 * 本文件只命中 items>0 时惰性插入的节点，初始视图像素基线零命中。 */

.pending-queue-renderer {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--am-gray-6, #d8d8d8);
  border-radius: 12px;                      /* §2.13 renderer 圆角 */
  background: var(--am-gray-1, #fcfcfc);    /* card-light */
  margin: 0 auto 8px;
  width: 860px; max-width: calc(100% - 40px); /* 与 .composer 同宽对齐 */
}
.pending-queue-renderer__header {
  display: flex; align-items: center; gap: 8px;
  min-height: 2.5rem; padding: 4px 8px;      /* §2.13 __header */
}
.pending-queue-renderer__disclosure {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; margin: 0;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--am-muted-foreground, #0000007d); cursor: default; line-height: 0;
}
.pending-queue-renderer__disclosure:hover { background: var(--am-gray-a3, #0000000d); color: var(--am-foreground, #1e1e1e); }
.pending-queue-renderer__disclosure svg { width: 16px; height: 16px; } /* ChevronDown/Up 16（§2.13） */
.pending-queue-renderer__title { font-size: var(--type-body-size); font-weight: 500; color: var(--am-foreground, #1e1e1e);  line-height: var(--type-body-line); }
.pending-queue-renderer__count {
  min-width: 1.25rem; height: 1.25rem;       /* §2.13 __count 胶囊 */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px; border-radius: 999px;
  background: var(--am-gray-a3, #0000000d);
  font-size: var(--type-caption-size); color: var(--am-muted-foreground, #0000007d);
  font-variant-numeric: tabular-nums;
 line-height: var(--type-caption-line); }
.pending-queue-renderer__clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; margin-left: auto;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--am-muted-foreground, #0000007d); cursor: default; line-height: 0;
}
.pending-queue-renderer__clear:hover { background: var(--am-gray-a3, #0000000d); color: var(--am-foreground, #1e1e1e); }
.pending-queue-renderer__clear svg { width: 14px; height: 14px; } /* Trash2 14（§2.13） */

.pending-queue-renderer__list {
  display: grid; gap: 4px; padding: 0 8px 8px;   /* §2.13 __list */
  list-style: none; margin: 0;
}
.pending-queue-renderer[data-expanded="false"] .pending-queue-renderer__list { display: none; } /* 折叠态（宿主 data-expanded 布尔属性语义） */

.pending-queue-renderer__item {
  display: flex; align-items: center; gap: 8px;  /* §2.13 __item */
  padding: 8px; border-radius: 8px;
  background: var(--am-gray-3, #f1f1f1);
}
.pending-queue-renderer__item--dragging { opacity: .55; } /* §2.13 */
.pending-queue-renderer__grip {
  display: inline-flex; color: var(--am-gray-8, #bbb); cursor: grab; line-height: 0; flex: none;
}
.pending-queue-renderer__grip svg { width: 14px; height: 14px; }  /* GripVertical 14 */
.pending-queue-renderer__body { flex: 1; min-width: 0; }
.pending-queue-renderer__preview {
  font-size: var(--type-body-size); color: var(--am-foreground, #1e1e1e);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; /* §2.13 __preview ellipsis */
 line-height: var(--type-body-line); }
.pending-queue-renderer__admission {
  margin-top: 2px; font-size: var(--type-caption-size);              /* §2.13 __admission xs/muted */
  color: var(--am-muted-foreground, #0000007d);
 line-height: var(--type-caption-line); }
.pending-queue-renderer__actions { display: flex; align-items: center; gap: 4px; flex: none; }
.pending-queue-renderer__actions button {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 6px; border: 0; border-radius: 6px; background: transparent;
  color: var(--am-muted-foreground, #0000007d); cursor: default; font-size: var(--type-caption-size);
 line-height: var(--type-caption-line); }
.pending-queue-renderer__actions button:hover { background: var(--am-gray-a3, #0000000d); color: var(--am-foreground, #1e1e1e); }
.pending-queue-renderer__actions svg { width: 14px; height: 14px; } /* Send/Pencil/X 14（§2.13） */

/* toast（引导反馈；复刻版无 steer 后端，不发明跳转） */
.pending-queue-renderer__toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 9999; max-width: min(420px, calc(100vw - 32px));
  padding: 7px 14px; background: #1e1e1e; color: #fff;
  font-size: var(--type-body-size);  border-radius: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.2);
 line-height: var(--type-body-line); }

@media (prefers-reduced-motion: reduce) {
  .pending-queue-renderer__toast { animation: none; }
}
