/* Estilos básicos para la tabla Mercado de Jugadores */
table.mercado-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    min-width: 600px; /* Fuerza el scroll horizontal en pantallas pequeñas */
}

table.mercado-table tr th a {
    color:#333;
}

table.mercado-table th,
table.mercado-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: middle;
}

table.mercado-table th {
    background-color: #f2f2f2;
    cursor: pointer;
    text-align: center;
}

table.mercado-table .player-images img {
    width: 50px;
    height: 50px;
}

table.mercado-table .team-logo-container {
	text-align: center;
    margin-top: 5px;
    max-width: 45px;
}

table.mercado-table .player-name {
    line-height: 1;
    font-weight: 500;
    margin-left: 10px;
}

table.mercado-table .position {
	width: 45px;
    text-align: center;
}

.bd-valor, .bd-change,.bd-porcen {
    font-size: 1.3rem;
    text-align: center;
    font-weight: bold;
}

.sort-icon {
    margin-left: 5px;
}

/* Colores para valores positivos y negativos */
.verde {
    color: green;
}
.rojo {
    color: red;
}

/* Estilos para la estructura del jugador */
.player-info {
    display: flex;
    align-items: center;
}

.player-position {
    margin-right: 10px;
}

.position {
    font-weight: bold;
    margin-right: 5px;
}

.team-logo-container img {
    width: 24px;
    height: 24px;
}

.player-images img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.player-name {
    font-size: 1rem;
}

/* Contenedor para scroll horizontal */
.table-responsive {
    overflow-x: auto;
}

/* En móviles, fijar la primera columna (JUGADOR) */
@media (max-width: 768px) {
    table.mercado-table th:first-child,
    table.mercado-table td:first-child {
        position: -webkit-sticky; /* para Safari */
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 2;
    }
    table.mercado-table thead th:first-child {
        z-index: 3;
    }
}
