/* Keep processing controls, current work, and complete diagnostic history readable together. */
.ap-channel-processing{gap:.8rem;padding:1rem;border-left-width:3px}
.ap-channel-processing>.ap-channel-public__collection-run-heading{align-items:center;flex-wrap:wrap;gap:.8rem}
/* Give Process and Stop clear targets without changing their existing actions. */
.ap-channel-processing__controls{gap:.45rem;align-items:end}
.ap-channel-processing__controls label{display:grid;gap:.25rem;font-size:.75rem}
.ap-channel-processing__controls select,.ap-channel-processing button,.ap-channel-processing__work-heading select{min-height:2.5rem;border:1px solid color-mix(in srgb,var(--primary) 24%,transparent);border-radius:4px;padding:.45rem .7rem;font:inherit;font-size:.8rem;background:var(--background);color:var(--primary);cursor:pointer}
.ap-channel-processing [data-process-channel]{background:var(--primary);color:var(--background);font-weight:800}
.ap-channel-processing button:disabled{opacity:.45;cursor:default}
/* Put the current reason for waiting above the log, where it stays visible. */
.ap-channel-processing__status{padding:.65rem 0;border-block:1px solid color-mix(in srgb,var(--primary) 14%,transparent)}
.ap-channel-processing__status h3{font-size:1.05rem;line-height:1.45}
.ap-channel-processing__status p{max-width:90ch;line-height:1.5}
.ap-channel-processing [data-process-freshness]{font-size:.72rem;color:var(--footer-text)}
.ap-channel-processing[data-space-paused="true"] .ap-channel-processing__status{border-left:3px solid #a86612;padding-left:.7rem}
/* Totals stay compact and distinct from the per-video list. */
.ap-channel-processing__metrics{display:flex;flex-wrap:wrap;gap:1rem 2rem;margin:0}
.ap-channel-processing__metrics div{min-width:5rem}
.ap-channel-processing__metrics dt{font-size:.72rem;color:var(--footer-text)}
.ap-channel-processing__metrics dd{margin:.1rem 0 0;font-size:1.4rem;font-weight:800;font-variant-numeric:tabular-nums}
/* Scroll only the work list, so a long queue does not push the controls off the page. */
.ap-channel-processing__work-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}
.ap-channel-processing__work-heading h3{font-size:.9rem}
.ap-channel-processing__work-heading label{display:flex;align-items:center;gap:.4rem;font-size:.75rem}
.ap-channel-processing__work{max-height:25rem;overflow:auto;overscroll-behavior:contain}
.ap-channel-processing__work table{width:100%;border-collapse:collapse;text-align:left;font-size:.78rem}
.ap-channel-processing__work th{position:sticky;top:0;background:var(--background);font-size:.68rem;color:var(--footer-text);z-index:1}
.ap-channel-processing__work th,.ap-channel-processing__work td{padding:.65rem .5rem;border-bottom:1px solid color-mix(in srgb,var(--primary) 13%,transparent);vertical-align:top;text-align:left}
.ap-channel-processing__work td:first-child{min-width:12rem;max-width:25rem;font-weight:750}
.ap-channel-processing__work td:nth-child(2),.ap-channel-processing__work td:nth-child(3){white-space:nowrap;min-width:5rem}
.ap-channel-processing__work td:last-child{min-width:12rem;max-width:35rem}
/* Saved means a database acknowledgement; copied-only work gets a different label. */
.ap-channel-processing [data-output-state="saved"]{color:#24703c;font-weight:750}
.ap-channel-processing [data-output-state="copied"]{color:#a86612}
.ap-channel-processing__work details{margin-top:.35rem;font-weight:400}
.ap-channel-processing__work a{display:inline-block;margin:.35rem .6rem .1rem 0}
/* Full diagnostics stay selectable and copyable inside native disclosure controls. */
.ap-channel-processing summary{cursor:pointer;font-size:.78rem;line-height:1.5;overflow-wrap:anywhere}
.ap-channel-processing pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-height:18rem;overflow:auto;font-size:.72rem;line-height:1.55;padding:.65rem;background:color-mix(in srgb,var(--primary) 4%,var(--background));border:1px solid color-mix(in srgb,var(--primary) 12%,transparent)}
.ap-channel-processing__guide p{margin:.5rem 0;font-size:.78rem;line-height:1.5}
.ap-channel-processing__log{border-top:1px solid color-mix(in srgb,var(--primary) 14%,transparent);padding-top:.6rem}
.ap-channel-processing [data-process-jobs]{max-height:24rem;overflow:auto;margin-top:.6rem}
.ap-channel-processing [data-clear-processing-log]{margin:.6rem 0 .2rem}
.ap-channel-processing [data-process-log] time{display:block;color:var(--footer-text);font-size:.65rem}
/* Narrow screens keep every column reachable through horizontal scrolling. */
@media(max-width:640px){.ap-channel-processing{padding:.75rem}.ap-channel-processing__controls{width:100%}.ap-channel-processing__controls label{flex:1;min-width:12rem}.ap-channel-processing__controls select{width:100%}.ap-channel-processing__metrics{gap:.8rem 1.3rem}.ap-channel-processing__work table{min-width:630px}}
/* Keep six stable, numbered slots visible as three columns on desktop. */
.ap-channel-processing__slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;align-items:start}
.ap-channel-processing__slots-heading h3{font-size:.95rem}.ap-channel-processing__slots-heading p{font-size:.75rem;color:var(--footer-text)}
.ap-channel-processing__slot{border:1px solid color-mix(in srgb,var(--primary) 20%,transparent);border-radius:4px;padding:.8rem;min-width:0}
/* One native disclosure controls the entire six-slot section without JavaScript. */
.ap-channel-processing__slots-disclosure>summary{cursor:pointer;font-size:.95rem;font-weight:700;text-align:left}
.ap-channel-processing__slots-disclosure[open]>summary{margin-bottom:.65rem}
.ap-channel-processing__slot header{display:flex;align-items:baseline;justify-content:space-between;gap:.4rem;font-size:.75rem}
/* State is conveyed by words as well as a border, including paused and unconfirmed work. */
.ap-channel-processing__slot[data-slot-status="running"]{border-left:3px solid #24703c}
.ap-channel-processing__slot[data-slot-status="waiting"]{border-left:3px solid #a86612}
.ap-channel-processing__slot[data-slot-status="error"]{border-left:3px solid #a72c24}
.ap-channel-processing__slot h4{font-size:.85rem;line-height:1.4;margin:.65rem 0 .35rem;overflow-wrap:anywhere}
.ap-channel-processing__slot [data-slot-activity]{font-size:.76rem;line-height:1.5;overflow-wrap:anywhere;min-height:2.3rem}
/* Timers update in place once a second without rebuilding the slots or the log. */
.ap-channel-processing__slot dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;margin:.7rem 0}
.ap-channel-processing__slot dt{font-size:.65rem;color:var(--footer-text)}
.ap-channel-processing__slot dd{margin:.2rem 0 0;font-size:.8rem;font-weight:750;font-variant-numeric:tabular-nums}
.ap-channel-processing__slot [data-slot-stage],.ap-channel-processing__slot [data-slot-outputs]{font-size:.7rem;color:var(--footer-text)}
/* Preserve the same six numbered positions on tablets and phones. */
@media(max-width:950px){.ap-channel-processing__slots{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.ap-channel-processing__slots{grid-template-columns:1fr}}
