﻿/* Extracted from site-new.css. Legacy rules remain in site-new.css until visual verification is complete. */

.task-stats,
.history-list {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.94rem;
  line-height: 1.5;
  white-space: pre-line;
}

.history-list {
  display: grid;
  gap: 0.5rem;
  min-height: 0;
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
}

#history-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

#history-panel .history-list {
  flex: 1 1 auto;
}

.history-row {
  display: grid;
  gap: 0.18rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.history-row:not(.is-unavailable):hover,
.history-row:not(.is-unavailable):focus-visible,
.history-row.is-selected {
  background: var(--secondary);
  box-shadow: 0 0 0 1px rgba(11, 117, 255, 0.24);
  outline: none;
}

.history-row.is-loading {
  cursor: progress;
  opacity: 0.66;
}

.history-row.is-unavailable {
  cursor: default;
  opacity: 0.62;
}

.history-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.history-row strong {
  color: var(--foreground);
  font-size: 0.95rem;
  min-width: 0;
}

.history-row span {
  color: var(--muted-foreground);
  font-size: 0.86rem;
}

.history-download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.85rem;
  padding: 0.25rem 0.48rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
}

.history-download-button::before {
  content: "↓";
  font-size: 0.92rem;
  line-height: 1;
}

.history-download-button:hover:not(:disabled) {
  border-color: rgba(11, 117, 255, 0.42);
  color: var(--primary);
}

.history-download-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.history-download-message {
  color: var(--muted-foreground);
}

.history-row:first-child {
  padding-top: 0;
  border-top: 0;
}
