/* Pestaña Polla: ranking con acordeón de detalle por integrante. */

.pool-card { max-width: 860px; margin: 0 auto; }

/* Encabezado y filas comparten la misma grilla */
.pool-header,
.pool-summary {
  display: grid;
  grid-template-columns: 92px 1fr 64px 40px 40px 40px 64px 22px;
  align-items: center;
  gap: 6px;
}

.pool-header {
  padding: 4px 10px 8px;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}

.pool-header .pool-stat,
.pool-header .pool-pos { text-align: center; }

.pool-rows { display: flex; flex-direction: column; }

.pool-row { border-bottom: 1px solid var(--border); }

.pool-row:last-child { border-bottom: 0; }

.pool-summary {
  padding: 10px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}

.pool-summary::-webkit-details-marker { display: none; }

.pool-summary:hover { background: var(--surface-2); }

.pool-row.row-live .pool-summary { background: rgba(255, 77, 109, 0.05); }

.pool-pos {
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

.pool-medal { font-size: 0.78rem; white-space: nowrap; }

.medal-1 { color: #f5c451; }
.medal-2 { color: #cbd5e1; }
.medal-3 { color: #e08e45; }

.pool-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-name .live-tag { margin-left: 6px; }

.pool-stat {
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

.pool-pts {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.pool-pts small {
  margin-left: 3px;
  font-size: 0.62rem;
  color: var(--dim);
  font-weight: 600;
}

.pool-chevron {
  color: var(--dim);
  text-align: center;
  transition: transform 0.2s;
}

.pool-row[open] .pool-chevron { transform: rotate(180deg); }

/* ------------------------------------------------------------- detalle */
.pool-detail { padding: 4px 10px 12px; }

.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr 56px 48px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child { border-bottom: 0; }

.detail-pending { opacity: 0.55; }

.detail-live { background: rgba(255, 77, 109, 0.07); }

.detail-match {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.detail-group {
  flex: none;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--surface);
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 800;
}

.detail-team {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-vs {
  flex: none;
  min-width: 34px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.detail-pred {
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
  font-weight: 700;
}

.pool-note {
  margin: 12px 2px 0;
  color: var(--dim);
  font-size: 0.74rem;
}

/* ------------------------------------------------------------- móvil */
@media (max-width: 600px) {
  .pool-header,
  .pool-summary {
    grid-template-columns: 74px 1fr 56px 36px 22px;
  }

  /* se ocultan ganador, goles sueltos y evaluados; queda 🎯 (desempate) */
  .pool-ganadores, .pool-goles, .pool-evaluados { display: none; }

  .detail-row { grid-template-columns: 1fr 44px 42px; }

  .detail-team { max-width: 72px; }
}
