/* Leaderboard page styles - extends styles.css */

/* Table section */
.table-section {
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem 0.75rem;
  text-align: left;
}

.leaderboard-table thead th {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.leaderboard-table tbody th {
  font-weight: 400;
}

.leaderboard-table thead tr {
  border-bottom: 1px solid var(--border);
}

.label-caps {
  color: var(--text-muted);
  font-weight: 400;
  font-size: var(--text-size-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

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

.leaderboard-table tbody tr {
  border-bottom: 1px solid var(--border-muted);
}

.leaderboard-table tbody tr:last-child {
  border-bottom: none;
}

.leaderboard-table .rank {
  width: 3.5rem;
}

.leaderboard-table .model {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.provider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.model-id {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

.rating-ci {
  margin-left: 0.625rem;
}

.faq-section {
  margin-top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.faq-title {
  margin-bottom: 0.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  padding: 1.5rem 0;
}

.faq-question {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: block;
}

.faq-question:focus,
.faq-question:focus-visible {
  outline: none;
  box-shadow: none;
}

.faq-question-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.faq-answer {
  margin-top: 0.75rem;
  margin-bottom: 0;
  padding-right: 3rem;
}

.faq-answer[hidden] {
  display: none;
}

.faq-icon {
  position: relative;
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--text-muted);
}

.faq-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.faq-question[aria-expanded="true"] .faq-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.leaderboard-table .delta-cell {
  width: 3.5rem;
  text-align: right;
}

.leaderboard-table td.rank,
.leaderboard-table .rating,
.leaderboard-table .delta-cell,
.rating-ci,
.delta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

.leaderboard-table td.rank,
.rating-ci,
.delta {
  font-size: var(--text-size-sm);
}

.delta.positive {
  color: var(--brand);
}

.delta.negative {
  color: var(--red);
}

/* Responsive */
@media (max-width: 640px) {
  .summary-meta {
    margin-bottom: 2rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.75rem 0.5rem;
  }

  .leaderboard-table .delta-cell,
  .leaderboard-table .rating-ci,
  .leaderboard-table .ci-label {
    display: none;
  }
}
