/* ====== Título general ====== */
.vp-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin: 6px 0 10px;
}

/* ====== Lista ====== */
.vp-list {
  display: grid;
  gap: 8px;
}

/* ====== Tarjeta ====== */
.vp-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center; /* centrado general */
  justify-content: center;
  gap: 10px;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  color: inherit;
  text-decoration: none;
}

.vp-card-live {
  border-left: 4px solid #e11d48;
  background: #fff5f6;
}
.vp-card-live:hover { background: #ffe9ec; }

/* ====== Meta (ciudad, hora o LIVE) ====== */
.vp-meta-line {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
}
.vp-city::after { content: ""; margin: 0 4px 0 2px; }

/* ====== Partido ====== */
.vp-match {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  text-align: center;
  gap: 8px;
  min-height: 5px;
}

/* ====== Equipos ====== */
.vp-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* normal: centrado */
  text-align: center;
  position: relative;
}

.vp-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vp-team img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 1px rgba(0,0,0,.1));
}

/* Goleadores */
.vp-goals {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0.9;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* centrado normal */
  gap: 2px;
}

.vp-card.vp-hasgoals .vp-goal::before {
  content: "⚽";
  font-size: 12px;
  opacity: 0.8;
}

/* ====== Centro (marcador y resumen) ====== */
.vp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.vp-score {
  font-weight: 800;
  font-size: 1rem;
}

.vp-resumen {
  font-size: 13px;
  margin-top: 3px;
}
.vp-resumen a {
  color: #2f2f2f;
  text-decoration: none;
}
.vp-resumen a:hover {
  text-decoration: underline;
}

/* ====== Nombres completos y cortos ====== */
.vp-name-full { display: inline; }   /* escritorio: visible */
.vp-name-short { display: none; }    /* escritorio: oculto */

/* ====== AJUSTES SOLO PARA PARTIDOS EN VIVO ====== */
.vp-card-live .vp-match {
  align-items: start; /* equipos desde arriba */
}
.vp-card-live .vp-team {
  justify-content: flex-start; /* nombre y escudo arriba */
  min-height: 80px;
}
.vp-card-live .vp-goals {
  min-height: 28px; /* espacio fijo reservado */
  justify-content: flex-start;
}

.vp-standings {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
.vp-standings th, .vp-standings td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: center;
}
.vp-standings th {
  background: #f2f2f2;
}
.vp-row-live {
  background: rgba(255, 230, 150, 0.25);
  font-weight: 600;
  transition: background 0.5s;
}
.vp-table-serie {
  margin: 0.5em 0;
  font-size: 1.1em;
  font-weight: bold;
}

.vp-title {
  font-weight: bold;
  text-align: left;
  margin: 5px 0;
  font-size: 1.0em;
  color: #2f2f2f; /* o el color que uses */
}

/* =================================================== */
/* ⚽ ESTILOS PARA LA TABLA DE POSICIONES (.vp-table)  */
/* VERSIÓN FINAL OPTIMIZADA: 100% ancho, sin espacios  */
/* =================================================== */

/* Contenedor principal */
.vp-table {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
}

/* Título de la Serie (oculto) */
.vp-table-serie {
  display: none !important;
  margin: 0;
  padding: 0;
  border: none;
}

/* Tabla principal */
.vp-standings {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  table-layout: fixed; /* ✅ Asegura distribución proporcional */
}

