/* LIV-Inspired Leaderboard Styling */

.stat-block.scoring-leaders {
  color: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  max-width: 500px;
  margin: 0 auto 40px auto;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid #00ff87;
  background-color: transparent;
}

.stat-block.scoring-leaders h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #00ff87;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 2px solid #222;
  padding-bottom: 6px;
  background-color: transparent;
}

/* Leaderboard layout */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Player card layout */
.player-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: linear-gradient(90deg, #1a1a1a, #111);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #333;
  transition: all 0.2s ease-in-out;
  height: 200px;
  position: relative;
  text-transform: uppercase;
  background-color: transparent;
}


/* Hover effect */
.player-row:hover {
  background: linear-gradient(90deg, #222, #1a1a1a);
  transform: scale(1.01);
  background-color: transparent;
}

/* Player rank in top-left */
.rank {
  position: absolute;
  top: 10px;
  right: 25px;
  font-weight: bold;
  font-size: 2rem;
  color: #656464;
  z-index: 2;
  background-color: transparent;
}

/* Player image section (1/3 of card) */
.player-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
  background-color: transparent;
}

/* Image container to control sizing */
.player-img-container {
  width: 33%;
  max-width: 180px;
  height: 100%;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
  flex-shrink: 0;
  background-color: transparent;
}

/* Info section (2/3 of card) */
.player-info {
  width: 67%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;
  color: #fff;
  background: none;
  background-color: transparent;
}

/* Name styling */
.first-name {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 4px;
  background-color: transparent;
}

.last-name {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  background-color: transparent;
}

/* Label for scoring avg */
.stat-label {
  font-size: 0.85rem;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  background-color: transparent;
}

/* Actual scoring average */
.stat-value {
  font-weight: 700;
  font-size: 1.4rem;
  color: #00ff87;
  background-color: transparent;
}

/*Toggle Styling*/
.leader-toggle {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.leader-toggle button {
  background: none;
  border: 1px solid #ccc;
  padding: 0px 0px;
  cursor: pointer;
  color: #fff;
  font-weight: bold;
}

.leader-toggle button.active {
  background: #fff;
  color: #000;
}

.leaderboard-block.hidden {
  display: none;
}

/* Outer pill background */
.toggle-outer-pill {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #333; /* dark grey */
  border-radius: 999px;
  width: 285px;
  margin: 0 auto 15px auto; 
  padding-bottom: 9px;
}

/* Toggle Container */
.toggle-container {
  display: flex;
  align-items: center;
  background-color: transparent;
  gap: 8;
}

/* Toggle Buttons */
.stats-toggle-button {
  width: 130px;
  height: 30px;
  background-color: #333; /* Dark grey base */
  color: black;
  border: none;
  outline: none;
  padding: 0px 0px;
  margin: 0 0px;
  border-radius: 999px; /* pill shape */
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  text-transform: uppercase;
}

/* Active State */
.stats-toggle-button.active {
  background-color: #00ff87;
  color: #000;
  border: none;
}

@media (max-width: 480px) {
	/* Outer pill background */
	.toggle-outer-pill {
	  display: flex;
	  justify-content: center;
	  align-items: center;
	  background-color: #333; /* dark grey */
	  border-radius: 999px;
	  width: 285px;
	  margin: 0 auto 15px auto; 
	  padding-bottom: 9px;
	}

	/* Toggle Container */
	.toggle-container {
	  flex-wrap: nowrap;
	  justify-content: center;
	  background-color: transparent;
	  gap: 8;
	}

	/* Toggle Buttons */
	.stats-toggle-button {
	  width: 130px;
	  height: 30px;
	  background-color: #333; /* Dark grey base */
	  color: black;
	  border: none;
	  padding: 0px 0px;
	  margin: 0 0px;
	  border-radius: 999px; /* pill shape */
	  font-size: 1rem;
	  font-weight: 600;
	  cursor: pointer;
	  transition: background-color 0.3s, color 0.3s;
	  text-transform: uppercase;
	}

	/* Active State */
	.stats-toggle-button.active {
	  background-color: #00ff87;
	  color: #000;
	  border: none;
	}
}


/* === CURRENT EVENT LEADERBOARD === */
#current-event-leaderboard {
  background-color: #0d0d0d;
  color: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  max-width: 500px;
  margin: 0 auto 40px auto;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid #00ff87;
}

#current-event-leaderboard h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #00ff87;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 2px solid #222;
  padding-bottom: 6px;
}

/* Leaderboard Table */
.leaderboard-table {
  width: 100%;
  max-height: 400px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.leaderboard-table thead th {
  text-align: left;
  padding: 10px 14px;
  color: #bbb;
  text-transform: uppercase;
  font-size: 0.75rem;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}

.leaderboard-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #262626;
  color: #f0f0f0;
}

.leaderboard-table tbody tr:hover {
  background-color: #1c1c1c;
}

