/* ============================================================
   TABLAS GENERALES DE SPORTSPRESS
   ============================================================ */

/* Base para todas las tablas de SportsPress */
.sp-data-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    font-family: 'Proza Libre', 'Roboto', sans-serif;
    font-size: 14px;
}
.sp-data-table th {
    background: #0a0a0a;
    color: #e5e523;
    padding: 10px 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-align: center;
}
.sp-data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.sp-data-table tr:nth-child(even) td {
    background: #fafafa;
}
.sp-data-table tr:hover td {
    background: #fff8c4 !important;
}
.sp-data-table a {
    color: #00cec9;
    text-decoration: none;
}
.sp-data-table a:hover {
    color: #00b3a9;
    text-decoration: underline;
}
.sp-table-caption {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
    margin: 10px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   TABLAS DE EVENTOS - SCROLL FIJO
   ============================================================ */

/* Contenedor de tabla con scroll */
.sp-event-list-wrapper {
    overflow: auto;
    max-height: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    position: relative;
}

/* Tabla */
.sp-event-list {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Proza Libre', 'Roboto', sans-serif;
    font-size: 14px;
    background: #fff;
}

/* Cabecera fija */
.sp-event-list thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0a0a0a;
    color: #e5e523;
    padding: 10px 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 2px solid #e5e523;
}

/* Primera columna (Liga) fija para facilitar lectura */
.sp-event-list td:first-child,
.sp-event-list th:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
    min-width: 120px;
}
.sp-event-list thead th:first-child {
    z-index: 15;
    background: #0a0a0a;
}

/* Filas */
.sp-event-list td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    vertical-align: middle;
    background: #fff;
}

/* Filas alternas */
.sp-event-list tbody tr:nth-child(even) td {
    background: #fafafa;
}
.sp-event-list tbody tr:nth-child(even) td:first-child {
    background: #fafafa;
}

/* Hover */
.sp-event-list tbody tr:hover td {
    background: #fff8c4 !important;
}
.sp-event-list tbody tr:hover td:first-child {
    background: #fff8c4 !important;
}

/* Enlaces */
.sp-event-list a {
    color: #00cec9;
    text-decoration: none;
}
.sp-event-list a:hover {
    color: #00b3a9;
    text-decoration: underline;
}

/* Escudos en equipos (si no los muestra, los añadimos con JS) */
.sp-event-list .team-logo img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin: 0 4px;
}

/* Ocultar columna de resultados en fixture si no hay */
.sp-event-list .data-results:empty::before {
    content: '-';
}

/* Responsive: en móvil reducir padding y tamaño de fuente */
@media (max-width: 768px) {
    .sp-event-list {
        font-size: 12px;
    }
    .sp-event-list th,
    .sp-event-list td {
        padding: 6px 8px;
    }
}

/* ---------- TABLAS DE EVENTOS (SCROLL FIJO) ---------- */
.sp-table-wrapper {
    overflow: auto;
    max-height: 600px;
    border-radius: 12px;
}
.sp-event-list thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0a0a0a;
    color: #e5e523;
}
.sp-event-list td:first-child,
.sp-event-list th:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
}
.sp-event-list thead th:first-child {
    z-index: 15;
    background: #0a0a0a;
}
.sp-event-list tbody tr:nth-child(even) td {
    background: #fafafa;
}
.sp-event-list tbody tr:nth-child(even) td:first-child {
    background: #fafafa;
}
.sp-event-list tbody tr:hover td {
    background: #fff8c4 !important;
}
.sp-event-list tbody tr:hover td:first-child {
    background: #fff8c4 !important;
}
/* Iconos de incidencias */
.sp-event-list .data-incidents .sp-icon-soccerball,
.sp-event-list .data-incidents .sp-icon-shoe,
.sp-event-list .data-incidents .sp-icon-card-yellow,
.sp-event-list .data-incidents .sp-icon-card-red,
.sp-event-list .data-incidents .sp-icon-clean-sheet {
    font-size: 18px;
    margin: 0 2px;
}

