/*
 * The lobby's leaderboards panel: tabs, the one board they pick, and a player's stats under their
 * row once it's clicked. The panel itself is the lobby's (.lobby-panel).
 */

/* The tabs: one per board, wrapping onto a second line if the panel is too narrow for them. */
.lb-tabs {
  align-self: flex-start;
  flex-wrap: wrap;
  max-width: 100%;
  border-radius: 14px;
}

.lb-tabs .segment { white-space: nowrap; }

/* .small centres itself for the page's footers; here it sits under the tabs. */
.lb-blurb {
  margin: 0;
  text-align: left;
}

.lb-message {
  margin: 0;
  font-size: 13px;
}

/* ------------------------------------------------------------------ the board */

.lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-row {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 7px;
}

.lb-row.you { background: rgba(255, 255, 255, 0.08); }

/* Rows can be clicked to show that player's stats. */
.lb-row { cursor: pointer; }
.lb-row:hover { background: rgba(255, 255, 255, 0.05); }
.lb-row.you:hover { background: rgba(255, 255, 255, 0.1); }
.lb-row.picked { box-shadow: inset 0 0 0 1px var(--gold); background: rgba(255, 255, 255, 0.06); }

.lb-rank {
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
}

.lb-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lb-player,
.lb-detail {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-detail {
  font-size: 12px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.lb-main {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  white-space: nowrap;
}

.lb-gap {
  text-align: center;
  color: var(--ink-dim);
  line-height: 1;
}

/* ------------------------------------------------------------------ a player's stats */

/* Under the row that was clicked. */
.lb-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  padding: 6px 0 8px;
}

.lb-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  min-width: 0;
}

.lb-tile .label { font-size: 10px; }

.lb-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-value.gold { color: var(--gold); }
.lb-value.win { color: var(--win); }
.lb-value.lose { color: var(--lose); }

/* ------------------------------------------------------------------ small frames */

@media (max-width: 460px) {
  .lb-tiles { gap: 6px; }
}
