/* Shared styles for the project-view Issues and Pull Requests sections.
 * Reuses Dashboard tokens (--divider, --text-faint, --hover-bg-subtle) so
 * spacing matches the workspace card grid above and the archived list
 * below it.
 */

.headerRight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.refreshButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  font-family: inherit;
  background: transparent;
  color: var(--text-faint);
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.refreshButton:hover:not(:disabled) {
  background: var(--hover-bg);
  border-color: var(--divider);
  color: var(--text-muted);
}

.refreshButton:disabled {
  opacity: 0.5;
  cursor: progress;
}

.refreshSpinning {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.scopeTabs {
  display: inline-flex;
  gap: 2px;
  margin-left: 6px;
  background: var(--hover-bg-subtle);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 2px;
}

.scopeTab {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
}

.scopeTab:hover {
  color: var(--text-muted);
}

.scopeTabActive {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Collapsible "In progress" / "Open" group inside a project-view list
   (issue #898). Groups stack with a small gap; each gets a faint
   uppercase sub-header. */
.group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.group + .group {
  margin-top: 8px;
}

.groupHeader {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 2px 4px;
  margin: 0;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.groupHeader:hover {
  color: var(--text-muted);
}

/* The "In progress" group reads in the accent color so dispatched
   work is obvious at a glance. */
.groupHeaderAccent {
  color: var(--accent-primary);
}

.groupHeaderAccent:hover {
  color: var(--accent-primary);
}

.groupLabel {
  line-height: 1;
}

.groupCount {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  opacity: 0.8;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: var(--hover-bg-subtle);
  border: 1px solid var(--divider);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.row:hover {
  background: var(--hover-bg);
  border-color: var(--text-faint);
}

.rowNumber {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 48px;
}

.rowIcon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.rowTitle {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rowMeta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 11px;
}

.rowBranch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.rowCommentCount {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.rowAge {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.labels {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.label {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: var(--hover-bg);
  color: var(--text-muted);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Applied when the SCM provider supplied a label color. `--label-color`
   is set inline (the raw maintainer-chosen hex — content, not a theme
   token); the alpha tinting is composed here so the component stays
   free of color math. Low alpha on the fill keeps text readable in
   both themes; the border uses a stronger mix to stay visible on
   hover backgrounds. */
.labelColored {
  background: color-mix(in srgb, var(--label-color) 13%, transparent);
  border-color: color-mix(in srgb, var(--label-color) 40%, transparent);
  color: var(--text-primary);
}

.labelMore {
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* "In progress" badge: an issue/PR row whose work is already underway in
   a Claudette workspace (issue #898). Accent-tinted pill, clickable to
   jump straight to that workspace. The alpha tints reuse the same
   color-mix idiom as `.labelColored` so the badge sits on hover
   backgrounds without a hard fill. */
.workspaceBadge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  max-width: 150px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 38%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.workspaceBadge:hover {
  background: color-mix(in srgb, var(--accent-primary) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent-primary) 55%, transparent);
}

.workspaceBadgeName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted {
  font-size: 12px;
  color: var(--text-faint);
  padding: 6px 12px;
}

.error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
}

/* Non-destructive variant for the "cached rows shown alongside a
 * refresh failure" path. Sits above the list with subtle muted chrome
 * so the user can see their data and the error without one displacing
 * the other.
 */
.errorBanner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--hover-bg-subtle);
  border: 1px solid var(--divider);
  border-radius: 6px;
}

.retryButton {
  font-family: inherit;
  font-size: 11px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--divider);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
}

.retryButton:hover {
  background: var(--hover-bg);
  border-color: var(--text-faint);
  color: var(--text-primary);
}

.skeletonRow {
  height: 28px;
  background: var(--hover-bg-subtle);
  border: 1px solid var(--divider);
  border-radius: 6px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

