/* ===============================
   CONTAINER GERAL
================================ */
.league-wrapper {
  background: #fff;
  padding: 32px;
  border-radius: 10px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
  max-width: 1440px;
  margin: 40px auto;
}

/* ===============================
   BLOCO DE GRUPO
================================ */
/* .group-block {
  border-bottom: 1px solid #ddd;
} */

.group-block + .group-block {
  margin-top: 32px;
}

.group-title {
  font-size: 1.5rem;
  font-weight: 800;

  text-transform: uppercase;
}

/* ===============================
   TABELA
================================ */

.table {
  font-size: 0.95rem;
}

.table tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.table tbody tr {
  background: #fff;
  border-radius: 8px;
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
}

.table tbody tr:last-child {
  border-bottom: none;
}

.team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.team-logo {
  width: 30px;
  height: 30px;
}

.table tbody tr:hover {
  background: #f9fafb;
}

.table-destaque {
  background-color: #f5f5f5 !important;
}

/* ===============================
   RODADAS
================================ */

.rounds-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-bottom: 10px;
  padding-top: 10px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
  margin-top: 10px;
}

.rounds-header span {
  font-weight: 800;
  font-size: 0.9rem;
}

.round-arrow {
  position: absolute;
  top: 1px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 576px) {
  .round-arrow {
    width: 36px;
  }
}

.round-arrow.prev {
  left: 0;
}
.round-arrow.next {
  right: 0;
}

.rounds-slider-wrapper {
  overflow: hidden;
}

.rounds-slider {
  display: flex;
  transition: transform 0.35s ease;
}

