/* #times{ */
/* background-color:var(--color2); */
/* color:var(--color1); */
/* font-weight: bold; */
/* cursor:pointer; */
/* margin: 0 20px 0 0; */
/* border-radius:10px; */
/* height:100%; */
/* } */

#times {
  background-color: var(--color2);
  color: var(--color1);
  font-weight: bold;
  cursor: pointer;
  border-radius: 10px;
  height: 100%;

  min-height: 50px;
  line-height: 50px;
  margin: 20px auto;
  position: relative;
  text-align: center;
  padding: 0 10px;
}

#button_wrapper {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  /* width:100%: */
  margin-right: 20px;
}

#barraBusca {
  display: flex;
  flex-direction: row;
  flex-wrap: no-wrap;
  justify-content: flex-end;
  align-items: baseline;
}

#tabela-classificacao {
  margin: 10px auto;
}

#tabela-quadros {
  background-color: transparent;
}

#tabela-classificacao {
  margin: 10px auto;
  border-collapse: separate;
}

#tabela-classificacao th:nth-child(4),
#tabela-classificacao th:nth-child(5),
#tabela-classificacao th:nth-child(6),
#tabela-classificacao td:nth-child(4),
#tabela-classificacao td:nth-child(5),
#tabela-classificacao td:nth-child(6) {
  opacity: 0.5;
}



#tabela-classificacao th {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  font-size: 1em;
  padding: 5px;
}

body {
  height: auto;
}

tr:nth-child(even) {
  /* background-color: #F5F5F5; */
}

tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

#tabela-classificacao td a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

#tabela-classificacao td a:hover {
  color: #ccc;
}

#tabela-classificacao td {
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  text-align: center;
  font-size: 1em;
  padding: 5px;
}

.border-cell-right {
  border-radius: 0 10px 10px 0;
}

.border-cell-left {
  border-radius: 10px 0 0 10px;
}

.highlight {
  background-color: gold;
}

.avatar-class {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.perfil-usuario,
.perfil-usuario a {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-evenly;
}

.perfil-usuario img {
  margin-right: 10px;
}

.badge-paid {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
}

.badge-paid .material-icons {
    font-size: 0.85rem;
}

.badge-cafe {
    background: linear-gradient(135deg, #8b4513, #5d2e0d);
    color: white;
    font-size: 0.65rem;
    padding: 3px 6px;
    border-radius: 50%;
    margin-left: 8px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255,255,255,0.1);
}

.badge-cafe .material-icons {
    font-size: 0.9rem;
}

#final {
  height: 50px;
}

#caixa_pesquisa {
  width: 16rem;
  border: none;
  margin: 0;
  font-family: Montserrat, sans-serif;
  height: 50px;
  border-radius: 10px;
}

#search_wrapper {
  margin: 0 20px 0 0;

  border: 0.1rem lightgray inset;
  border-radius: 10px;
  margin-top: 20px;
}

#search_wrapper i {
  padding: 0.2rem;
  font-size: 1.5rem;
  cursor: default;
}

.select2-selection,
.select2-selection__rendered,
.select2-selection__rendered span {
  /* height:50px !important; */
  min-height: 50px !important;
  line-height: 50px;
  font-size: 1em;
  text-align: center;

  /* border: none !important; */
}

.select2-selection__rendered span span {
  display: flex;
  /* vertical-align: middle; */
  padding-left: 10px;
  align-content: center;
  justify-content: center;
  /* line-height: normal; */
}

.select2-selection__rendered span {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;

}

#select_wrapper i {
  padding: 0.2rem;
  font-size: 1.5rem;
  cursor: default;
}

#select_wrapper {
  margin: 0 20px 0 0;

  border: 0.1rem lightgray inset;
  border-radius: 10px;
  width: 250px;
  margin-top: 20px;
}

.bandeiraSelect {
  height: 40px;
}

.bandeira {
  height: 40px;
  max-width: 60px;
}


.pagination_link {
  background-color: transparent;
  color: #808080;
  font-size: 1.25rem;
  padding: 0.5rem;

}

.pagination_link:disabled {
  color: lightgray;
  cursor: default;
}

.pagination {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  visibility: visible;
  min-height: 50px;
}


.pagination {
  display: inline-block;
  list-style: none;

}

.pagination li {
  float: left;

}

.pagination a {
  color: gray;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
}

.pagination a:active {
  color: gray;
}

