/**
 * Vibe Coder Journal - Benchmark Tables Styling
 * Externalized from inline HTML payloads for efficient HTTP caching.
 */

.vcj-table-container,
.c-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--s4, 1.5rem) 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 4px);
  background-color: var(--bg, #ffffff);
}

.vcj-table,
.c-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: var(--fs-sm, 0.875rem);
  line-height: var(--lh-tight, 1.3);
  text-align: left;
}

.vcj-table th,
.c-table th {
  background-color: var(--bg-subtle, #f8fafc);
  color: var(--ink-2, #475569);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--s2, 0.5rem) var(--s3, 0.75rem);
  border-bottom: 2px solid var(--border-strong, #cbd5e1);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

.vcj-table th:hover,
.c-table th:hover {
  color: var(--ink, #0f172a);
}

.vcj-table td,
.c-table td {
  padding: var(--s3, 0.75rem);
  border-bottom: 1px solid var(--border, #e2e8f0);
  vertical-align: middle;
}

.vcj-table tr:last-child td,
.c-table tr:last-child td {
  border-bottom: none;
}

.vcj-table tr:hover td,
.c-table tr:hover td {
  background-color: var(--bg-hover, #f1f5f9);
}

.vcj-score-cell {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.vcj-score-high {
  color: #059669;
}

.vcj-score-mid {
  color: #d97706;
}

.vcj-score-low {
  color: #dc2626;
}

.vcj-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 800;
  border-radius: 3px;
  background-color: var(--bg-subtle, #f1f5f9);
  color: var(--ink-2, #475569);
  border: 1px solid var(--border, #cbd5e1);
}

.vcj-rank-badge-1 {
  background-color: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}

.vcj-rank-badge-2 {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #94a3b8;
}

.vcj-rank-badge-3 {
  background-color: #ffedd5;
  color: #c2410c;
  border-color: #fdba74;
}

.vcj-filter-bar {
  display: flex;
  gap: var(--s2, 0.5rem);
  margin-bottom: var(--s3, 0.75rem);
  flex-wrap: wrap;
  align-items: center;
}

.vcj-search-input {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--fs-xs, 0.75rem);
  padding: 6px 12px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: var(--radius, 4px);
  background: var(--bg, #ffffff);
  color: var(--ink, #0f172a);
  max-width: 260px;
}

.vcj-search-input:focus {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: -1px;
}
