/* ============================================================
   IDE.ProcessView — process table dock above IDE.LogView.
   See CognitiveEnhancer/ACTION_PROCESS_ARCHITECTURE.md §6.2.
   ============================================================ */

.ide-process-view {
  position: fixed;
  left: 0;
  right: 0;
  /* Sits above IDE.LogView (which uses bottom: 0, height 32px collapsed
     / 220px open). 32px is the LogView's collapsed-header height —
     when both are open the user resizes them independently. */
  bottom: 32px;
  z-index: 1051;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar, #12122a);
  color: var(--text, #e6e6f0);
  border-top: 2px solid var(--accent, #4a78c4);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  height: 220px;
}

.ide-process-view--collapsed {
  height: 32px !important;
}

.ide-process-view--collapsed .ide-process-view-body,
.ide-process-view--collapsed .ide-process-view-handle {
  display: none;
}

.ide-process-view-handle {
  height: 5px;
  cursor: row-resize;
  background: var(--border, #3a3a5e);
  flex-shrink: 0;
  transition: background 0.15s;
}
.ide-process-view-handle:hover {
  background: var(--accent, #4a78c4);
}

.ide-process-view-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  background: var(--bg-elev, #1a1a36);
  height: 27px;
}

.ide-process-view-chev {
  background: transparent;
  border: none;
  color: var(--text-muted, #a0a0b0);
  cursor: pointer;
  font-family: monospace;
  font-size: 14px;
  padding: 0 4px;
}

.ide-process-view-title {
  font-weight: 600;
  font-size: 12px;
}

.ide-process-view-badges {
  display: inline-flex;
  gap: 6px;
}

.ide-pv-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
}
.ide-pv-badge-run {
  background: #4a9eff;
  color: #fff;
}
.ide-pv-badge-pause {
  background: #f5a524;
  color: #1a1a36;
}

.ide-process-view-spacer {
  flex: 1;
}

.ide-process-view-hint {
  font-size: 11px;
  color: var(--text-muted, #a0a0b0);
}

.ide-process-view-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
  min-height: 0;
}

/* Split: process list on the left, run output on the right. They share the
   panel header, so they expand / collapse together. */
.ide-pv-split {
  display: flex;
  height: 100%;
  min-height: 0;
}
.ide-pv-listpane {
  flex: 1 1 60%;
  overflow: auto;
  padding: 4px 10px 10px;
  min-width: 0;
}
.ide-pv-outpane {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--border, #3a3a5e);
  background: var(--bg, #0e0e22);
}
.ide-pv-out-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border, #3a3a5e);
  background: var(--bg-elev, #1a1a36);
}
.ide-pv-out-title {
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ide-pv-out-copy {
  background: transparent;
  border: 1px solid var(--border, #3a3a5e);
  color: var(--text, #e6e6f0);
  border-radius: 3px;
  padding: 0 6px;
  cursor: pointer;
  font-size: 12px;
}
.ide-pv-out-copy:hover {
  border-color: var(--accent, #4a78c4);
}
.ide-pv-out-body {
  flex: 1;
  overflow: auto;
  padding: 4px 8px;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 11px;
  line-height: 1.45;
}
.ide-pv-out-empty {
  color: var(--text-muted, #a0a0b0);
  padding: 8px 2px;
}
.ide-pv-out-line {
  display: flex;
  gap: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 1px 0;
}
.ide-pv-out-tag {
  flex-shrink: 0;
  color: var(--text-muted, #8d8daf);
  text-transform: uppercase;
  font-size: 9px;
  padding-top: 1px;
  min-width: 64px;
}
.ide-pv-out-text {
  flex: 1;
  min-width: 0;
}
.ide-pv-out-assistant .ide-pv-out-text,
.ide-pv-out-result .ide-pv-out-text {
  color: var(--text, #e6e6f0);
}
.ide-pv-out-progress .ide-pv-out-text,
.ide-pv-out-log .ide-pv-out-text {
  color: var(--text-muted, #a0a0b0);
}
.ide-pv-out-tool .ide-pv-out-text {
  color: var(--accent, #7fb0ff);
}
.ide-pv-out-error .ide-pv-out-text {
  color: #ff8585;
}
.ide-pv-row-selected > td {
  background: rgba(74, 120, 196, 0.18);
}

.ide-pv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.ide-pv-table th,
.ide-pv-table td {
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
}
.ide-pv-table th {
  color: var(--text-muted, #a0a0b0);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border, #3a3a5e);
}
.ide-pv-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ide-pv-state {
  display: inline-block;
  width: 1.4em;
  text-align: center;
  font-weight: 700;
}
.ide-pv-state-running {
  color: #4a9eff;
}
.ide-pv-state-paused {
  color: #f5a524;
}
.ide-pv-state-done {
  color: #2bb673;
}
.ide-pv-state-fail {
  color: #ff7878;
}
.ide-pv-state-cancel {
  color: #b0b0c0;
}
.ide-pv-state-pending {
  color: #8a8a99;
}

.ide-pv-action {
  font-weight: 600;
  color: var(--text, #e6e6f0);
}
.ide-pv-msg {
  color: var(--text-muted, #a0a0b0);
  font-size: 10.5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.ide-pv-muted {
  color: var(--text-muted, #a0a0b0);
}
.ide-pv-mono {
  font-family: var(--mono-font, ui-monospace, SF Mono, Menlo, monospace);
  font-variant-numeric: tabular-nums;
}

.ide-pv-progress {
  position: relative;
  height: 12px;
  width: 120px;
  background: var(--bg-input, #0f0f1e);
  border-radius: 2px;
  overflow: hidden;
}
.ide-pv-progress-fill {
  background: var(--accent, #4a78c4);
  height: 100%;
  transition: width 0.2s;
}
.ide-pv-progress span {
  position: absolute;
  inset: 0;
  text-align: center;
  font-size: 10px;
  line-height: 12px;
  color: #fff;
}
/* An ESTIMATE bar (no real fraction reported — drawn from how long this
   usually takes) reads visibly softer than a reported one, and its label
   carries the "~". */
.ide-pv-progress--est .ide-pv-progress-fill {
  opacity: 0.45;
}

.ide-pv-user {
  background: var(--bg-input, #0f0f1e);
  border: 1px solid var(--border, #3a3a5e);
  border-radius: 9px;
  padding: 1px 8px;
  font-size: 10.5px;
}

/* DURABLE_RUNS RX-0 — which computer is doing this. ⚠ `--text`, not
   `--text-muted`: it names a machine somebody may have to go and look at, and
   #8d8daf is 4.35:1 on this ground, under AA. The chip's job is done by its
   border and its size, never by lowering the contrast (UL-0's measurement,
   one surface along). */
.ide-pv-where {
  display: inline-block;
  margin-left: 8px;
  background: var(--bg-input, #0f0f1e);
  border: 1px solid var(--border, #3a3a5e);
  border-radius: 9px;
  padding: 1px 8px;
  font-size: 10.5px;
  color: var(--text, #e6e6f0);
}

.ide-pv-ctrls {
  white-space: nowrap;
}
.ide-pv-ctrls button {
  background: transparent;
  border: 1px solid var(--border, #3a3a5e);
  color: var(--text, #e6e6f0);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  cursor: pointer;
  margin-right: 4px;
}
.ide-pv-ctrls button:hover {
  border-color: var(--accent, #4a78c4);
}
.ide-pv-ctrls button.ide-pv-disabled,
.ide-pv-ctrls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.ide-pv-ctrls button.ide-pv-disabled:hover,
.ide-pv-ctrls button:disabled:hover {
  border-color: var(--border, #3a3a5e);
}

.ide-pv-empty {
  text-align: center;
  color: var(--text-muted, #a0a0b0);
  padding: 16px;
}

/* GT-4 (2026-08-07 review) — a failed "how was this made?" says so ON the
   button, not only in a tooltip nobody hovers. Applied briefly, then removed. */
.ide-process-view button.pv-btn-error {
  color: #d93025;
  border-color: #d93025;
}

/* T1.3 — a run that stopped to ask.
 *
 * ⚠⚠ These buttons carry WORDS, not glyphs, so they cannot inherit the icon
 * button sizing the rest of the control strip uses. ⚠ `color` is set
 * explicitly on both: a class on a <button> does not inherit it (the UA sheet
 * says `color: buttontext`, i.e. black on this dark shell), which is the
 * PLUGIN_ARCHITECTURE §3b trap and has cost this estate a 1.23:1 control
 * before.
 */
.ide-pv-asking {
  color: var(--warn, #e0a800);
  font-weight: 600;
  white-space: nowrap;
}
.ide-pv-yes,
.ide-pv-no {
  font: inherit;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.ide-pv-yes {
  background: var(--accent, #4a7fd0);
  color: #fff;
  border: 1px solid var(--accent, #4a7fd0);
}
.ide-pv-no {
  background: transparent;
  color: var(--text, #e6e6ee);
  border: 1px solid var(--border, #3a3a4a);
}
.ide-pv-yes:hover {
  background: var(--accent-hover, #5b90e0);
}
.ide-pv-no:hover {
  background: var(--bg-hover, #2a2a38);
}
.ide-pv-yes[disabled],
.ide-pv-no[disabled] {
  opacity: 0.55;
  cursor: default;
}
