/* ===== COMPONENTE: ESCALAÇÃO (LISTA DE JOGADORES) ===== */

/* Container com scroll */
.tabela-scroll-escalacao {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar fina */
.tabela-scroll-escalacao::-webkit-scrollbar {
    width: 3px;
}
.tabela-scroll-escalacao::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

/* Ajuste da imagem do jogador na escalação (caso ainda use .player-avatar-mini) */
.player-avatar-mini {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.player-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Moldura da foto (usada na escalação) */
.player-photo-frame {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    border-radius: 50%;
    overflow: hidden;
    background: #222;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.player-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* Itens da lista de escalação */
#escalacao-lista-container .list-group-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: transparent;
}
#escalacao-lista-container .list-group-item:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Colunas fixas para posição e número */
.pos-width {
    min-width: 28px;
}
.number-width {
    min-width: 18px;
}

/* Badge e texto pequeno */
.badge-xs {
    font-size: 0.6rem;
}
.font-xs {
    font-size: 0.6rem;
}

/* Linha clicável na escalação */
.cursor-pointer {
    cursor: pointer;
}
.js-player-quick-stats:hover {
    background: rgba(13, 202, 240, 0.1) !important;
    transition: background 0.2s ease;
}
.js-player-quick-stats:hover .text-truncate {
    color: #0dcaf0 !important;
    /* Sublinhado removido conforme solicitado */
}

/* Utilitários gerais */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card {
    border: none !important;
}
.card-header {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    background-color: #1a1919 !important;
}
.bg-custom-dark {
    background-color: #0e0e0e !important;
}

/* ===== SELETOR MOBILE (igual ao das estatísticas) ===== */
.team-selector-mobile {
    display: none; /* escondido por padrão, exibido no breakpoint */
}

@media (max-width: 767px) {
    .team-selector-mobile {
                display: flex !important;
        justify-content: center;
    }

    .team-selector-mobile .btn-group {
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
                display: flex !important;
        justify-content: center;
    }

    /* Oculta todas as colunas de formação por padrão no mobile */
    .coluna-formacao {
        display: none !important;
    }

    /* Mostra apenas a coluna ativa */
    .coluna-formacao.active-mobile {
        display: block !important;
    }
}

/* Estilo dos botões do seletor - idêntico ao das estatísticas */
.team-selector-mobile .btn {
    flex: 1 1 0;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, .03) !important;
    padding: 9px 8px !important;
    font-size: .78rem !important;
    line-height: 1.1 !important;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(13, 110, 253, .90);
    transition: background .15s ease, border-color .15s ease;
    box-shadow: none !important;
    max-width: 200px;
}

.team-selector-mobile .btn:first-child {
    border-right: none !important;
}

.team-selector-mobile .btn:hover {
    background: rgba(255, 255, 255, .06) !important;
}

.team-selector-mobile .btn.active {
    background: rgba(13, 110, 253, .90) !important;
    border-color: rgba(13, 110, 253, .90) !important;
    color: #fff !important;
}

.team-selector-mobile .btn:focus,
.team-selector-mobile .btn:active {
    outline: none !important;
    box-shadow: none !important;
}

/* ===== COMPONENTE: MODAL QUICK STATS ===== */

/* Imagem do jogador no modal */
.player-quick-stats-img {
    width: 48px;  /* Ajustado para melhor equilíbrio */
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-list .text-white-50 {
    color: #adb5bd !important; /* Cinza claro suave */
}

/* Cor do valor da direita */
.stats-list .fw-bold.text-white {
    color: #ffffff !important;
}

/* Cor das linhas divisórias */
.stats-list .border-bottom {
    border-color: rgba(255, 255, 255, 0.05) !important; /* Linha bem sutil */
}

/* Botão de perfil completo no modal */
.btn-outline-info {
    border-color: rgba(13, 202, 240, 0.5);
    font-size: 0.8rem;
    padding: 8px;
}

#playerQuickStatsModal .modal-content {
    background-color: #101113 !important; /* Cor cinza azulada escura */
    border-radius: 0px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Garante que o cabeçalho e rodapé acompanhem a cor */
#playerQuickStatsModal .modal-header,
#playerQuickStatsModal .modal-footer {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
}

/* Cor do título e do botão 'X' de fechar */
#playerQuickStatsModal .modal-title {
    color: #ffffff;
}

#playerQuickStatsModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* Deixa o X branco */
}

/* Container da lista para garantir preenchimento */
.stats-list {
    padding: 0 5px;
}

/* Estilo do Rótulo (Esquerda) */
.stat-label {
    color: rgba(255, 255, 255, 0.5) !important; /* Texto mais apagado para dar foco ao número */
    font-size: 0.85rem;
    font-weight: 400;
}

/* Estilo do Valor (Direita) */
.stat-value {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700; /* Negrito marcante */
    letter-spacing: 0.5px; /* Ar de dado técnico */
}

/* Ajuste específico para a Nota Média (destaque sutil) */
.stat-item-rating {
    margin-top: 8px;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.stat-item-rating .stat-value {
    color: #0dcaf0; /* Cor ciano para destacar a nota */
}

/* ===== AJUSTES MOBILE PARA LARGURA TOTAL ===== */
@media (max-width: 767px) {
    .team-selector-mobile .btn-group {
        max-width: 100% !important;
        width: 100%;
    }

    #escalacao-lista-container {
        width: 100% !important;
        padding-left: 0;
        padding-right: 0;
    }

    .coluna-formacao.active-mobile {
        display: block !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}