/* ===== Lista de jogadores (Formação > Lista) ===== */
.squad-group { 
    color: #e6e6e6; 
    margin: 20px 0 8px; 
    font-weight: 700;
    font-size: 1.2rem;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2a2a;
}

.squad-row { 
    display: grid; 
    grid-template-columns: 56px 1fr 80px 80px 80px 120px 80px; 
    align-items: center;
    background: #1a1a1a;
}

.squad-row:nth-child(even) {
    background: #151515;
}

.squad-row:not(.squad-header) { 
    border-top: 1px solid #1e1e1e; 
}

.squad-row:hover:not(.squad-header) {
    background: #252525;
}

.squad-header { 
    background: #131313; 
    color: #bbb; 
    font-size: .75rem; 
    text-transform: uppercase; 
    letter-spacing: .03em;
    font-weight: 600;
}

.col { 
    padding: 12px 8px; 
    color: #ddd;
    font-size: 0.85rem;
    text-align: center;
}

.col-num { 
    font-weight: 700; 
    color: #a6e1ff;
}

.col-player { 
    display: flex; 
    align-items: center; 
    gap: 12px;
    text-align: left;
}

.player-link { 
    color: inherit; 
    text-decoration: none;
    transition: all 0.2s ease;
}

.player-link:hover {
    color: #fff;
}

.player-link:hover .pname { 
    color: #fff; 
}

.ava { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover; 
    background: #333; 
    border: 1px solid #555;
    flex-shrink: 0;
}

.pinfo { 
    display: flex; 
    flex-direction: column; 
    line-height: 1.2;
    min-width: 0;
}

