/* Task queue: one compose panel, then queued attempts as divided rows. Queue
   state uses execution colours; completion is never implied by a finished run. */
#queue-view { max-width:960px; }
.queue-form { display:grid; gap:14px; justify-items:start; padding:22px 28px 24px; margin-bottom:32px; }
.queue-form>* { margin:0; }
.queue-form>label { display:grid; gap:6px; width:100%; max-width:560px; }
.queue-form select,.queue-form input:not([type="checkbox"]) { width:100%; max-width:560px; padding:9px 12px; }
.queue-form>p.muted { font-size:13px; max-width:75ch; }
.queue-form fieldset { width:100%; display:grid; gap:2px; max-height:16rem; overflow:auto; padding:4px 0 0; border:0; border-top:1px solid var(--line); border-radius:0; }
.queue-form legend { padding:0 8px 0 0; font-size:13px; font-weight:550; color:var(--ink); }
.queue-form .queue-dependency { display:flex; align-items:center; gap:10px; margin:0; padding:6px 0; font-weight:400; font-size:13.5px; }
.queue-dependency input { width:auto; margin:0; }
/* The isolation checkbox sits before its text, like the prerequisite rows. */
.queue-form>label:has(input[type="checkbox"]) { display:flex; flex-direction:row-reverse; justify-content:flex-end; align-items:center; gap:10px; font-weight:500; }
.queue-form>label:has(input[type="checkbox"]) input { margin:0; }
.queue-form>.button { min-width:0; }
.queue-form>.button.primary { margin-top:4px; }

.queue-list { display:grid; }
.queue-list>h2 { padding-bottom:10px; border-bottom:1px solid var(--line); }
.queue-list>p.muted { padding:18px 0; font-size:13px; }
.queue-item { display:grid; gap:4px; padding:16px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.queue-item h3 { font-size:15px; font-weight:600; }
.queue-item>p.muted { font-size:12.5px; }
.queue-state { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:550; color:var(--muted); }
.queue-state::before { content:""; width:8px; height:8px; border-radius:50%; flex-shrink:0; border:1.5px solid currentColor; }
.queue-state.queued,.queue-state.running { color:var(--agent); }
.queue-state.running::before { background:currentColor; }
.queue-state.stop_requested,.queue-state.needs_attention { color:var(--warning); }
.queue-state.unresolved { color:var(--uncertain); }
.queue-state.unresolved::before { background:var(--hatch); }
.queue-state.finished::before { background:currentColor; }
.queue-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 4px; }
.queue-item details>summary { cursor:pointer; color:var(--muted); font-size:12.5px; padding:4px 0; }
.queue-item details>summary:hover { color:var(--ink); }
.queue-snapshot { margin:8px 0 0; padding:12px 14px; max-height:320px; overflow:auto; white-space:pre-wrap; font-family:var(--font-mono); font-size:12px; line-height:1.6; background:var(--sunk); border-radius:var(--radius-control); }
@media(max-width:700px) {
  .queue-form { padding:18px; }
  .queue-form>.button { width:100%; }
}
@media(max-width:560px) { .queue-form { padding:16px; } }
/* Branch merges: preferences, Merge all ready with its preview, then the queue. */
.queue-merges { display:grid; gap:12px; justify-items:start; padding:22px 28px 24px; margin-bottom:32px; }
.queue-merges>* { margin:0; }
.queue-merges>p.muted { font-size:13px; max-width:75ch; }
.queue-merge-prefs { display:grid; gap:6px; }
.queue-merge-prefs label { display:flex; flex-direction:row-reverse; justify-content:flex-end; align-items:center; gap:10px; font-weight:500; font-size:13.5px; }
.queue-merge-prefs input { margin:0; }
.queue-merge-preview,.queue-merge-list { list-style:none; margin:0; padding:0; width:100%; display:grid; }
.queue-merge-preview li { padding:2px 0; font-size:12.5px; color:var(--muted); overflow-wrap:anywhere; }
.queue-merge-entry { display:grid; gap:4px; justify-items:start; padding:12px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.queue-merge-entry strong { font-size:14px; font-weight:600; }
.queue-state.merge-queued,.queue-state.merge-merging,.queue-state.merge-resolving { color:var(--agent); }
.queue-state.merge-waiting,.queue-state.merge-needs_person { color:var(--warning); }
.queue-state.merge-merged::before { background:currentColor; }
@media(max-width:700px) { .queue-merges { padding:18px; } .queue-merges>.button { width:100%; } }
.queue-merge-settings { justify-self:stretch; display:grid; gap:12px; padding-top:12px; border-top:1px solid var(--line); }
.queue-merge-settings[open] { gap:14px; }
.queue-merge-settings > summary { color:var(--muted); font-size:13.5px; }
.queue-merge-settings > p.muted { font-size:13px; max-width:75ch; }
