/* ===== ESTILOS PRINCIPALES ===== */

/* Fondo de la tabla del mismo color que el th para efecto de flotación */
.tabla-posiciones {
    border-collapse: separate !important;
    border-spacing: 0 6px !important;
    background: #0a2342 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Quitar bordes internos de la tabla */
.tabla-posiciones td,
.tabla-posiciones th {
    border: none !important;
}

/* Estilo del encabezado */
.tabla-posiciones thead tr {
    background: transparent !important;
}

.tabla-posiciones thead th {
    background: linear-gradient(180deg, #0a2342 0%, #0d2c52 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    font-size: 0.72em;
    padding: 10px 6px !important;
    border-bottom: 2px solid #00c7f3 !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Filas flotantes con sombra y separación */
.fila-flotante {
    display: table-row;
    background: #ffffff;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 6px;
}

.fila-flotante:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
    background: #c4c4c4;
}

/* Bordes redondeados en la primera y última celda de cada fila */
.fila-flotante td:first-child {
    border-radius: 12px 0 0 12px !important;
    padding-left: 12px !important;
}

.fila-flotante td:last-child {
    border-radius: 0 12px 12px 0 !important;
    padding-right: 12px !important;
}

/* Estilos específicos para el podio */
.fila-oro {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%) !important;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3), 0 1px 3px rgba(212, 175, 55, 0.15) !important;
}

.fila-oro td:first-child {
    border-left: 3px solid #d4af37 !important;
}

