/* Classifica singola gara — tabelle leggibili ad alto contrasto */
body.classifica-gara {
  background: radial-gradient(circle at 50% -10%, #2a1408 0, var(--ei-bg) 42rem);
}

.classifica-gara .ei-page-hero {
  padding: 2.5rem 1rem 1.5rem;
  margin-bottom: 0.5rem;
}

.classifica-gara .ei-page-hero h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  word-break: break-word;
}

.classifica-gara .ei-category-block {
  margin-bottom: 2.75rem;
}

.classifica-gara .ei-category-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.45rem 1rem;
  border-left: 4px solid var(--ei-orange);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 101, 0, 0.12);
  color: var(--ei-gold);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  letter-spacing: 0.04em;
}

.classifica-gara .table-responsive {
  margin-bottom: 0;
  background: var(--ei-surface-2);
  box-shadow: var(--ei-shadow);
}

.classifica-gara .table {
  margin-bottom: 0;
  color: #f5f5f5;
  background: transparent;
}

.classifica-gara .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-color: var(--ei-border) !important;
  background: linear-gradient(135deg, #3a2210, #22160c) !important;
  color: #fff !important;
  font-family: "Roboto", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.classifica-gara .table tbody tr {
  background: #1a1a1a !important;
  color: #f5f5f5 !important;
  transition: background-color 0.15s ease;
}

.classifica-gara .table tbody tr:nth-of-type(even) {
  background: #232323 !important;
}

.classifica-gara .table-hover tbody tr:hover {
  background: #2f2418 !important;
  color: #fff !important;
}

.classifica-gara .table td,
.classifica-gara .table th {
  border-color: rgba(255, 255, 255, 0.1) !important;
  vertical-align: middle;
  padding: 0.85rem 0.75rem;
}

.classifica-gara .table td {
  color: #f5f5f5 !important;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.classifica-gara .table td a:not(.btn) {
  color: #fff !important;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 211, 78, 0.55);
  text-underline-offset: 2px;
}

.classifica-gara .table td a:not(.btn):hover,
.classifica-gara .table td a:not(.btn):focus {
  color: var(--ei-gold) !important;
}

/* Podio: bordo + tinta scura, testo sempre chiaro */
.classifica-gara .table tbody tr.gold {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.22), rgba(255, 215, 0, 0.06)) !important;
  box-shadow: inset 4px 0 0 #ffd700;
}

.classifica-gara .table tbody tr.silver {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.06)) !important;
  box-shadow: inset 4px 0 0 #c0c0c0;
}

.classifica-gara .table tbody tr.bronze {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.24), rgba(205, 127, 50, 0.07)) !important;
  box-shadow: inset 4px 0 0 #cd7f32;
}

.classifica-gara .table tbody tr.gold td,
.classifica-gara .table tbody tr.silver td,
.classifica-gara .table tbody tr.bronze td {
  color: #fff !important;
  font-weight: 600;
}

.classifica-gara .table tbody tr.gold td:first-child,
.classifica-gara .table tbody tr.silver td:first-child,
.classifica-gara .table tbody tr.bronze td:first-child {
  color: #fff !important;
}

.classifica-gara .table tbody tr.gold .medal {
  color: #ffd700;
}

.classifica-gara .table tbody tr.silver .medal {
  color: #e8e8e8;
}

.classifica-gara .table tbody tr.bronze .medal {
  color: #e8a86b;
}

.classifica-gara .medal {
  margin-right: 0.4rem;
}

.classifica-gara .table .btn-group .btn {
  min-height: 34px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
}

.classifica-gara .table .btn-primary {
  color: #fff !important;
}

.classifica-gara .table .btn-outline-secondary {
  color: #eee !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: transparent;
}

.classifica-gara .table .btn-outline-secondary:hover,
.classifica-gara .table .btn-outline-secondary:focus {
  color: #111 !important;
  background: #eee !important;
  border-color: #eee !important;
}

.classifica-gara .ei-back-link {
  margin-top: 1rem;
}

@media (max-width: 575.98px) {
  .classifica-gara .table td,
  .classifica-gara .table th {
    padding: 0.65rem 0.5rem;
    font-size: 0.92rem;
  }

  .classifica-gara .table .btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .classifica-gara .table .btn-group .btn {
    width: 100%;
  }
}
