/* Pestaña Grupos: tarjetas A–L y mejores terceros. */

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.group-card .card-title { justify-content: flex-start; }

/* Nombres largos: una sola línea con elipsis (el title trae el completo) */
.standings {
  table-layout: fixed;
}

.standings col.col-pos { width: 24px; }
.standings col.col-team { width: auto; }
.standings col.col-num { width: 32px; }
.standings col.col-pj { width: 34px; }
.standings col.col-pts { width: 36px; }

.standings th,
.standings td {
  overflow: hidden;
}

.standings .col-team {
  min-width: 0;
  white-space: nowrap;
}

.standings .team-name {
  display: inline-block;
  min-width: 0;
  max-width: calc(100% - 29px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.standings .col-team .flag {
  vertical-align: middle;
}

.group-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
}

/* Zonas de clasificación */
.standings tr.q-direct td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.standings tr.q-third td:first-child { box-shadow: inset 3px 0 0 var(--amber); }

.standings tr.row-live { background: rgba(255, 77, 109, 0.06); }

/* Leyenda */
.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 12px 2px;
  color: var(--dim);
  font-size: 0.76rem;
}

.legend-item { display: inline-flex; align-items: center; gap: 7px; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.dot-direct { background: var(--accent); }
.dot-third { background: var(--amber); }

/* Mejores terceros */
.thirds-card { margin-top: 4px; }

.thirds-card .table { max-width: 640px; }

/* Móvil: ocultar columnas secundarias para que respire (DG y Pts siempre) */
@media (max-width: 480px) {
  .standings .col-gf, .standings .col-gc { display: none; }

  .standings .team-name { max-width: 110px; }

  .group-card, .thirds-card { overflow-x: auto; }
}

@media (max-width: 360px) {
  .standings .col-g, .standings .col-e, .standings .col-p { display: none; }
}
