/**
 * Weave Agent Evals — dashboard styles (new /weave-agent-evals/ section).
 *
 * Self-contained: does not depend on /evals/shared/dashboard.css.
 * Inherits base CSS custom properties and utility classes from the root
 * styles.css (glass-card, gradient-text, section-label, btn-gradient, etc.)
 * which is always loaded before this file.
 */

/* ── Score badge variants ──────────────────────────────────────────── */
.wae-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
}

.wae-badge-green   { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.wae-badge-yellow  { background: rgba(234, 179, 8, 0.15);  color: #eab308; }
.wae-badge-red     { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.wae-badge-slate   { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.wae-badge-pending { background: rgba(168, 85, 247, 0.12); color: #a855f7; }

/* ── Score-over-time chart wrapper ────────────────────────────────── */
.wae-chart-wrapper {
  position: relative;
  height: 300px;
}

/* ── Dashboard table ──────────────────────────────────────────────── */
.wae-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.wae-table th {
  text-align: left;
  color: #94a3b8;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.wae-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  vertical-align: top;
}

.wae-table tr:hover td {
  background: rgba(148, 163, 184, 0.03);
}

/* ── Trend direction indicators ───────────────────────────────────── */
.wae-trend-up   { color: #22c55e; }
.wae-trend-down { color: #ef4444; }
.wae-trend-flat { color: #64748b; }

/* ── Run history strip ────────────────────────────────────────────── */
.wae-run-strip {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.wae-run-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.wae-run-dot-pass { background: #22c55e; }
.wae-run-dot-fail { background: #ef4444; }
.wae-run-dot-unknown { background: #334155; }

/* ── Suite summary card ───────────────────────────────────────────── */
.wae-suite-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.4);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wae-suite-card:hover {
  border-color: rgba(168, 85, 247, 0.28);
  background: rgba(15, 23, 42, 0.55);
}

/* ── Model comparison cell ────────────────────────────────────────── */
.wae-model-cell {
  min-width: 140px;
}

/* ── Section separator label (data-source footer) ─────────────────── */
.wae-data-source {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: #475569;
  margin-top: 0.5rem;
  overflow-wrap: break-word;
  word-break: break-all;
}

/* ── Loading spinner container ────────────────────────────────────── */
.wae-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 0;
  color: #64748b;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
}

/* ── Error / empty state card ─────────────────────────────────────── */
.wae-empty {
  text-align: center;
  padding: 3.5rem 2rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1rem;
}

.wae-empty-title {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 1.125rem;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.wae-empty-msg {
  color: #64748b;
  font-size: 0.875rem;
}

/* ── Stat number display ──────────────────────────────────────────── */
.wae-stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  font-family: "JetBrains Mono", monospace;
}

.wae-stat-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.4rem;
}

/* ── Responsive model comparison table ───────────────────────────── */
@media (max-width: 768px) {
  .wae-table th,
  .wae-table td {
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
  }

  .wae-model-cell {
    min-width: 100px;
  }
}

/* ── Suite detail page — "Details →" link in overview table ────────── */
.wae-detail-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}

.wae-detail-link:hover {
  color: #a855f7;
}

/* ── Suite detail page — explanation block ────────────────────────── */
.wae-suite-explanation {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

/* ── Suite detail page — git SHA code display ─────────────────────── */
.wae-sha {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Suite detail page — artifact download links ──────────────────── */
.wae-artifact-links {
  display: flex;
  flex-direction: column;
}

.wae-artifact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #3B82F6;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.wae-artifact-link:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.wae-artifact-link--md {
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.06);
}

.wae-artifact-link--md:hover {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
}

.wae-artifact-dl-badge {
  font-size: 0.65rem;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

/* ── Scenario history section ─────────────────────────────────────── */
.wae-scenario-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wae-scenario-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.75rem;
  padding: 1.125rem 1.25rem;
  background: rgba(15, 23, 42, 0.4);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wae-scenario-card:hover {
  border-color: rgba(168, 85, 247, 0.22);
  background: rgba(15, 23, 42, 0.55);
}

.wae-scenario-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.wae-scenario-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}

.wae-scenario-meta {
  margin-top: 0.45rem;
}

.wae-scenario-text {
  color: #94a3b8;
  font-size: 0.8125rem;
  line-height: 1.55;
  margin-top: 0.2rem;
}

.wae-scenario-runs {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* ── Scenario run chip strip ──────────────────────────────────────── */
.wae-scenario-chip-strip {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
  margin-top: 0.25rem;
}

/* Individual chip — slightly larger than the overview dot for readability */
.wae-scenario-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  cursor: default;
}

.wae-scenario-chip.wae-run-dot-pass { background: #22c55e; }
.wae-scenario-chip.wae-run-dot-fail { background: #ef4444; }

@media (max-width: 768px) {
  .wae-scenario-card {
    padding: 0.875rem 1rem;
  }

  .wae-scenario-chip {
    width: 11px;
    height: 11px;
  }
}
