/* ============================================================================
   Jobs — status bar, job tables, job log stream
   ========================================================================== */

.job-status-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: var(--statusbar-bg);
    color: var(--statusbar-text);
    z-index: var(--z-statusbar);
    font-size: var(--text-base);
    transition: transform var(--transition-slow) ease;
}
.job-status-bar.hidden { transform: translateY(100%); }
.job-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-10);
}
.job-bar-left { display: flex; align-items: center; gap: var(--space-6); }
.job-bar-count {
    background: var(--statusbar-chip-bg);
    padding: var(--space-1) var(--space-5);
    border-radius: var(--radius-xl);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
}
.job-bar-message { color: var(--statusbar-muted); font-size: var(--text-sm); }
.job-bar-link { color: var(--statusbar-link); font-size: var(--text-sm); }
.job-bar-link:hover { color: var(--statusbar-text); }

.jobs-table tbody tr.job-row:hover { background: var(--surface-hover); }
.job-progress-cell { display: flex; flex-direction: column; gap: var(--space-2); }
.job-progress-counts { display: flex; align-items: baseline; gap: var(--space-4); }
.job-progress-count { font-family: var(--font-mono); font-weight: var(--weight-semibold); color: var(--text); }
.job-progress-pct { font-variant-numeric: tabular-nums; }
/* An auto-layout table column is as wide as its widest cell's min-content, and a
   nowrap string's min-content is the whole string. overflow: hidden clips what is
   drawn, it does not shrink what the column asks for, and max-width: 100% resolves
   against a cell whose width this string is itself deciding. So one 400-character
   Azure DevOps error claimed the whole table: every other column collapsed to one
   letter per line, and Duration and Actions were pushed off the right edge behind
   .table-wrap's scrollbar. A length the string cannot argue with is what the
   ellipsis needs to bite on. */
.job-progress-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: clamp(220px, 30vw, 620px);
}

.job-error-card { border-left: var(--border-accent) solid var(--danger); }
.job-error-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-mono);
    font-size: var(--text-base);
    color: var(--danger-on-soft);
    background: var(--danger-soft);
    padding: var(--space-6);
    border-radius: var(--radius-md);
}

.job-log {
    max-height: 520px;
    overflow-y: auto;
    background: var(--code-bg);
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.job-log .empty-state { background: var(--code-bg); color: var(--text-muted); }
.job-log-line {
    display: grid;
    grid-template-columns: 110px 70px 1fr;
    gap: var(--space-6);
    padding: var(--space-2) var(--space-7);
    border-bottom: var(--border-width) solid var(--log-row-border);
}
.job-log-line:hover { background: var(--log-row-hover); }
.job-log-time { color: var(--log-time); font-variant-numeric: tabular-nums; }
.job-log-level { font-weight: var(--weight-semibold); letter-spacing: 0.02em; }
.job-log-info .job-log-level { color: var(--log-info); }
.job-log-warning .job-log-level { color: var(--log-warning); }
.job-log-warning { background: var(--log-warning-bg); }
.job-log-error .job-log-level { color: var(--log-error); }
.job-log-error { background: var(--log-error-bg); }
.job-log-message { word-break: break-word; }

/* The Target column's link out to whatever the job worked on: the commit it reviewed, the pull
   request it judged, the repository it pulled. Reads as a link rather than as a cell of text,
   because the reset strips every anchor back to inherited colour. The arrow only appears on hover,
   so a table of them stays quiet. */
.job-target-link {
    color: var(--text-link);
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-3);
}
.job-target-link:hover { text-decoration: underline; }
.job-target-link .fa { opacity: 0; transition: opacity var(--transition-fast) ease; }
.job-row:hover .job-target-link .fa { opacity: 0.6; }