.round {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===============================
   PARTIDAS
================================ */
.match-card {
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.match-card:last-child {
  border-bottom: none;
}

.match-meta {
  font-size: 0.75rem;
  color: #777;
  margin-bottom: 4px;
  text-align: center;
  margin-bottom: 8px;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.match-teams .team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.match-teams .team:first-child {
  justify-content: flex-end;
  text-align: right;
}

.match-teams .team:last-child {
  justify-content: flex-start;
  text-align: left;
}

.match-teams .team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.match-teams .vs {
  min-width: 52px;
  text-align: center;
  font-size: 1rem;
}

@media (max-width: 576px) {
  .match-teams .team {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85rem;
  }

  .match-teams .vs {
    min-width: 44px;
  }
}

.team {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Mobile first */
@media (max-width: 576px) {
  .team {
    max-width: 120px; /* ajuste fino aqui */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .team img {
    flex-shrink: 0;
  }
}

.vs {
  min-width: 36px;
  text-align: center;
  color: #000;
  font-weight: 600;
}

.x-vs {
  font-weight: 400 !important;
}

/* faz com que o tab-pane funcione corretamente */

.tab-content {
  width: 100%;
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

.stage-group,
.stage-knockout {
  width: 100%;
}

.tab-pane:not(.active) {
  display: none !important;
}
@media (max-width: 768px) {
  .stage-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 12px;
  }

  .stage-team {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .stage-team--left {
    justify-content: flex-end;
  }

  .stage-team--right {
    justify-content: flex-start;
  }

  .stage-team img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .team-name {
    min-width: 0;
    max-width: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    line-height: 1;
  }

  .stage-vs {
    text-align: center;
    font-size: 0.7rem;
    color: #bbb;
  }
}

.group-table {
  width: 100%;
  overflow: hidden; /* protege o layout geral */
}
/* ================================
   Wrapper de scroll da tabela
   ================================ */

.table-scroll {
  overflow: visible; /* desktop: sem scroll */
}

/* garante que a tabela se comporte como tabela */
.table-scroll table {
  width: 100%;
  table-layout: fixed;
}

.table-scroll::-webkit-scrollbar {
  height: 4px;
}

.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.28);
}

/* ================================
   Mobile: scroll horizontal ativo
   ================================ */
/* MOBILE */

/* ================================
   Desktop: sem scroll, layout limpo
   ================================ */
@media (max-width: 1399.98px) {
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Últ. jogos */
  /* .table th:nth-child(12),
.table td:nth-child(12) {
  width: 80px !important;
} */

  /* Time */
  .table th:nth-child(1),
  .table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff; /* obrigatório pra não vazar conteúdo */
    width: 180px !important;
  }

  /* J V E D */
  .table th:nth-child(2),
  .table td:nth-child(2),
  .table th:nth-child(3),
  .table td:nth-child(3),
  .table th:nth-child(4),
  .table td:nth-child(4),
  .table th:nth-child(5),
  .table td:nth-child(5),
  .table th:nth-child(6),
  .table td:nth-child(6),
  .table th:nth-child(7),
  .table td:nth-child(7),
  .table th:nth-child(8),
  .table td:nth-child(8),
  .table th:nth-child(9),
  .table td:nth-child(9) {
    width: 45px !important;
  }

  .table th:nth-child(10),
  .table td:nth-child(10) {
    width: 110px !important;
  }

  /* GP GC SG */
  /* .table th:nth-child(7),
.table td:nth-child(7),
.table th:nth-child(8),
.table td:nth-child(8),
.table th:nth-child(9),
.table td:nth-child(9){
  width: 30px !important;
} */
}

.team-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.table-scroll table {
  table-layout: fixed;
  width: 100%;
}

/* Time */
.table th:nth-child(1),
.table td:nth-child(1) {
  width: 180px;
}

/* PG */
.table th:nth-child(2),
.table td:nth-child(2) {
  width: 50px;
}

/* J V E D */
.table th:nth-child(3),
.table td:nth-child(3),
.table th:nth-child(4),
.table td:nth-child(4),
.table th:nth-child(5),
.table td:nth-child(5),
.table th:nth-child(6),
.table td:nth-child(6) {
  width: 40px;
}

/* GP GC SG */
.table th:nth-child(7),
.table td:nth-child(7),
.table th:nth-child(8),
.table td:nth-child(8),
.table th:nth-child(9),
.table td:nth-child(9) {
  width: 45px;
}

/* Últ. jogos */
.table th:nth-child(10),
.table td:nth-child(10) {
  width: 100px;
}

.table th:nth-child(11),
.table td:nth-child(11) {
  width: 120px;
}

.border-bottom-classificacoes {
  border-bottom: 1px solid #ddd;
}

.table tbody tr:last-child td {
  border-bottom: none !important;
}

.nav-tabs-horizontal .nav-link {
  white-space: nowrap;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  background: #f3f3f3;
  color: #444;
}

.nav-tabs-horizontal .nav-link.active {
  background: #dc3545;
  color: #fff !important;
  font-weight: 600;
}

/* navtabs-mobile */

@media (max-width: 768px) {
  .tabs-horizontal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs-horizontal {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    border: none;
    min-width: max-content;
    justify-content: center;
  }

  .nav-tabs-horizontal .nav-item {
    flex-shrink: 0;
  }

  .nav-tabs-horizontal .nav-link.active::after {
    display: none;
  }

  .tabs-horizontal-scroll::-webkit-scrollbar {
    display: none;
  }
}

/* DESKTOP */
@media (min-width: 769px) {
  .tabs-horizontal-scroll {
    width: 100%;
  }

  .nav-tabs-horizontal {
    display: flex;
    width: 100%;
    justify-content: center;
  }
}

.rounds-wrapper {
  display: flex;
  flex-direction: column;
  height: auto;
}

.rounds-slider-wrapper {
  position: relative;
  overflow: hidden;
  height: auto;
  /* min-height: 200px; */
}

.rounds-slider {
  display: flex;
  align-items: stretch;
  height: auto;
}

.round {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: auto;
}

.ul.nav.nav-tabs.nav-tabs-horizontal.px-0.px-0.pb-md-1 {
  border: none !important;
}
/* Desktop por padrão */
.team-name.short {
  display: none;
}

.team-name.full {
  display: inline;
}

/* Mobile */
@media (max-width: 768px) {
  .team-name.full {
    display: none;
  }

  .team-name.short {
    display: inline;
    font-weight: 600;
  }
}