/* ============================================================
   ICONOS DE INCIDENCIAS EN TABLA DE EVENTOS DE JUGADORA
   ============================================================ */
.sp-event-list .data-performance .sp-icon-soccerball,
.sp-event-list .data-performance .sp-icon-shoe,
.sp-event-list .data-performance .sp-icon-card-yellow,
.sp-event-list .data-performance .sp-icon-card-red {
    font-size: 18px;
    display: inline-block;
    margin: 0 2px;
    vertical-align: middle;
}
.sp-event-list .data-performance .sp-icon-soccerball {
    color: #e5e523;
}
.sp-event-list .data-performance .sp-icon-shoe {
    color: #00cec9;
}
.sp-event-list .data-performance .sp-icon-card-yellow {
    color: #ffcc00;
}
.sp-event-list .data-performance .sp-icon-card-red {
    color: #ff0000;
}

/* ============================================================
   TABLA DE ESTADÍSTICAS DE JUGADORA (Fondo blanco, letras negras)
   ============================================================ */

/* Contenedor con scroll */
.sp-template-player-statistics .sp-table-wrapper {
    overflow: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    background: #ffffff;
    margin-bottom: 20px;
}

/* Tabla */
.sp-template-player-statistics .sp-player-statistics {
    width: 100%;
    border-collapse: collapse;
    font-family: "Proza Libre", "Roboto", sans-serif;
    font-size: 13px;
    background: #ffffff;
    min-width: 700px; /* scroll horizontal */
}

/* Cabecera fija (sticky) - FONDO BLANCO, LETRAS NEGRAS */
.sp-template-player-statistics .sp-player-statistics thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 8px 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-align: center;
    border-bottom: 2px solid #cccccc; /* Borde gris suave */
    white-space: nowrap;
}

/* Imágenes en cabecera más pequeñas */
.sp-template-player-statistics .sp-player-statistics thead th img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
    vertical-align: middle;
}

/* Iconos de fuente en cabecera */
.sp-template-player-statistics .sp-player-statistics thead th .sp-icon {
    font-size: 16px !important;
    vertical-align: middle;
}

/* Celdas del cuerpo */
.sp-template-player-statistics .sp-player-statistics td {
    padding: 6px 8px;
    border-bottom: 1px solid #eeeeee; /* Borde gris muy claro */
    text-align: center;
    vertical-align: middle;
    background: #ffffff;
    color: #000000; /* Letras negras */
}

/* Filas alternas (gris muy claro para diferenciar) */
.sp-template-player-statistics .sp-player-statistics tbody tr:nth-child(even) td {
    background: #f9f9f9;
}

/* Hover (color sutil) */
.sp-template-player-statistics .sp-player-statistics tbody tr:hover td {
    background: #f0f0f0 !important;
}

/* Primera columna (Temporada) fija a la izquierda */
.sp-template-player-statistics .sp-player-statistics td:first-child,
.sp-template-player-statistics .sp-player-statistics th:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #ffffff;
    min-width: 80px;
}
.sp-template-player-statistics .sp-player-statistics thead th:first-child {
    z-index: 15;
    background: #ffffff !important;
}

/* Ajuste para filas alternas y hover en primera columna */
.sp-template-player-statistics .sp-player-statistics tbody tr:nth-child(even) td:first-child {
    background: #f9f9f9;
}
.sp-template-player-statistics .sp-player-statistics tbody tr:hover td:first-child {
    background: #f0f0f0 !important;
}

/* Fila "Total" resaltada (fondo ligeramente más oscuro) */
.sp-template-player-statistics .sp-player-statistics .sp-highlight {
    background: #f5f5f5 !important;
    font-weight: 600;
}
.sp-template-player-statistics .sp-player-statistics .sp-highlight td {
    background: #f5f5f5 !important;
}
.sp-template-player-statistics .sp-player-statistics tbody tr:hover .sp-highlight td {
    background: #e8e8e8 !important;
}