.pname { 
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ppos { 
    font-size: .75rem; 
    color: #9aa0a6;
    font-weight: 500;
}

.col-nat {
    font-weight: 600;
    color: #a6e1ff;
}

/* Indicador de lesão discreto */
.injured-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.injured-icon {
    font-size: 0.65rem;
    opacity: 0.8;
}

.injured-text {
    font-weight: 500;
    letter-spacing: -0.3px;
}

/* Linha do jogador lesionado com fundo sutil */
.injured-player {
    background: rgba(255, 107, 107, 0.05) !important;
    border-left: 3px solid rgba(255, 107, 107, 0.3);
}

.injured-player:hover {
    background: rgba(255, 107, 107, 0.08) !important;
}

/* Responsividade */
@media (max-width: 1024px) {
    .squad-row { 
        grid-template-columns: 50px 1fr 70px 70px 70px 100px 70px; 
    }
    
    .col { 
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .ava { 
        width: 36px; 
        height: 36px;
    }
    
    .pname {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .squad-row { 
        grid-template-columns: 44px 1fr 60px 60px 60px 0px 60px; 
    }
    
    .col-dob { 
        display: none;
    }
    
    .col { 
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .ava { 
        width: 32px; 
        height: 32px;
    }
    
    .pname {
        font-size: 0.8rem;
    }
    
    .injured-indicator {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .squad-group {
        font-size: 1.1rem;
    }
}

@media (max-width: 640px) {
    .squad-row { 
        grid-template-columns: 40px 1fr 50px 50px 50px 0px 50px; 
    }
    
    .col-age {
        font-size: 0.7rem;
    }
    
    .col-wt, .col-ht {
        font-size: 0.7rem;
    }
    
    .pname {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .injured-indicator {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .squad-row { 
        grid-template-columns: 36px 1fr 44px 44px 44px 0px 44px; 
    }
    
    .col { 
        padding: 6px 3px;
        font-size: 0.7rem;
    }
    
    .ava { 
        width: 28px; 
        height: 28px;
    }
    
    .pname {
        font-size: 0.75rem;
    }
    
    .ppos {
        font-size: 0.65rem;
    }
    
    .squad-group {
        font-size: 1rem;
        margin: 16px 0 6px;
    }
    
    .injured-indicator {
        font-size: 0.6rem;
        padding: 1px 3px;
    }
    
    .injured-text {
        display: none; /* Esconde o texto "lesionado" em telas muito pequenas */
    }
}

/* Estilos para quando não há dados */
.alert {
    padding: 20px;
    text-align: center;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #ddd;
    margin: 20px 0;
}

.alert-info {
    background: #1a2a3a;
    border-color: #2a4a6a;
    color: #a6e1ff;
}

.alert-danger {
    background: #3a1a1a;
    border-color: #6a2a2a;
    color: #ffa6a6;
}

/* ===== Compact & Mobile Overrides (ChatGPT 2025-11-07) ===== */

/* Desktop leve */
.squad-row { 
  grid-template-columns: 48px 1fr 68px 68px 68px 100px 68px; 
}
.col { 
  font-size: 0.82rem; 
}

/* ≤1024px */
@media (max-width: 1024px) {
  .squad-row { grid-template-columns: 44px 1fr 60px 60px 60px 90px 60px; }
  .col { font-size: 0.78rem; }
  .ava { width: 34px; height: 34px; }
}

/* ≤768px — esconde Nascimento, tudo mais compacto */
@media (max-width: 768px) {
  .squad-row { grid-template-columns: 40px 1fr 54px 54px 54px 0px 54px; }
  .col { padding: 6px 4px; font-size: 0.72rem; }
  .ava { width: 28px; height: 28px; }
  .ppos { font-size: 0.62rem; }
  .col-dob { display: none; } /* Nascimento */
}

/* ≤600px — esconde Altura/Peso; mantém Nº, Jogador, Posição, Nac./Idade */
@media (max-width: 600px) {
  .squad-row { grid-template-columns: 36px 1fr 48px 52px 0px 0px 48px; }
  .col-wt, .col-ht { display: none; } /* Peso e Altura */
  .squad-group { font-size: 0.95rem; }
  .pname { font-size: 0.76rem; }
}

/* ≤420px — ultra compacto; esconde Nacionalidade para caber tudo */
@media (max-width: 420px) {
  .squad-row { grid-template-columns: 32px 1fr 44px 0px 0px 0px 44px; }
  .col-nat { display: none; } /* Nacionalidade */
  .col { font-size: 0.68rem; }
  .ppos { font-size: 0.58rem; }
  .ava { width: 24px; height: 24px; }
  .injured-indicator { padding: 0 4px; font-size: 0.55rem; }
}

/* ===== Aesthetic Compact Pass v2 (2025-11-08) ===== */

/* Visual refinements */
.squad-row {
  align-items: center;
  gap: 6px;
}
.squad-row:not(.squad-header) {
  border-top: 1px solid rgba(255,255,255,0.06);
}
.squad-row .col {
  padding: 6px 8px;
  line-height: 1.2;
}
.squad-header .col {
  font-weight: 600;
  letter-spacing: .02em;
  padding: 8px 8px;
}
.col-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pname {
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ppos {
  display: block;
  font-size: 0.72em;
  opacity: .7;
  margin-top: 2px;
}
.ava { 
  width: 36px; height: 36px; border-radius: 50%;
  flex: 0 0 auto;
}

/* Fluid type scale (dominates previous font-sizes) */
:root { --fs-col: clamp(11px, 1.45vw, 14px); --fs-head: clamp(11.5px, 1.55vw, 15px); }
.col { font-size: var(--fs-col); }
.squad-header .col { font-size: var(--fs-head); }

/* Slightly tighter desktop */
@media (min-width: 1025px) and (max-width: 1440px) {
  .squad-row .col { padding: 6px 6px; }
  .ava { width: 34px; height: 34px; }
}

/* ≤1024px */
@media (max-width: 1024px) {
  .squad-row .col { padding: 6px 6px; }
  .ava { width: 32px; height: 32px; }
  .ppos { font-size: 0.70em; }
}

/* ≤900px */
@media (max-width: 900px) {
  .squad-row { gap: 4px; }
  .squad-row .col { padding: 5px 6px; }
  .ava { width: 30px; height: 30px; }
}

/* ≤768px — compacto, remove Nasc. */
@media (max-width: 768px) {
  .squad-row { grid-template-columns: 34px 1fr 48px 48px 48px 0px 48px; }
  .col-dob { display: none; }
  .col { font-size: clamp(10.5px, 2.2vw, 13px); }
  .ava { width: 28px; height: 28px; }
  .ppos { font-size: 0.68em; }
}

/* ≤600px — esconde Altura/Peso */
@media (max-width: 600px) {
  .squad-row { grid-template-columns: 30px 1fr 44px 44px 0px 0px 44px; }
  .col-wt, .col-ht { display: none; }
  .pname { font-size: clamp(12px, 3.4vw, 13px); }
  .ava  { width: 26px; height: 26px; }
}

/* ≤480px — ainda mais compacto, header colado, menor padding */
@media (max-width: 480px) {
  .squad-row .col { padding: 5px 5px; }
  .squad-group { margin: 8px 0 6px; font-size: 0.95rem; }
  .pname { font-size: clamp(11px, 3.3vw, 12.5px); }
  .ppos  { font-size: 0.66em; }
  .ava  { width: 24px; height: 24px; }
}

/* ≤420px — some "Nac." para caber */
@media (max-width: 420px) {
  .squad-row { grid-template-columns: 28px 1fr 42px 0px 0px 0px 42px; }
  .col-nat { display: none; }
  .col { font-size: clamp(10px, 3.2vw, 12px); }
  .ava { width: 22px; height: 22px; }
}

/* ≤360px — mostrar só Nº, Jogador, Idade */
@media (max-width: 360px) {
  .squad-row { grid-template-columns: 26px 1fr 38px; }
  .col-ht, .col-wt, .col-dob, .col-nat { display: none !important; }
  .col-age { display: block; text-align: right; }
  .col { padding: 4px 4px; font-size: clamp(10px, 3.5vw, 11.5px); }
  .pname { font-size: clamp(11px, 3.6vw, 12px); }
  .ppos { font-size: 0.64em; }
  .ava { width: 22px; height: 22px; }
}

/* ≤320px — só Nº e Jogador (idade some), tudo minúsculo */
@media (max-width: 320px) {
  .squad-row { grid-template-columns: 24px 1fr; }
  .col-age { display: none !important; }
  .col { padding: 3px 4px; font-size: 10.5px; }
  .pname { font-size: 11px; }
  .ava { width: 20px; height: 20px; }
}

/* ≤300px — micro */
@media (max-width: 300px) {
  .squad-row { grid-template-columns: 22px 1fr; }
  .col { padding: 3px 3px; font-size: 10px; }
  .pname { font-size: 10.5px; }
  .ppos { font-size: 0.62em; }
  .ava { width: 18px; height: 18px; }
}

/* ≤280px — cabe em qualquer tela */
@media (max-width: 280px) {
  .squad-row { grid-template-columns: 20px 1fr; }
  .col { padding: 2px 3px; font-size: 9.5px; }
  .pname { font-size: 10px; }
  .ava { width: 16px; height: 16px; }
  .squad-header .col { font-size: 10px; }
}

/* ===== Show ALL columns under 600px (ultra-compact) — 2025-11-08 ===== */
@media (max-width: 600px) {
  /* force all columns to be visible */
  .col-nat, .col-ht, .col-wt, .col-dob, .col-age { display: block !important; }
  /* ultra-tight grid: [#][Jogador][Pos][Nac][Alt][Peso][Idade/Nasc comporta] */
  .squad-row { grid-template-columns: 24px 1fr 36px 36px 44px 44px 56px !important; gap: 3px; }
  .squad-row .col { padding: 2px 3px !important; white-space: nowrap; overflow: hidden; text-overflow: clip; }
  .col { font-size: 10px !important; line-height: 1.1 !important; letter-spacing: 0; }
  .squad-header .col { font-size: 10px !important; padding: 3px 3px !important; }
  .pname { font-size: 11px !important; }
  .ppos  { font-size: 0.58em !important; }
  .ava   { width: 20px !important; height: 20px !important; }
  /* align numeric columns right for compactness */
  .col-num, .col-ht, .col-wt, .col-age { text-align: right; }
  .col-dob { text-align: right; }
}

/* Make sure ≤420 / ≤360 earlier rules don't hide fields when we're ≤600 */
/* We already used !important above, but add a safety neutralizer */
@media (max-width: 420px) {
  .col-nat, .col-ht, .col-wt, .col-dob, .col-age { display: block !important; }
}
@media (max-width: 360px) {
  .col-nat, .col-ht, .col-wt, .col-dob, .col-age { display: block !important; }
}

/* ===== Ultra-compact for <=450px (keep all columns + protect player name) — 2025-11-08 ===== */
@media (max-width: 450px) {
  .squad-row { 
    grid-template-columns: 22px 1fr 30px 30px 36px 36px 46px !important;
    gap: 2px !important;
  }
  .col-player { min-width: 0 !important; }
  .pname { 
    font-size: 10.5px !important; 
    white-space: nowrap !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important; 
    max-width: 100% !important;
  }
  .ppos { font-size: 0.55em !important; }
  .squad-row .col { 
    padding: 2px 2px !important; 
    font-size: 9.5px !important; 
    line-height: 1.05 !important;
    white-space: nowrap !important; 
    overflow: hidden !important; 
    text-overflow: clip !important;
  }
  .squad-header .col { font-size: 9.5px !important; padding: 2px 2px !important; }
  .ava { width: 18px !important; height: 18px !important; }
  .col-num, .col-ht, .col-wt, .col-age, .col-dob { text-align: right !important; }
}

/* Even tighter for <=400px */
@media (max-width: 400px) {
  .squad-row { 
    grid-template-columns: 20px 1fr 28px 28px 34px 34px 44px !important;
    gap: 2px !important;
  }
  .pname { font-size: 10px !important; }
  .squad-row .col { font-size: 9px !important; }
  .ava { width: 16px !important; height: 16px !important; }
}

/* ===== Ultra-compact cascade (<=370 → 280px) — 2025-11-08 ===== */
@media (max-width: 370px) {
  .squad-row { grid-template-columns: 20px 1fr 28px 28px 32px 32px 42px !important; gap: 2px !important; }
  .squad-row .col { padding: 2px 2px !important; font-size: 9.5px !important; line-height: 1.05 !important; min-width: 0 !important; }
  .squad-header .col { font-size: 9.3px !important; padding: 2px 2px !important; }
  .col-player { min-width: 0 !important; }
  .pname { font-size: 10px !important; max-width: 100% !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .ppos { font-size: 0.52em !important; }
  .ava { width: 16px !important; height: 16px !important; }
  .col-num, .col-ht, .col-wt, .col-age, .col-dob { text-align: right !important; }
}

@media (max-width: 320px) {
  .squad-row { grid-template-columns: 18px 1fr 26px 26px 30px 30px 38px !important; gap: 2px !important; }
  .squad-row .col { font-size: 9px !important; padding: 2px 2px !important; }
  .squad-header .col { font-size: 9px !important; }
  .pname { font-size: 9.8px !important; }
  .ava { width: 15px !important; height: 15px !important; }
}

@media (max-width: 300px) {
  .squad-row { grid-template-columns: 16px 1fr 24px 24px 28px 28px 36px !important; gap: 2px !important; }
  .squad-row .col { font-size: 8.8px !important; padding: 2px 1px !important; }
  .squad-header .col { font-size: 8.8px !important; }
  .pname { font-size: 9.6px !important; }
  .ava { width: 14px !important; height: 14px !important; }
}

@media (max-width: 280px) {
  .squad-row { grid-template-columns: 16px 1fr 22px 22px 26px 26px 34px !important; gap: 2px !important; }
  .squad-row .col { font-size: 8.5px !important; padding: 1px 1px !important; }
  .squad-header .col { font-size: 8.5px !important; }
  .pname { font-size: 9.2px !important; }
  .ava { width: 13px !important; height: 13px !important; }
}

/* ===== Extra-small fonts for DOB/Idade (≤350 → 280px) — 2025-11-08 ===== */
@media (max-width: 350px) {
  .col-dob, .col-dob abbr, .col-dob span,
  .col-age, .col-age abbr, .col-age span {
    font-size: 8.2px !important;
    letter-spacing: 0 !important;
  }
}
@media (max-width: 320px) {
  .col-dob, .col-dob abbr, .col-dob span,
  .col-age, .col-age abbr, .col-age span {
    font-size: 7.8px !important;
  }
}
@media (max-width: 300px) {
  .col-dob, .col-dob abbr, .col-dob span,
  .col-age, .col-age abbr, .col-age span {
    font-size: 7.5px !important;
  }
}
@media (max-width: 280px) {
  .col-dob, .col-dob abbr, .col-dob span,
  .col-age, .col-age abbr, .col-age span {
    font-size: 7.2px !important;
  }
}

/* ===== DOB-safe cascade (<=450 → 280px) — 2025-11-08 ===== */
@media (max-width: 450px) {
  .squad-row { grid-template-columns: 20px 1fr 28px 30px 32px 52px 46px !important; gap: 2px !important; }
  .col-dob, .col-age { font-size: 9px !important; font-variant-numeric: tabular-nums; white-space: nowrap !important; }
  .col-nat { width: 28px !important; text-align: center; }
  .col-ht, .col-wt { width: 30px !important; text-align: right; }
  .pname { min-width: 0 !important; max-width: 100% !important; }
}

@media (max-width: 370px) {
  .squad-row { grid-template-columns: 18px 1fr 26px 28px 30px 50px 42px !important; }
  .col-dob { font-size: 8.8px !important; }
  .col-age { font-size: 8.8px !important; }
}

@media (max-width: 320px) {
  .squad-row { grid-template-columns: 16px 1fr 24px 26px 28px 48px 38px !important; }
  .col-dob { font-size: 8.6px !important; }
  .col-age { font-size: 8.6px !important; }
}

@media (max-width: 300px) {
  .squad-row { grid-template-columns: 16px 1fr 24px 24px 26px 46px 36px !important; }
  .col-dob { font-size: 8.4px !important; }
  .col-age { font-size: 8.4px !important; }
}

@media (max-width: 280px) {
  .squad-row { grid-template-columns: 16px 1fr 22px 22px 24px 44px 34px !important; }
  .col-dob { font-size: 8.2px !important; }
  .col-age { font-size: 8.2px !important; }
}

/* ADICIONAR esta regra para garantir que a data ocupe menos espaço */
.col-dob {
    font-variant-numeric: tabular-nums; /* números com largura fixa */
    white-space: nowrap;
}