/* AFFCUP Público - tabla, fixture y resultados */
.affcup-pub {
  --aff-verde: #1d5c2b;       /* verde institucional (encabezado del sitio) */
  --aff-verde-medio: #2e7d3a;
  --aff-lima: #8cc63f;        /* verde claro del subtítulo */
  --aff-suave: #eef6e8;
  --aff-texto: #1f2a22;
  --aff-gris: #6b756d;
  --aff-borde: #dfe7db;
  --aff-fondo: #ffffff;

  color: var(--aff-texto);
  font-size: 15px;
  line-height: 1.4;
}
.affcup-pub *, .affcup-pub *::before, .affcup-pub *::after { box-sizing: border-box; }

/* Filtros */
.affcup-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  background: var(--aff-fondo);
  border: 1px solid var(--aff-borde);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.affcup-campo { display: flex; align-items: center; gap: 8px; margin: 0; }
.affcup-campo span { font-weight: 700; font-size: 13px; }
.affcup-campo select {
  min-width: 120px;
  padding: 6px 30px 6px 10px;
  border: 1px solid var(--aff-borde);
  border-radius: 6px;
  background-color: #fff;
  color: var(--aff-texto);
  font-size: 14px;
}
.affcup-campo select:focus-visible { outline: 2px solid var(--aff-lima); outline-offset: 1px; }

/* Grilla de dos columnas */
.affcup-grilla {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.affcup-grilla--sola { grid-template-columns: minmax(0, 1fr); }

.affcup-panel {
  background: var(--aff-fondo);
  border: 1px solid var(--aff-borde);
  border-radius: 8px;
  overflow: hidden;
}
.affcup-panel__cab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--aff-verde-medio);
  color: #fff;
  padding: 10px 14px;
}
.affcup-panel__cab h3 { margin: 0; font-size: 15px; color: #fff; }
.affcup-panel__cab span { font-size: 13px; opacity: .9; }

/* Partidos */
.affcup-partidos { list-style: none; margin: 0; padding: 0; }
.affcup-partido {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--aff-borde);
}
.affcup-partido:last-child { border-bottom: 0; }
.affcup-eq {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  text-transform: uppercase;
}
.affcup-eq > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.affcup-eq--vis { justify-content: flex-end; text-align: right; }
.affcup-escudo { width: 22px; height: 22px; object-fit: contain; flex: none; }

.affcup-marcador,
.affcup-hora,
.affcup-estado {
  justify-self: center;
  min-width: 54px;
  text-align: center;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.affcup-marcador { background: var(--aff-verde); color: #fff; }
.affcup-hora { background: var(--aff-suave); color: var(--aff-verde); }
.affcup-estado { background: #fff4e0; color: #8a5a00; font-weight: 600; font-size: 12px; }

.affcup-info {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--aff-gris);
  font-size: 12px;
}
.affcup-libre {
  margin: 0;
  padding: 9px 14px;
  background: var(--aff-suave);
  font-size: 13px;
}

/* Tabla */
.affcup-scroll { overflow-x: auto; }
.affcup-tabla {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.affcup-tabla th,
.affcup-tabla td {
  padding: 7px 8px;
  text-align: center;
  border: 0;
  border-bottom: 1px solid var(--aff-borde);
  white-space: nowrap;
}
.affcup-tabla thead th {
  background: var(--aff-verde-medio);
  color: #fff;
  font-weight: 700;
}
.affcup-tabla tbody tr:nth-child(even) { background: #f7faf5; }
.affcup-tabla .affcup-izq { text-align: left; }
.affcup-pts { font-weight: 800; }
.affcup-pos {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aff-verde-medio);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.affcup-tabla tr.affcup-clasifica td:first-child { box-shadow: inset 4px 0 0 var(--aff-lima); }
.affcup-tabla tr.affcup-clasifica .affcup-pos { background: var(--aff-lima); color: var(--aff-verde); }

.affcup-nota {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--aff-gris);
}
.affcup-muestra { width: 12px; height: 12px; border-radius: 50%; background: var(--aff-lima); }

.affcup-aviso {
  margin: 0;
  padding: 16px;
  color: var(--aff-gris);
  text-align: center;
}

/* Celulares */
@media (max-width: 860px) {
  .affcup-grilla { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .affcup-filtros { flex-direction: column; align-items: stretch; }
  .affcup-campo { justify-content: space-between; }
  .affcup-campo select { flex: 1; }
  .affcup-eq { font-size: 12px; }
  .affcup-escudo { width: 18px; height: 18px; }
  /* En pantallas chicas se ocultan GF y GC; queda la diferencia */
  .affcup-tabla th:nth-child(8), .affcup-tabla td:nth-child(8),
  .affcup-tabla th:nth-child(9), .affcup-tabla td:nth-child(9) { display: none; }
}


.affcup-titulo { margin: 0 0 12px; font-size: 22px; color: var(--aff-verde); }
.affcup-titulo small { display: block; font-size: 14px; font-weight: 600; color: var(--aff-gris); }

/* Sin selectores visibles, el recuadro no se muestra */
.affcup-filtros:not(:has(select)) { display: none; }