/* --- Estilos para a Página de Detalhes da Partida --- */
.sa-match-details-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 30px;
    overflow: hidden; /* Ajuda a conter floats ou grids */
}
.sa-match-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    text-align: center;
}
.sa-match-league-info {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}
.sa-match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}
.sa-match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
}
.sa-match-team img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}
.sa-match-team span {
    font-weight: 600;
    font-size: 16px;
}
.sa-match-score {
    font-size: 36px;
    font-weight: 700;
    margin: 0 30px;
}
.sa-match-status {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* --- Estilos para as Abas da Partida --- */
.sa-match-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}
.sa-match-tabs button {
    border: none;
    background: none;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    position: relative;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.sa-match-tabs button.active {
    color: #00529e;
    border-bottom-color: #00529e;
}
.sa-match-tabs button:disabled {
    cursor: not-allowed;
    color: #ccc;
}

/* --- Estilos para o Conteúdo das Abas --- */
.sa-match-tab-content {
    padding: 0 20px 20px 20px;
}
/* Garante que apenas a aba ativa seja mostrada inicialmente */
.sa-match-tab-content:not(.active) {
    display: none;
}

/* --- Estilos para o Conteúdo das Formações --- */
.sa-lineup-meta {
    display: grid;
    grid-template-columns: 1fr auto auto 1fr;
    gap: 10px;
    background-color: #f7f7f7;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 25px; /* Aumenta margem inferior */
    font-size: 13px;
    text-align: center;
}
.sa-lineup-meta div:nth-child(1) { text-align: left; }
.sa-lineup-meta div:nth-child(4) { text-align: right; }

/* ** CORREÇÃO DO LAYOUT LADO A LADO ** */
.sa-lineup-players {
    display: grid; /* Usa grid para layout */
    grid-template-columns: 1fr 1fr; /* Duas colunas iguais */
    gap: 30px; /* Espaço entre as colunas */
    margin-bottom: 20px; /* Espaço antes dos reservas (se houver) */
}
/* ** FIM DA CORREÇÃO ** */

.sa-lineup-players h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
    color: #444;
    padding-bottom: 5px; /* Adiciona padding */
    border-bottom: 1px solid #eee; /* Adiciona linha */
}
.sa-player-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}
.sa-player-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
}
.sa-player-list li:last-child {
    border-bottom: none;
}
.sa-player-number {
    display: inline-block;
    width: 24px;
    text-align: right;
    margin-right: 10px;
    color: #888;
    font-weight: 500;
}
.sa-lineup-subs {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* --- Estilos para a Aba de Estatísticas da Partida --- */
.sa-match-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sa-stat-comparison-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}
.sa-stat-comparison-row .sa-stat-value {
    font-weight: 600;
}
.sa-stat-comparison-row .sa-stat-value.home { text-align: right; }
.sa-stat-comparison-row .sa-stat-value.away { text-align: left; }
.sa-stat-comparison-row .sa-stat-label {
    text-align: center;
    font-size: 13px;
    color: #666;
}
.sa-stat-bar-container {
    grid-column: 1 / 4;
    display: flex;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.sa-stat-bar {
    height: 100%;
    transition: width 0.5s ease-out;
}
.sa-stat-bar.home {
    background-color: #007bff;
    border-radius: 4px 0 0 4px;
}
.sa-stat-bar.away {
    background-color: #6c757d;
    border-radius: 0 4px 4px 0;
}
/* --- Estilos para a Seção de Substituições --- */
.sa-substitutions-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.sa-substitutions-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 15px;
    color: #444;
}
.sa-substitutions-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.sa-substitution-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}
.sa-sub-minute {
    color: #888;
    font-weight: 500;
    width: 30px; /* Alinha os minutos */
    text-align: right;
    margin-right: 10px;
}
.sa-sub-players {
    display: flex;
    flex-direction: column; /* Coloca um nome sobre o outro */
}
.sa-player-in {
    font-weight: 600;
    display: flex; /* Para alinhar a nota */
    align-items: center;
}
.sa-player-out {
    color: #999;
    font-size: 12px;
}
.sa-player-out::before {
    content: '↓ '; /* Seta indicando saída */
    color: #dc3545; /* Vermelho */
}
.sa-player-in::before {
    content: '↑ '; /* Seta indicando entrada */
    color: #28a745; /* Verde */
}
.sa-sub-rating {
    background-color: #ffc107; /* Amarelo para nota */
    color: #333;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 8px;
}
/* --- Estilos para a Seção de Lesionados/Suspensos --- */
.sa-injuries-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.sa-injuries-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 15px;
    color: #444;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}
.sa-injuries-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    font-size: 13px;
}
.sa-injuries-column i { /* Estilo para "Nenhum desfalque" */
    color: #999;
}
.sa-injury-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.sa-injury-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}
.sa-injury-reason {
    margin-left: 5px;
    color: #888;
    font-size: 12px;
}
/* --- Estilos para a Secção de Análise Pré-Jogo --- */
.sa-predictions-wrapper {
    padding: 20px;
    background-color: #fdfdfd; /* Fundo ligeiramente diferente */
}
.sa-predictions-wrapper h3, .sa-predictions-wrapper h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #444;
}
.sa-predictions-wrapper h3 { font-size: 18px; }
.sa-predictions-wrapper h4 { font-size: 15px; margin-top: 25px;}

.sa-prediction-probabilities {
    display: flex;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}
.sa-prob {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}
.sa-prob.home { background-color: #007bff; }
.sa-prob.draw { background-color: #ffc107; color: #333; }
.sa-prob.away { background-color: #6c757d; }
.sa-prob span {
    padding: 0 5px; /* Evita que o texto encoste nas bordas */
}

.sa-prediction-advice {
    font-size: 14px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}
.sa-prediction-advice strong {
    margin-right: 5px;
}

/* Comparação */
.sa-prediction-comparison {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sa-comparison-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}
.sa-comparison-row .sa-comp-value { font-weight: 600; }
.sa-comparison-row .sa-comp-value.home { text-align: right; }
.sa-comparison-row .sa-comp-value.away { text-align: left; }
.sa-comparison-row .sa-comp-label { text-align: center; font-size: 12px; color: #777; }
.sa-comp-bar-container { grid-column: 1 / 4; display: flex; height: 6px; background-color: #e0e0e0; border-radius: 3px; overflow: hidden; }
.sa-comp-bar { height: 100%; transition: width 0.5s ease-out; }
.sa-comp-bar.home { border-radius: 3px 0 0 3px; }
.sa-comp-bar.away { border-radius: 0 3px 3px 0; }

/* H2H */
.sa-prediction-h2h .sa-h2h-item {
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    color: #555;
    text-align: center;
}
.sa-prediction-h2h .sa-h2h-item:last-child {
    border-bottom: none;
}