.fila-plata {
    background: linear-gradient(135deg, #f5f6f8 0%, #eceef2 100%) !important;
    box-shadow: 0 2px 12px rgba(182, 190, 199, 0.3), 0 1px 3px rgba(182, 190, 199, 0.15) !important;
}

.fila-plata td:first-child {
    border-left: 3px solid #b6bec7 !important;
}

.fila-bronce {
    background: linear-gradient(135deg, #fdf5ed 0%, #faeede 100%) !important;
    box-shadow: 0 2px 12px rgba(201, 131, 74, 0.3), 0 1px 3px rgba(201, 131, 74, 0.15) !important;
}

.fila-bronce td:first-child {
    border-left: 3px solid #c9834a !important;
}

/* Celdas de posición y ajustes con redondeo específico */
.celda-pos {
    border-radius: 12px 0 0 12px !important;
}

.celda-ajustes {
    border-radius: 0 12px 12px 0 !important;
}

/* Medallas y números */
.pos-medalla {
    font-size: 1.2rem;
    line-height: 1;
    display: inline-block;
}

.pos-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0a2342;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Badge de puntos */
.pts-badge {
    display: inline-block;
    color: #ffffff;
    border-radius: 6px;
    padding: 2px 10px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.02em;
    font-size: 0.85rem;
}
.celda-pts {
    background-color: #0a2342 !important;
}
/* Chips de ajustes */
.ajuste-chip {
    display: inline-block;
    border-radius: 12px;
    padding: 2px 8px;
     font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 900 !important;
    font-size: 0.70rem !important;
    letter-spacing: -0.5px !important;
}

.ajuste-pos {
    background: rgba(46, 204, 113, 0.14);
    color: #1f8f4d;
}

.ajuste-neg {
    background: rgba(255, 92, 92, 0.14);
    color: #c0392b;
}

.ajuste-neutro {
    background: rgba(150, 150, 150, 0.12);
    color: #6b6b6b;
}

/* Tipografía técnica para datos numéricos - estilo moderno */
.tabla-posiciones td:nth-child(3),
.tabla-posiciones td:nth-child(4),
.tabla-posiciones td:nth-child(5),
.tabla-posiciones td:nth-child(6),
.tabla-posiciones td:nth-child(7),
.tabla-posiciones td:nth-child(8),
.tabla-posiciones td:nth-child(9) {
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 900 !important;
    font-size: 0.80rem !important;
    letter-spacing: -0.5px !important;
}

/* Colores específicos para estadísticas */
.tabla-posiciones td:nth-child(3) { color: #000e32; font-weight: bold; }
.tabla-posiciones td:nth-child(4) { color: #000e32; font-weight: 700; }
.tabla-posiciones td:nth-child(5) { color: #000e32; font-weight: 700; }
.tabla-posiciones td:nth-child(6) { color: #000e32; font-weight: 700; }
.tabla-posiciones td:nth-child(7) { color: #000e32; }
.tabla-posiciones td:nth-child(8) { color: #000e32; }

/* ===== RESPONSIVE - MANTIENE LOS MISMOS ANCHOS ORIGINALES ===== */
@media (max-width: 576px) {
    .tabla-posiciones td img {
        width: 22px !important;
        height: 22px !important;
        object-fit: contain !important;
    }

    .tabla-posiciones-card {
        margin: 0 -12px !important;
        width: calc(100% + 24px) !important;
        max-width: calc(100% + 24px) !important;
        border-radius: 0 !important;
    }
    
    .tabla-posiciones-card .card-body {
        font-size: 0.80rem !important;
        padding: 0 !important;
        font-weight: bold !important;
        
    }
    
    .tabla-posiciones {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-spacing: 0 4px !important;
        border-radius: 0 !important;
    }
    
    .table-responsive {
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .tabla-simbolos li {
        font-size: 0.55rem !important;
    }
    
    .tabla-posiciones th,
    .tabla-posiciones td {
        font-size: 0.65rem !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .tabla-posiciones td:nth-child(3),
.tabla-posiciones td:nth-child(4),
.tabla-posiciones td:nth-child(5),
.tabla-posiciones td:nth-child(6),
.tabla-posiciones td:nth-child(7),
.tabla-posiciones td:nth-child(8),
.tabla-posiciones td:nth-child(9) {
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.70rem !important;
    letter-spacing: -0.5px !important;
}
    /* ALTO DEL TH MÁS PEQUEÑO EN MÓVIL */
    .tabla-posiciones thead th {
        padding: 4px 4px !important;
        font-size: 0.55rem !important;
        letter-spacing: 0.04em !important;
        line-height: 1.2 !important;
    }
    
    .tabla-posiciones td {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    
    .tabla-posiciones td:nth-child(2) {
        padding-left: 2px !important;
    }
    
    .tabla-posiciones td:nth-child(2) > span {
        margin-left: 0px !important;
        padding-left: 0 !important;
        gap: 6px !important;
    }
    
    .tabla-posiciones td:nth-child(2) img {
        margin-left: 0 !important;
    }
    
    .team-name {
        display: inline-block;
        max-width: 5.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
        line-height: 1.15;
        display: inline-flex;
        align-items: center;
        padding-top: 1px;
        padding-right: 0px;
        margin-right: 0px !important;
         font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.60rem !important;
    letter-spacing: -0.5px !important;
    }
    
    .pos-medalla {
        font-size: 0.95rem !important;
    }
    
    .pts-badge {
        padding: 1px 1px !important;
        font-size: 0.68rem !important;
        white-space: nowrap !important;
    }
    
    .ajuste-chip {
        padding: 1px 5px !important;
        font-size: 0.58rem !important;
    }
    
    .tabla-posiciones td:nth-child(10) {
        white-space: nowrap !important;
    }
    
    .tabla-live-badge {
        font-size: 0.55rem !important;
        padding: 2px 6px !important;
    }
    
    /* Ajustar redondeo en móvil */
    .fila-flotante td:first-child {
        border-radius: 8px 0 0 8px !important;
        padding-left: 8px !important;
        width: 26px !important;
        padding-right: 0px !important;
        padding-left: 0px !important;
        background-color: #f0f0f0 !important;
    }
    
    .fila-flotante td:last-child {
        border-radius: 0 8px 8px 0 !important;
        padding-right: 8px !important;
    }
    
    .fila-flotante:hover {
        transform: translateY(-1px) !important;
    }
    
}

/* ===== ESTILOS GENERALES ADICIONALES ===== */
.tabla-posiciones td > span {
    height: auto !important;
    min-height: 0 !important;
    gap: 6px !important;
    padding: 2px 6px !important;
    align-items: center !important;
}

.tabla-posiciones td > span > span {
    height: auto !important;
    line-height: 1.15 !important;
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 600 !important;
    padding-top: 2px !important;
}

.tabla-posiciones td img {
    vertical-align: middle !important;
    margin-right: 6px !important;
}

.tabla-posiciones th:not(:nth-child(2)),
.tabla-posiciones td:not(:nth-child(2)) {
    text-align: center !important;
    vertical-align: middle !important;
}

.tabla-posiciones th,
.tabla-posiciones td {
    padding-top: 0.01rem !important;
    padding-bottom: 0.01rem !important;
    font-size: 0.80em !important;
}

.tabla-posiciones-card {
    border: none !important;
    box-shadow: 0 8px 28px rgba(10, 35, 66, 0.12) !important;
    overflow: hidden;
}

.tabla-posiciones-header {
    background: linear-gradient(135deg, #0a2342 0%, #123a63 100%);
    border-bottom: 2px solid #00c4fa;
}

.tabla-posiciones-header h3 {
    color: #ffffff !important;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.tabla-posiciones-header h3 i {
    color: #ffffff;
    margin-right: 6px;
}

.tabla-live-badge {
    background: rgba(255, 255, 255, 0);
    color: #009e10;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}