/* ---- Generic table component ------------------------------------------ */
/* container must own the overflow for sticky headers to work */
.c-table-wrap {
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

.c-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

/* Ensure wrapper fills container */
.c-table-wrap {
  width: 100%;
}

/* guard against migration overrides */
.c-table th,
.c-table td {
  display: table-cell;
  padding: 14px 16px;
  vertical-align: middle;
}

/* sticky header, single row across 4 columns */
.c-table--winners thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(135deg, var(--primary-color), var(--heading-color));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.c-table--winners thead th:first-child {
  border-top-left-radius: 8px;
}
.c-table--winners thead th:last-child {
  border-top-right-radius: 8px;
}

/* Basic row styling */
.c-table--winners tbody tr {
  position: relative;
}
/* Remove left accent bar to keep perfect column alignment across all rows */
.c-table--winners tbody tr::before { display: none; }

/* Light zebra rows (subtle) for non-top rows to avoid visual jumps */
.c-table--winners tbody tr:nth-child(odd):not(.winner-gold):not(.winner-silver):not(.winner-bronze) {
  background: #fafafa;
}
.c-table--winners tbody tr:nth-child(even):not(.winner-gold):not(.winner-silver):not(.winner-bronze) {
  background: #ffffff;
}

/* TOP 3 WINNER HIGHLIGHTING — match overall leaderboard: accent stripe only */
.c-table--winners tbody tr.winner-gold { box-shadow: inset 4px 0 0 var(--gold-1); }
.c-table--winners tbody tr.winner-silver { box-shadow: inset 4px 0 0 var(--silver-1); }
.c-table--winners tbody tr.winner-bronze { box-shadow: inset 4px 0 0 var(--bronze-1); }

/* Column widths and alignment */
.c-table--winners td:nth-child(1),
.c-table--winners th:nth-child(1) {
  width: 72px;
  text-align: center;
  font-weight: 700;
}

.c-table--winners td:nth-child(2),
.c-table--winners th:nth-child(2) {
  text-align: left;
  font-weight: 600;
}

/* numeric right align */
.c-table--winners td.is-num,
.c-table--winners td:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--primary-color);
}
.c-table--winners th.is-num,
.c-table--winners thead th:nth-child(3) {
  text-align: right;
  color: #fff;
}

.c-table--winners td:nth-child(4),
.c-table--winners th:nth-child(4) {
  text-align: right;
}

/* Uniform row sizing like index table */
.c-table--winners thead th,
.c-table--winners tbody tr {
  height: 56px;
}
.c-table--winners th,
.c-table--winners td {
  padding: 14px 16px;
}

/* badge */
.c-chip {
  display: inline-block;
  min-width: 40px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  background: #28f0b0;
  color: #0b1330;
  text-align: center;
}

/* muted text */
.muted {
  color: #6b7280;
  font-size: 12px;
}

/* a11y hidden */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* responsive */
@media (max-width: 640px) {
  .c-table th,
  .c-table td {
    padding: 12px;
  }
}
