/* PixelCraft — strip "Đang chạy" + toggle "Dán là chạy" (live.js).
   Dùng đúng token của pc.css. Strip là sticky trong .app-body (dưới topbar
   64px) nên không che nội dung; mỗi hàng cao cố định, đồng hồ dùng
   tabular-nums để tick mỗi giây không làm nhảy layout. Trên điện thoại
   danh sách cuộn ngang để không job nào bị giấu. */

.live-strip {
  position: sticky; top: 64px; z-index: 25;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 12px 14px; margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}
.live-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.live-dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.live-title { font-size: 13.5px; font-weight: 600; }
.live-count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-text); font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.live-list { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.live-job {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 240px; min-width: 0; max-width: 420px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2);
}
.live-ic {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border-radius: 9px; background: var(--surface-2); color: var(--accent-text);
}
.live-ic.video { color: var(--video); }
.live-mid { flex: 1 1 auto; min-width: 0; }
.live-prompt {
  font-size: 13.5px; line-height: 1.4; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.live-bar {
  height: 5px; border-radius: 99px; background: var(--surface-2);
  overflow: hidden; margin-top: 6px;
}
.live-bar i { display: block; height: 100%; background: var(--accent); transition: width .4s var(--ease); }
.live-bar.ind i { width: 40%; animation: liveInd 1.4s var(--ease) infinite; }
@keyframes liveInd { from { transform: translateX(-110%); } to { transform: translateX(280%); } }
.live-meta {
  flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.live-pct { font-weight: 600; color: var(--text); min-height: 17px; }
.live-kind { font-size: 11.5px; }

/* Toggle "Dán là chạy" trong hộp batch (.bt-box của batch.js). */
.live-paste-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
  cursor: pointer; font-size: 13.5px;
}
.live-paste-row input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.live-paste-tx { display: flex; flex-direction: column; min-width: 0; }
.live-paste-tx small { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* Toast "Hoàn tác": nút nằm trong .toast sẵn có. */
.toast.live-toast { align-items: center; }
.live-undo { margin-left: 4px; flex: none; }

@media (max-width: 720px) {
  .live-strip { padding: 10px 12px; }
  .live-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .live-job { flex: 0 0 240px; max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-bar.ind i { animation: none; }
}
