/* partidas.css - Estilos para a página de partidas */
.partidas-container { width: 100%; max-width: none; margin: 0; padding: 10px 0; }

.resumo-partidas {
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
    color: #aaa;
}
.resumo-partidas > span:nth-of-type(2) { /* Vitórias */
  color: #4CAF50;
  font-weight: 600;
}
.resumo-partidas > span:nth-of-type(3) { /* Empates */
  color: #FFC107;
  font-weight: 600;
}
.resumo-partidas > span:nth-of-type(4) { /* Derrotas */
  color: #F44336;
  font-weight: 600;
}
.resumo-destaque {
    font-weight: bold;
    color: #fff;
}

.partidas-subtitulo {
    margin: 25px 0 15px 0;
    color: #fff;
    font-weight: 600;
}

.sem-partidas {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20pxx;
}

.partidas-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}
.icon {
    margin-right: 5px;
    font-style: normal;
}
.link-partida {
    text-decoration: none;
    color: inherit;
    display: block;
}

.partida-box {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.partida-box:hover {
    background: rgba(40, 40, 40, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.partida-box.vitoria {
    border-left: 4px solid #4CAF50;
}

.partida-box.empate {
    border-left: 4px solid #9E9E9E;
}

.partida-box.derrota {
    border-left: 4px solid #F44336;
}

.partida-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 12px;
    color: #aaa;
}

.partida-data, .partida-estadio, .partida-torneio {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 5px;
}

.partida-data i, .partida-estadio i {
    margin-right: 5px;
}

.partida-centro {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.partida-times-placar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.time-casa, .time-fora {
    display: flex;
    align-items: center;
    flex: 1;
}

.time-casa {
    justify-content: flex-start;
}

.time-fora {
    justify-content: flex-end;
}

.partida-nome {
    font-weight: 500;
    margin: 0 10px;
}

.logo-time {
    height: 30px;
    width: auto;
}

.partida-placar {
    font-size: 18px;
    font-weight: bold;
    margin: 0 15px;
    min-width: 50px;
    text-align: center;
}

.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn, .load-less-btn {
    background: linear-gradient(135deg, #6b5ce7, #4c40d0);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.load-more-btn:hover, .load-less-btn:hover {
    background: linear-gradient(135deg, #7d6df0, #5d50e0);
    transform: translateY(-2px);
}

.load-more-message {
    margin-top: 10px;
    color: #aaa;
    font-size: 14px;
    text-align: center;
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .partidas-container {
        padding: 5px;
    }
    
    .partida-box {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .partida-topo {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
        text-align: center;
    }
    
    .partida-data, .partida-estadio, .partida-torneio {
        margin-right: 0;
        margin-bottom: 5px;
        justify-content: center;
        width: 100%;
    }
    
    /* Garantir que times e placar fiquem na mesma linha no mobile */
    .partida-times-placar {
        flex-direction: row;
        justify-content: space-between;
        gap: 5px;
    }
    
    .time-casa, .time-fora {
        justify-content: center;
        margin: 0;
        flex: 1;
    }
    
    .time-casa {
        justify-content: flex-end;
    }
    
    .time-fora {
        justify-content: flex-start;
    }
    
    .partida-placar {
        margin: 0 10px;
        flex-shrink: 0;
    }
    
    .partida-nome {
        font-size: 13px;
        max-width: 100px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logo-time {
        height: 24px;
    }
    
    .resumo-partidas {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .partida-box {
        padding: 10px;
    }
    
    .partida-topo {
        font-size: 11px;
        gap: 5px;
    }
    
    .partida-nome {
        font-size: 12px;
        max-width: 80px;
    }
    
    .partida-placar {
        font-size: 14px;
        min-width: 40px;
        margin: 0 8px;
    }
    
    .logo-time {
        height: 20px;
    }
    
    .partida-times-placar {
        gap: 3px;
    }
}

/* === filtro-btn active visual fix (aplicado) === */
.filtros-mando .filtro-btn.active,
.filtros-mando .filtro-btn.is-active,
.filtros-mando .filtro-btn[aria-pressed="true"] {
  background-color: #1f6feb !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* === [PATCH 2025-08-31] Compactação e correção de logos em 'Últimas Partidas' === */
.ultimas-partidas .partida-box { padding: 10px 12px; margin-bottom: 12px; }
.ultimas-partidas .partida-topo { margin-bottom: 10px; font-size: 12px; }
.ultimas-partidas .partida-nome { font-size: 14px; }
.ultimas-partidas .partida-placar { font-size: 16px; min-width: 44px; margin: 0 10px; }

/* Garante logos pequenos mesmo se a classe faltar */
.partida-centro img { max-height: 28px; width: auto; height: auto; }

@media (max-width: 768px) {
  .ultimas-partidas .partida-placar { font-size: 15px; }
  .ultimas-partidas .partida-nome { font-size: 13px; }
}


.partidas-lista li { list-style: none; margin: 0; padding: 0; }


/* Robustez extra: garante expansão também da área interna */
#area-partidas {
  overflow: visible !important;
  height: auto !important;
}

/* Esconde logos vazios/nulos para evitar ícones quebrados */
.logo-time[src=''], .logo-time:not([src]) { display: none; }


/* ===== Ajuste de largura das boxes de partidas =====
   Mantém 100% no mobile; centraliza e limita no desktop. */
@media (min-width: 1100px) {
  .partidas-container {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (min-width: 1440px) {
  .partidas-container { max-width: 1100px; }
}

/* Garante que cada item alinhe ao centro com largura do container */
.partidas-lista > li { list-style: none; }
.partidas-lista > li > a { display: block; }



/* Fix: logo da liga no cabeçalho da partida */
.partida-torneio img.torneio-logo { 
  height: 18px; 
  width: auto; 
  margin-left: 8px; 
  opacity: 0.85;
}

/* ===== LIMITAÇÃO DE NOME DE TIMES ===== */
.partida-nome {
    font-weight: 500;
    margin: 0 10px;
    /* Novas regras para truncar texto longo */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px; /* Valor padrão para desktop */
}

/* Ajustes para mobile */
@media (max-width: 768px) {
    .partida-nome {
        max-width: 100px; /* Reduzido para mobile */
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .partida-nome {
        max-width: 70px; /* Mais reduzido para telas muito pequenas */
        font-size: 12px;
    }
}

/* Ajuste adicional para garantir que os containers flex não quebrem */
.partida-times-placar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0; /* Importante: permite que os filhos truncados funcionem */
}

.time-casa, .time-fora {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0; /* Permite que o texto seja truncado dentro do flex container */
}
/* ===== AJUSTES DE ESPAÇAMENTO ENTRE TIMES E PLACAR ===== */
.partida-times-placar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    gap: 5px; /* Reduz o espaço entre os elementos */
}

.partida-placar {
    font-size: 18px;
    font-weight: bold;
    margin: 0 8px; /* Reduzido de 15px para 8px */
    min-width: 50px;
    text-align: center;
    flex-shrink: 0; /* Impede que o placar encolha */
}

.partida-nome {
    font-weight: 500;
    margin: 0 5px; /* Reduzido de 10px para 5px */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.time-casa, .time-fora {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 5px; /* Espaço consistente entre logo e nome */
}

/* Ajustes específicos para mobile */
@media (max-width: 768px) {
    .partida-placar {
        margin: 0 5px; /* Mais reduzido no mobile */
        min-width: 40px;
        font-size: 16px;
    }
    
    .partida-nome {
        margin: 0 3px;
        max-width: 100px;
        font-size: 13px;
    }
    
    .partida-times-placar {
        gap: 3px;
    }
    
    .time-casa, .time-fora {
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .partida-placar {
        margin: 0 3px;
        min-width: 35px;
        font-size: 14px;
    }
    
    .partida-nome {
        margin: 0 2px;
        max-width: 70px;
        font-size: 12px;
    }
    
    .logo-time {
        height: 20px;
    }
}

/* Ajuste específico para as últimas partidas (já existente, mas vamos garantir) */
.ultimas-partidas .partida-placar {
    font-size: 16px;
    min-width: 44px;
    margin: 0 8px; /* Reduzido também aqui */
}

@media (max-width: 768px) {
    .ultimas-partidas .partida-placar {
        font-size: 15px;
        margin: 0 5px;
    }
}

/* === [REFATORAÇÃO] Toolbar + Competição (coerente com o visual do pós-match) === */
.partidas-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding: 8px 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.partidas-toolbar-left,
.partidas-toolbar-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.partidas-toolbar-label{
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.partidas-select-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.partidas-select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(25,25,25,0.85);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 36px 10px 12px;
  height: 40px;
  min-width: 220px;
  border-radius: 0 !important;
  outline: none;
}

.partidas-select:focus{
  border-color: rgba(31,111,235,0.85);
  box-shadow: 0 0 0 2px rgba(31,111,235,0.18);
}

.partidas-select-arrow{
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  line-height: 1;
}

.resumo-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(20,20,20,0.55);
  color: rgba(255,255,255,0.80);
  font-size: 13px;
  border-radius: 0 !important;
}

.resumo-chip b{ color:#fff; font-weight: 700; }

.resumo-chip.resumo-v{ border-color: rgba(76,175,80,0.35); color: #9be19f; }
.resumo-chip.resumo-e{ border-color: rgba(255,193,7,0.30); color: #ffd76a; }
.resumo-chip.resumo-d{ border-color: rgba(244,67,54,0.30); color: #ff9a92; }

/* Consistência: sem cantos arredondados nessa aba */
.partida-box,
.load-more-btn, .load-less-btn{
  border-radius: 0 !important;
}

@media (max-width: 520px){
  .partidas-select{ min-width: 100%; width: 100%; }
  .partidas-toolbar-left, .partidas-toolbar-right{ width: 100%; justify-content: space-between; }
}