/* Encabezado */
.vp-standings thead tr {
  color: white;
  font-size: 0.90em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Celdas del encabezado */
.vp-standings th {
  padding: 12px 6px;
  text-align: center;
  background-color: #eb0045;
}

/* Esquinas redondeadas del encabezado */
.vp-standings th:first-child {
  border-top-left-radius: 8px;
}
.vp-standings th:last-child {
  border-top-right-radius: 8px;
}

/* Distribución de columnas */
/* POS | EQUIPO | PJ | PG | PE | PP | DIF | PTS */
.vp-standings th:nth-child(1),
.vp-standings td:nth-child(1) { width: 8%; }  /* Posición */
.vp-standings th:nth-child(2),
.vp-standings td:nth-child(2) { width: 38%; text-align: left; } /* Equipo */
.vp-standings th:nth-child(3),
.vp-standings td:nth-child(3),
.vp-standings th:nth-child(4),
.vp-standings td:nth-child(4),
.vp-standings th:nth-child(5),
.vp-standings td:nth-child(5),
.vp-standings th:nth-child(6),
.vp-standings td:nth-child(6),
.vp-standings th:nth-child(7),
.vp-standings td:nth-child(7) { width: 8%; } /* PJ, PG, PE, PP, DIF */
.vp-standings th:nth-child(8),
.vp-standings td:nth-child(8) { width: 14%; } /* PTS */

/* Filas del cuerpo */
.vp-standings tbody tr {
  background-color: #f9f9f9;
  border-bottom: 1px solid #eeeeee;
  transition: background-color 0.3s ease;
  font-size: 1.1em;
}

/* Hover */
.vp-standings tbody tr:hover {
  background-color: #f0f0f0;
}

/* Celdas */
.vp-standings td {
  padding: 10px 6px;
  text-align: center;
  color: #333;
  border-left: 1px solid #f2f2f2;
}

/* Primera celda sin borde izquierdo */
.vp-standings td:first-child {
  border-left: none;
}

/* Columna de posición */
.vp-standings td:first-child {
  font-weight: bold;
  color: #243746;
  font-size: 1.05em;
}

/* Columna de equipo */
.vp-standings td:nth-child(2) {
  text-align: left;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fila en vivo */
.vp-standings tr.vp-row-live,
.vp-standings tr.vp-row-live td,
.vp-standings tr.vp-row-live span {
  background-color: #C0F6D6 !important;
  color: #000000 !important;
}


@keyframes pulse-live {
  0% { background-color: #fff9c4; }
  100% { background-color: #fff59d; }
}

/* Estilo para PTS (Puntos) */
.vp-standings td:last-child {
    font-size: 1.0em;
    font-weight: 900;
    color: #eb0045;
}

/* Media Query para Móviles */
@media (max-width: 500px) {
    .vp-standings {
        box-shadow: none;
    }
    .vp-standings th, .vp-standings td {
        padding: 8px 4px;
        font-size: 0.8em;
    }
    
/* =================================================== */
/* 🆕 ESTILOS PARA LOGOS EN LA TABLA DE POSICIONES */
/* =================================================== */

.vp-logo {
  border-radius: 4px;
  flex-shrink: 0;
}

}

/* ====== Responsive ====== */
@media (max-width: 640px) {
  .vp-card { grid-template-columns: 90px 1fr; }
  .vp-city { display: none; }

  .vp-match { grid-template-columns: 1fr 70px 1fr; gap: 5px; }

  .vp-dt br { display: block; }
  .vp-sep { display: none; }

  .vp-team img { width: 26px; height: 26px; }

  /* nombres en móvil: corto visible, completo oculto */
  .vp-name-full { display: none; }
  .vp-name-short { display: inline; }

  .vp-score { font-size: .95rem; }
  .vp-names { gap: 3px; }
  .vp-goals { font-size: 11.5px; line-height: 1.2; }
  
  .vp-dt {
  display: flex;
  flex-direction: column;
  align-items: center;
  }
  
  .vp-goal {
    display: block;       /* cada gol sigue en su fila */
    white-space: nowrap;  /* no se parte internamente */
  }

  /* opcional: ajustar tamaño si es necesario */
  .vp-goals {
    font-size: 11.5px;
    line-height: 1.3;
    gap: 2px;
  } 
  
  .vp-meta-line .vp-dt {
    max-width: 50px; /* ajusta según necesites */
  } 
  
  .vp-match {
    grid-template-columns: minmax(50px, 60px) 70px 1fr; 
    align-items: center;
  }

  .vp-team.visitante {
    min-width: 0;                 /* ya lo tienes */
    max-width: 100%;               /* asegura que no exceda el contenedor */
    word-break: break-word;        /* corta palabras largas si es necesario */
    overflow-wrap: anywhere;       /* seguridad adicional */
    display: flex;
    flex-direction: column;
    align-items: flex-start;       /* alinea el contenido a la izquierda */
  }

  /* Ajusta los goles para que queden dentro */
  .vp-team.visitante .vp-goals {
    width: 100%;
    text-align: left;              /* importante para que los goles no se centren y desborden */
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Opcional: asegura que la tarjeta no se expanda demasiado */
  .vp-card {
    width: 100%;
  }

/* =================================================== */
/* 👇 Media query para móviles */
@media (max-width: 500px) {
  .vp-standings {
    width: 100%;
    table-layout: fixed;
  }

  /* Ocultar columnas innecesarias: PG, PE, PP */
  .vp-standings th:nth-child(4),
  .vp-standings td:nth-child(4),
  .vp-standings th:nth-child(5),
  .vp-standings td:nth-child(5),
  .vp-standings th:nth-child(6),
  .vp-standings td:nth-child(6) {
    display: none;
  }

  /* Ajustar ancho de las columnas visibles */
  .vp-standings th:nth-child(1),
  .vp-standings td:nth-child(1) { width: 10%; }  /* # */
  .vp-standings th:nth-child(2),
  .vp-standings td:nth-child(2) { width: 45%; } /* Equipo */
  .vp-standings th:nth-child(3),
  .vp-standings td:nth-child(3) { width: 15%; } /* PJ */
  .vp-standings th:nth-child(7),
  .vp-standings td:nth-child(7) { width: 15%; } /* DIF */
  .vp-standings th:nth-child(8),
  .vp-standings td:nth-child(8) { width: 15%; } /* PTS */
}
  
}