@media only screen and (max-width: 600px) {

  #barraBusca {
    flex-direction: column;
    padding-top: 20px;
    align-items: center;
  }

  /* Force table, tbody, tr, td to behave like blocks */
  #tabela-classificacao,
  #tabela-classificacao tbody,
  #tabela-classificacao tr,
  #tabela-classificacao td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hide table header but keep accessible */
  #tabela-classificacao thead {
    display: none !important;
  }

  /* Style each table row as a card */
  #tabela-classificacao tbody tr {
    background: rgba(15, 15, 25, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    margin-bottom: 20px !important;
    padding: 16px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
    text-align: left !important;
  }

  #tabela-classificacao tbody tr:hover {
    transform: translateY(-2px) !important;
    background: rgba(20, 20, 32, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }

  /* Current User Highlight Card */
  #tabela-classificacao tbody tr.current-user-row {
    border: 1.5px solid #8a1538 !important;
    background: rgba(138, 21, 56, 0.15) !important;
    box-shadow: 0 15px 35px rgba(138, 21, 56, 0.25) !important;
  }

  /* Individual td styling in Card */
  #tabela-classificacao td {
    padding: 8px 0 !important;
    border: none !important;
    background: transparent !important;
    text-align: right !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  #tabela-classificacao td:last-child {
    border-bottom: none !important;
  }

  /* User profile / Avatar block - Top of the Card */
  #tabela-classificacao td.perfil-usuario {
    order: -1 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding-bottom: 12px !important;
    margin-bottom: 6px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }

  #tabela-classificacao td.perfil-usuario > div {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
  }

  #tabela-classificacao td.perfil-usuario img.avatar-class {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    border: 2px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
  }

  /* Position/Rank Styling inside Card */
  #tabela-classificacao td:nth-child(1) {
    order: -2 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding-bottom: 8px !important;
    margin-bottom: 4px !important;
  }

  /* Reset absolute positioning from base template to prevent overlapping */
  #tabela-classificacao td:before,
  #tabela-detalhes td:before {
    position: static !important;
    width: auto !important;
    text-align: left !important;
    padding-right: 0 !important;
    display: inline-block !important;
  }

  /* Labels for stats on mobile */
  .pt #tabela-classificacao td:nth-child(1):before { content: "Posição"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .en #tabela-classificacao td:nth-child(1):before { content: "Place"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .es #tabela-classificacao td:nth-child(1):before { content: "Posición"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }

  .pt #tabela-classificacao td:nth-child(3):before { content: "Pontos"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .en #tabela-classificacao td:nth-child(3):before { content: "Points"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .es #tabela-classificacao td:nth-child(3):before { content: "Puntos"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }

  .pt #tabela-classificacao td:nth-child(4):before { content: "Jogos Perfeitos"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .en #tabela-classificacao td:nth-child(4):before { content: "Perfect Matches"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .es #tabela-classificacao td:nth-child(4):before { content: "Partidos Perfectos"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }

  .pt #tabela-classificacao td:nth-child(5):before { content: "Pontos Absolutos"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .en #tabela-classificacao td:nth-child(5):before { content: "Absolute Points"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .es #tabela-classificacao td:nth-child(5):before { content: "Puntos absolutos"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }

  .pt #tabela-classificacao td:nth-child(6):before { content: "Data média de aposta"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .en #tabela-classificacao td:nth-child(6):before { content: "Average bet date"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .es #tabela-classificacao td:nth-child(6):before { content: "Fecha promédio de apuesta"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }

  .pt #tabela-classificacao td:nth-child(7):before { content: "Apostas realizadas"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .en #tabela-classificacao td:nth-child(7):before { content: "Bets completed"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }
  .es #tabela-classificacao td:nth-child(7):before { content: "Apuestas realizadas"; font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; }

  /* Ensure original th column visibility opacity adjustments don't hide entire rows or fields on mobile cards */
  #tabela-classificacao th:nth-child(4),
  #tabela-classificacao th:nth-child(5),
  #tabela-classificacao th:nth-child(6),
  #tabela-classificacao td:nth-child(4),
  #tabela-classificacao td:nth-child(5),
  #tabela-classificacao td:nth-child(6) {
    opacity: 1 !important;
  }
  
  #tabela-classificacao td:nth-child(4),
  #tabela-classificacao td:nth-child(5),
  #tabela-classificacao td:nth-child(6) {
    color: rgba(255, 255, 255, 0.85) !important;
  }
}

.perfil-link {
	color: white !important;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	transition: all 0.2s ease;
}

.perfil-link:hover {
	text-decoration: underline !important;
	opacity: 0.9;
	transform: scale(1.02);
}