.queueTasks {
  margin: 1rem;
  font-family: var(--vscode-font-family);
  color: var(--vscode-foreground);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  overflow-y: auto;
  margin: 1rem 0;
  min-height: 0; /* critical for scrolling */
}
.queueTasksList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 5px !important;
}

.queueTaskItem {
  position: relative;
  border-radius: 7px;
  padding: 16px 20px;
  background: var(--vscode-editorWidget-background);
  color: var(--vscode-foreground);
  /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); */
  display: flex;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Optimizing → bluish gradient */
.queueTaskItem.optimizing,
.queueTaskItem.initializing {
  background:
    linear-gradient(
      to right,
      rgba(10, 102, 194, 0.1) 0%,
      rgba(10, 102, 194, 0.05) 50%,
      rgba(10, 102, 194, 0) 100%
    ),
    var(--vscode-editorWidget-background);
}

/* Queued → yellowish gradient */
.queueTaskItem.queued {
  background:
    linear-gradient(
      to right,
      rgba(181, 137, 0, 0.1) 0%,
      rgba(181, 137, 0, 0.05) 50%,
      rgba(181, 137, 0, 0) 100%
    ),
    var(--vscode-editorWidget-background);
}

/* Completed → greenish gradient */
.queueTaskItem.completed {
  background:
    linear-gradient(
      to right,
      rgba(34, 134, 58, 0.1) 0%,
      rgba(34, 134, 58, 0.05) 50%,
      rgba(34, 134, 58, 0) 100%
    ),
    var(--vscode-editorWidget-background);
}

/* Failed → reddish gradient */
.queueTaskItem.failed {
  background:
    linear-gradient(
      to right,
      rgba(215, 58, 73, 0.2) 0%,
      rgba(215, 58, 73, 0.1) 50%,
      rgba(215, 58, 73, 0) 100%
    ),
    var(--vscode-editorWidget-background);
}

/* Skipped → neutral gray gradient */
.queueTaskItem.skipped,
.queueTaskItem.canceled,
.queueTaskItem.rejected {
  background:
    linear-gradient(
      to right,
      rgba(106, 115, 125, 0.2) 0%,
      rgba(106, 115, 125, 0.1) 50%,
      rgba(106, 115, 125, 0) 100%
    ),
    var(--vscode-editorWidget-background);
}

/* === Header: title + status === */
.taskItemLabel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queueTaskName {
  font-size: 14px;
  font-weight: 600;
}

.queueTaskName .functionName {
  cursor: pointer;
  font-weight: 600;
  color: var(--vscode-editor-foreground);
  padding-bottom: 4px;
}
.queueTaskName .functionName:hover {
  text-decoration: underline;
}

.queueTaskName .filePath {
  color: var(--vscode-descriptionForeground);
  font-size: 0.85em;
}
/* === Status badge === */
.queueTaskStatus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: capitalize;
}

/* Optimizing → bluish */
.queueTaskStatus.optimizing,
.queueTaskStatus.initializing {
  color: #1d79d4; /* readable blue */
  background: rgba(10, 102, 194, 0.15);
}

/* Queued → yellowish */
.queueTaskStatus.queued {
  color: #b58900; /* golden yellow */
  background: rgba(181, 137, 0, 0.15);
}

/* Completed → greenish */
.queueTaskStatus.completed {
  color: #2da549; /* soft green */
  background: rgba(34, 134, 58, 0.15);
}

/* Failed → reddish */
.queueTaskStatus.failed {
  color: #d73a49; /* red */
  background: rgba(215, 58, 73, 0.15);
}

/* Skipped → neutral gray */
.queueTaskStatus.skipped,
.queueTaskStatus.canceled,
.queueTaskStatus.rejected {
  color: #8e96a0; /* muted gray */
  background: rgba(106, 115, 125, 0.15);
}

.taskItemHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* === Description text === */
.queueTaskDescription {
  font-size: 13px;
  line-height: 1.4;
  color: var(--vscode-descriptionForeground);
  opacity: 0.9;
}

/* === Error message === */
.queueTaskError {
  font-size: 12px;
  color: var(--vscode-errorForeground);
  background: rgba(255, 0, 0, 0.1);
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 4px;
  display: none;
}

.queueTaskDescription,
.queueTaskError {
  width: fit-content;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queueTaskItem.hasError .queueTaskError {
  display: block;
}

/* === Action buttons === */
.queueTaskActions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* Minimal ghost-style buttons */
.queueTaskDelete {
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--vscode-input-border);
  padding: 4px 10px;
  background: transparent;
  color: var(--vscode-foreground);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.queueTaskDelete:hover {
  background: var(--vscode-list-hoverBackground);
  border-color: var(--vscode-focusBorder);
}

.queueTaskPatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  color: #3fc05d; /* soft green */
  background: rgba(34, 134, 58, 0.15);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border 0.15s ease;
}

.queueTaskPatch:hover {
  background: rgba(34, 134, 58, 0.2);
  color: #55d172;
}

.queueTaskPrLink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  color: #58a6ff; /* GitHub blue */
  background: rgba(88, 166, 255, 0.15);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border 0.15s ease;
}

.queueTaskPrLink:hover {
  background: rgba(88, 166, 255, 0.25);
  color: #79b8ff;
}

.ghostActionButton {
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--vscode-input-border);
  padding: 4px;
  background: transparent;
  color: var(--vscode-foreground);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.ghostActionButton:hover {
  background: var(--vscode-list-hoverBackground);
  color: var(--vscode-foreground);
}
.queueTaskPatch,
.queueTaskPrLink,
.ghostActionButton {
  flex-shrink: 0;
}

/* === Empty state === */
.queueEmptyState {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 10px;
  background: var(--vscode-editorWidget-background);
  border: 1px dashed var(--vscode-input-border);
  margin: 8px;
}

.queueEmptyContent {
  text-align: center;
  color: var(--vscode-descriptionForeground);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

.queueEmptyContent .codicon {
  font-size: 20px;
  color: var(--vscode-foreground);
  opacity: 0.7;
}

.queueEmptyHint {
  font-size: 11px;
  color: var(--vscode-descriptionForeground);
  opacity: 0.8;
}

.queueTasksHeader {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--vscode-editorWidget-background);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.queueTasksTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--vscode-foreground);
}

.queueTasksChevron {
  font-size: 14px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.queueTasksHeader.collapsed .queueTasksChevron {
  transform: rotate(0deg);
}

.queueTasksHeader.expanded .queueTasksChevron {
  transform: rotate(180deg);
}

.options {
  position: absolute;
  top: calc(100% + 4px); /* right below the button */
  left: 0;
  min-width: 180px;
  background: var(--vscode-editorWidget-background);
  border: 1px solid var(--vscode-input-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 6px 4px;
  z-index: 1000;
}

.options span {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--vscode-foreground);
  cursor: pointer;
  border-radius: 4px;
}

.options span:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.options span.disabled {
  color: var(--vscode-descriptionForeground);
  cursor: not-allowed;
}

/* Minimal "logs" button */
.actionButton {
  font-size: 12px;
  border: 1px solid var(--vscode-input-border);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vscode-foreground);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
  outline: none;
}

.actionButton:hover {
  background: var(--vscode-list-hoverBackground);
  border-color: var(--vscode-focusBorder);
}

.queueTasksContent {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
