/* Jugadores · selector Fantasy y tarjetas de sistemas adicionales */

.jugadores-page .jugadores-toolbar,
.jugadores-page .jugadores-toolbar > [class*="col-"] {
    overflow: visible;
}

.jugadores-page .jugadores-fantasy-field {
    position: relative;
    z-index: 10020;
}

.jugadores-fantasy-select {
    position: relative;
    width: 100%;
}

.jugadores-fantasy-select.is-open {
    z-index: 10020;
}

.jugadores-fantasy-select__trigger {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 7px 11px;
    border: 1px solid #62ad72;
    border-radius: 8px;
    background: #fff;
    color: #18251e;
    text-align: left;
    box-shadow: 0 2px 8px rgba(19, 72, 37, .08);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.jugadores-fantasy-select__trigger:hover,
.jugadores-fantasy-select__trigger:focus {
    border-color: #318c4a;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(49, 140, 74, .14);
}

.jugadores-fantasy-select__trigger > img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: #f4f7f5;
}

.jugadores-fantasy-select__trigger > span,
.jugadores-fantasy-select__option > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.jugadores-fantasy-select__trigger strong,
.jugadores-fantasy-select__option strong {
    overflow: hidden;
    color: #17231c;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jugadores-fantasy-select__trigger small,
.jugadores-fantasy-select__option small {
    overflow: hidden;
    margin-top: 2px;
    color: #69766e;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jugadores-fantasy-select__trigger > i {
    color: #3c7c4c;
    font-size: 17px;
    text-align: center;
    transition: transform .18s ease;
}

.jugadores-fantasy-select.is-open .jugadores-fantasy-select__trigger > i {
    transform: rotate(180deg);
}

.jugadores-fantasy-select__menu {
    position: absolute;
    z-index: 10030;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: min(390px, 65vh);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #d9e2dc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 39, 23, .2);
}

.jugadores-fantasy-select__menu[hidden] {
    display: none !important;
}

.jugadores-fantasy-select__option {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 7px 9px;
    border: 0;
    border-radius: 7px;
    background: #fff;
    color: #17231c;
    text-align: left;
    cursor: pointer;
}

.jugadores-fantasy-select__option:hover,
.jugadores-fantasy-select__option:focus {
    outline: 0;
    background: #f0f8f2;
}

.jugadores-fantasy-select__option.is-selected {
    background: #e5f5e9;
}

.jugadores-fantasy-select__option > img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
    background: #f5f7f6;
}

.jugadores-fantasy-select__option > i {
    color: transparent;
    font-size: 14px;
    text-align: center;
}

.jugadores-fantasy-select__option.is-selected > i {
    color: #288044;
}

.jugadores-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.jugadores-page .jugadores-filter-select,
.jugadores-page #posicion,
.jugadores-page #ordenar,
.jugadores-page #nombre {
    border-color: #62ad72 !important;
    border-radius: 6px;
}

.jugadores-loading,
.jugadores-error {
    padding: 28px 12px;
    text-align: center;
}

.jugadores-loading img {
    width: 30px;
    height: 30px;
}

.jugadores-loading span {
    display: block;
    margin-top: 6px;
    color: #707b74;
    font-size: 12px;
}

/* Pulso de mercado Biwenger: las fichas se insertan por AJAX. */
.ficha-player.biwenger-ficha > .player-row {
    grid-template-rows: auto auto;
    align-content: center;
    row-gap: 2px;
    height: 76px;
    min-height: 76px;
}

.ficha-player.biwenger-ficha .player-left {
    grid-column: 1;
    grid-row: 1 / 3;
}

.ficha-player.biwenger-ficha .player-photo {
    grid-column: 2;
    grid-row: 1 / 3;
}

.ficha-player.biwenger-ficha .player-main {
    grid-column: 3;
    grid-row: 1;
}

.ficha-player.biwenger-ficha .player-right {
    grid-column: 4;
    grid-row: 1;
}

.ficha-player.biwenger-ficha .biwenger-market-row {
    grid-column: 3 / 5;
    grid-row: 2;
    display: flex;
    align-items: center;
    align-self: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.ficha-player.biwenger-ficha .biwenger-market-row .player-mini-brand {
    flex: 0 0 auto;
    margin: 0;
}

.ficha-player.biwenger-ficha .biwenger-pulso-mini {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

.ficha-player.biwenger-ficha .biwenger-pulso-mini > span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 17px;
    padding: 1px 4px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 10px;
    line-height: 13px;
}

.ficha-player.biwenger-ficha .biwenger-pulso-mini .pulso-etiqueta {
    color: #3e4944;
    font-weight: 700;
}

.ficha-player.biwenger-ficha .biwenger-pulso-mini strong {
    font-size: 11px;
    font-weight: 800;
}

.ficha-player.biwenger-ficha .pulso-compras {
    border-color: #d7efdf;
    background: #edf9f1;
}

.ficha-player.biwenger-ficha .pulso-ventas {
    border-color: #f4dada;
    background: #fff0f0;
}

.ficha-player.biwenger-ficha .pulso-uso {
    border-color: #d9e9f7;
    background: #eef6fd;
}

.ficha-player.biwenger-ficha .pulso-compras strong { color: #278b48; }
.ficha-player.biwenger-ficha .pulso-ventas strong { color: #c33d3d; }
.ficha-player.biwenger-ficha .pulso-uso strong { color: #2879b8; }

@media (max-width: 767px) {
    .jugadores-page .jugadores-toolbar > .col-xs-5,
    .jugadores-page .jugadores-toolbar > .col-xs-7 {
        float: none;
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    .jugadores-page .jugadores-toolbar > .col-xs-5 {
        margin-bottom: 9px;
    }

    .jugadores-page .jugadores-toolbar > .col-xs-5 .btn {
        margin-top: 0 !important;
    }

    .jugadores-page .jugadores-fantasy-field {
        margin-top: 4px;
    }

    .jugadores-fantasy-select,
    .jugadores-fantasy-select__trigger {
        width: 100%;
    }

    .jugadores-fantasy-select__menu {
        position: fixed;
        z-index: 10030;
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-height: min(520px, 72vh);
        border-radius: 13px;
    }

    .jugadores-fantasy-select__option {
        min-height: 58px;
    }

}

@media (max-width: 400px) {
    .ficha-player.biwenger-ficha > .player-row {
        grid-template-columns: 30px 54px minmax(0, 1fr) minmax(84px, 96px);
    }

    .ficha-player.biwenger-ficha .biwenger-market-row {
        gap: 4px;
    }

    .ficha-player.biwenger-ficha .biwenger-pulso-mini {
        gap: 2px;
    }

    .ficha-player.biwenger-ficha .biwenger-pulso-mini > span {
        gap: 2px;
        padding-right: 3px;
        padding-left: 3px;
        font-size: 9px;
    }

    .ficha-player.biwenger-ficha .biwenger-pulso-mini strong {
        font-size: 10px;
    }

}