/* First Place Styling */
.leaderboard-first-place {
  background: linear-gradient(90deg, #113322, #1a3f2a);
  color: #00ff87;
  font-weight: bold;
  font-size: 1rem;
}

/* Player Cell Layout */
.player-img-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaderboard-avatar {
  width: 30px;
  height: 30px;
  object-fit: cover;
  margin-right: 15px;
  /*border: 1px solid #fff;*/
}

/* Responsive: Keep layout same for mobile */
@media (max-width: 540px) {
  .leaderboard-table thead {
    display: none;
  }

  .leaderboard-table tbody tr {
    display: table-row;
    border: none;
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
  }

  .leaderboard-table tbody td {
    display: table-cell;
    padding: 10px 8px;
    border-bottom: 1px solid #262626;
  }

  .leaderboard-table tbody td::before {
    content: none;
  }
}

/* ====== TOURNAMENT LEADERBOARD ====== */

/* TOURNAMENT LEADERBOARD CONTAINER */
#tournament-leaderboard {
  color: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  max-width: 90%;
  margin: 0 auto 40px auto;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid #00ff87;
  background-color: transparent;
}

/* LEADERBOARD TABLE */
#tournament-leaderboard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

/* Make grid lines transparent */
#tournament-leaderboard table,
#tournament-leaderboard th,
#tournament-leaderboard td {
  border: 1px solid transparent;
}

/* Table header */
#tournament-leaderboard thead th {
  text-align: center;
  padding: 10px 14px;
  color: #bbb;
  text-transform: uppercase;
  font-size: 0.75rem;
  background: #1a1a1a;
  border-bottom: 1px solid transparent; /* keep border invisible */
}

/* Player name column aligned left */
#tournament-leaderboard thead th:nth-child(2),
#tournament-leaderboard tbody td:nth-child(2) {
  text-align: left;
  padding-left: 15px;
}

/* Table body cells */
#tournament-leaderboard tbody td {
  padding: 12px 14px;
  color: #f0f0f0;
  text-align: center;
  border-bottom: 1px solid transparent; /* invisible line */
}

/* Player name column body aligned left */
#tournament-leaderboard tbody td:nth-child(2) {
  text-align: left;
  padding-left: 15px;
}

/* Hover effect */
#tournament-leaderboard tbody tr:hover {
  background-color: #1c1c1c;
}

/* Event logos images - max 50px */
#tournament-leaderboard thead th img,
#tournament-leaderboard tbody td img {
  max-height: 50px;
  vertical-align: middle;
  display: block;
  margin: 0 auto;
  background-color: transparent;
}

/* Responsive for mobile */
@media (max-width: 540px) {
   #tournament-leaderboard {
    max-width: 100%;       /* full width on small devices */
    padding: 12px 8px;     /* tighter padding */
  }

  /* Smaller logos to save space */
  #tournament-leaderboard thead th img,
  #tournament-leaderboard tbody td img {
    max-height: 18px;      /* slightly smaller */
    max-width: 40px;       /* constrain width */
    margin: 0 auto;
	background-color: transparent;
}
  }

 /* Table header */
	#tournament-leaderboard thead th {
	  text-align: center;
	  padding: 4px 4px;
	  color: #bbb;
	  text-transform: uppercase;
	  font-size: .5rem;
	  background: #1a1a1a;
	  border-bottom: 1px solid transparent; /* keep border invisible */
	}

  /* Slightly smaller font */
  #tournament-leaderboard table {
    font-size: 0.8rem;
  }

  /* Compact cell padding */
  #tournament-leaderboard thead th,
  #tournament-leaderboard tbody td {
	height: 40px;
    padding: 5px 6px;
  }

  /* Ensure header stays visible */
  #tournament-leaderboard thead {
    display: table-header-group;
  }

  /* Player name column left align with minimal padding */
  #tournament-leaderboard thead th:nth-child(2),
  #tournament-leaderboard tbody td:nth-child(2) {
    padding-left: 6px;
    text-align: left;
  }

  /* Center all other columns */
  #tournament-leaderboard thead th:not(:nth-child(2)),
  #tournament-leaderboard tbody td:not(:nth-child(2)) {
    text-align: center;
  }

  /* Target Rank Column: Shrink rank column width on small screens */
  #tournament-leaderboard thead th:first-child,
  #tournament-leaderboard tbody td:first-child {
    width: 5px;           /* narrower rank column */
    min-width: 10px;
    padding-left: 2px;     /* tighter padding */
    padding-right: 2px;
  }
	/* Target the 6th column (Gross Total) header and cells */
	#tournament-leaderboard thead th:nth-child(6),
	#tournament-leaderboard tbody td:nth-child(6) {
	  width: 25px;       /* fixed width, adjust as needed */
	  max-width: 60px;   /* optional max width */
	  white-space: nowrap; /* prevent wrapping */
	  padding-left: 4px;  /* tighten padding if needed */
	  padding-right: 4px;
	  text-align: center; /* keep centered */
	  overflow: hidden;   /* in case content is too wide */
	  text-overflow: ellipsis; /* optional: cut off with ... if too long */
	}
	
	/* Target the 7th column (Net Total) header and cells */
	#tournament-leaderboard thead th:nth-child(7),
	#tournament-leaderboard tbody td:nth-child(7) {
	  width: 25px;       /* fixed width, adjust as needed */
	  max-width: 60px;   /* optional max width */
	  white-space: nowrap; /* prevent wrapping */
	  padding-left: 4px;  /* tighten padding if needed */
	  padding-right: 4px;
	  text-align: center; /* keep centered */
	  overflow: hidden;   /* in case content is too wide */
	  text-overflow: ellipsis; /* optional: cut off with ... if too long */
	}

}

