.ctx-panel-toggle {
  display: none;
  position: relative;
}

.review-stop-reason {
  padding: 10px;
  margin: 10px 0;
  border: 1px solid var(--stroke);
  border-left: 3px solid #bf6b58;
  border-radius: 8px;
  background: var(--card2);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.review-stop-reason p {
  margin: 6px 0 0;
}
.image-set-overview {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 8px;
}
.image-set-slots,
.image-slot-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.image-set-slots .btn,
.image-slot-versions .btn {
  font-size: 11px;
  padding: 5px 8px;
}
.image-set-slot[data-verdict="pass"] {
  color: #4c9a74;
}
.image-set-slot[data-verdict="fail"],
.image-set-slot[data-verdict="unknown"] {
  color: #bf6b58;
}

.ctx-panel-toggle[hidden] {
  display: none;
}

.ctx-panel-toggle[aria-expanded="true"] {
  color: var(--a1);
  border-color: var(--a1);
  background: var(--purple-bg);
}

.ctx-panel-toggle[data-process-state="running"]::after,
.ctx-panel-toggle[data-process-state="attention"]::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--a1);
}

.ctx-panel-toggle[data-process-state="attention"]::after {
  background: #e67b54;
}

.ctx-image-process,
#ctxImageJobs {
  min-width: 0;
}

#ctxImageJobs {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

#ctxImageJobs .ctx-empty {
  margin: 0;
}

#ctxImageJobs:has(> :not(.ctx-empty)) > .ctx-empty {
  display: none;
}

#ctxImageJobs > details {
  min-width: 0;
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: var(--card2);
  overflow: hidden;
}

#ctxImageJobs > details > summary {
  cursor: pointer;
  padding: 9px 11px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#ctxImageJobs > details[open] > summary {
  border-bottom: 1px solid var(--stroke);
}

#ctxImageJobs .img-job {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 11px;
  border-radius: 11px;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}

#ctxImageJobs > details > .img-job {
  border: 0;
  border-radius: 0;
  background: transparent;
}

#ctxImageJobs .job-head {
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

#ctxImageJobs .job-head .badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

#ctxImageJobs .job-prompt {
  order: 3;
  flex-basis: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

#ctxImageJobs .review-note,
#ctxImageJobs .review-clock,
#ctxImageJobs .job-reference-note,
#ctxImageJobs .job-error,
#ctxImageJobs .review-prompt {
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#ctxImageJobs .review-process {
  margin-top: 9px;
  padding-top: 8px;
}

#ctxImageJobs .review-slot,
#ctxImageJobs .review-group,
#ctxImageJobs .review-plan {
  min-width: 0;
  margin-top: 8px;
  padding: 9px;
}

#ctxImageJobs .review-checks li {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  margin: 6px 0;
}

#ctxImageJobs .review-verdict {
  margin-right: 5px;
  font-weight: 700;
}

#ctxImageJobs .review-attempt .job-grid,
#ctxImageJobs .image-delivery {
  max-width: 100%;
}

#ctxImageJobs .job-candidates {
  margin-top: 8px;
  border-top: 1px solid var(--stroke);
  padding-top: 8px;
}

#ctxImageJobs .job-candidates > summary {
  cursor: pointer;
  font-size: 11px;
  line-height: 1.5;
}

#ctxImageJobs .job-candidates .image-delivery {
  margin: 9px 0 0;
}

#ctxImageJobs .review-stop {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

#ctxImageJobs .review-retry-action {
  border-top: 1px solid var(--stroke);
  margin-top: 10px;
  padding-top: 8px;
}

#ctxImageJobs .review-retry-action .btn {
  width: 100%;
  justify-content: center;
  white-space: normal;
}

#ctxImageJobs .task-diagnostic-actions {
  align-items: stretch;
}
#ctxImageJobs .task-diagnostic-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1280px) {
  .ctx-panel-toggle {
    display: inline-flex;
  }

  #ctxPanel.force {
    width: min(302px, 100%);
  }
}
