/* ==========================================================================
   Statistics hub (stats.php, stats_*.php) and the people lists (fullyverified,
   needvotes, excellence, votinghistory, allacademies, youmayknow).
   Markup from functions_stats.php. Tokens from styles/modern.css.
   ========================================================================== */

.bc-stats { min-width: 0; padding: 0 4px; }
.bc-stats .card-style { margin: 0 0 16px !important; }
.bc-stats .card-style .content { margin-top: 18px; margin-bottom: 16px; }
.bc-stats .card-style h1 { font-size: 17px; letter-spacing: -0.015em; line-height: 1.3; margin-bottom: 12px !important; }

/* ---------- Hub header ---------- */
.bc-hub {
  position: relative;
  margin: 0 0 18px;
  padding: 22px 22px 16px;
  border-radius: var(--bc-r-lg, 22px);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(3, 195, 227, 0.10), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(212, 116, 79, 0.08), transparent 60%),
    var(--bc-surface, #fff);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line);
  overflow: hidden;
}
.bc-hub-intro { max-width: 760px; }
.bc-hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bc-accent, #5b4bd1) !important;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
}
.bc-hub-title {
  margin: 6px 0 0 !important;
  color: var(--bc-ink, #0b0b10);
  font-size: clamp(24px, 3vw, 32px) !important;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.bc-hub-lead { margin: 8px 0 0; color: var(--bc-muted, #6b6b76); font-size: 14px; line-height: 1.5; }
.bc-hub-meta { margin: 6px 0 0; color: var(--bc-faint, #9a9aa5); font-size: 12.5px; }

.bc-hub-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 18px -4px 0;
  padding: 2px 4px;
}
.bc-hub-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--bc-surface-2, #f6f6f8);
  box-shadow: inset 0 0 0 1px var(--bc-line);
  color: var(--bc-ink-2, #3a3a44) !important;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background-color 0.2s var(--bc-ease, ease), color 0.2s var(--bc-ease, ease), box-shadow 0.2s var(--bc-ease, ease);
}
.bc-hub-tab i { font-size: 12px; color: var(--bc-faint, #9a9aa5); transition: color 0.2s var(--bc-ease, ease); }
.bc-hub-tab:hover { background: var(--bc-surface-3, #eeeef2); color: var(--bc-ink, #0b0b10) !important; }
.bc-hub-tab:hover i { color: var(--bc-accent, #5b4bd1); }
.bc-hub-tab:focus-visible { outline: none; box-shadow: var(--bc-ring); }
.bc-hub-tab.is-active {
  background: var(--bc-ink, #0b0b10);
  box-shadow: none;
  color: var(--bc-on-ink) !important;
}
.bc-hub-tab.is-active i { color: #fff; opacity: 0.85; }
.bc-hub-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--bc-line-strong); }

@media (max-width: 767.98px) {
  .bc-stats { padding: 0; }
  .bc-hub { margin: 0 0 14px; padding: 18px 16px 12px; border-radius: 18px; }
  .bc-hub-lead { font-size: 13.5px; }
  /* One row that scrolls sideways, fading at the edge */
  .bc-hub-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 14px -16px 0;
    padding: 2px 16px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
  }
  .bc-hub-tabs::-webkit-scrollbar { display: none; }
  .bc-hub-tab { flex: 0 0 auto; height: 32px; padding: 0 12px; font-size: 12.5px; }
  .bc-hub-sep { flex: 0 0 1px; }
}

/* ---------- KPI tiles on the page background ---------- */
.bc-stats .bc-tiles--bare {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.bc-tiles--bare .bc-tile {
  background: var(--bc-surface, #fff);
  box-shadow: var(--bc-shadow-1), 0 0 0 1px var(--bc-line) inset;
  padding: 16px 16px 14px;
}
.bc-tile-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--bc-accent-soft, rgba(91, 75, 209, 0.1));
  color: var(--bc-accent, #5b4bd1);
  font-size: 13px;
}
.bc-tiles--bare .bc-tile-label { letter-spacing: 0.04em; font-size: 10.5px; }
@media (max-width: 767.98px) {
  .bc-stats .bc-tiles--bare { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
  .bc-tiles--bare .bc-tile { padding: 13px 13px 12px; border-radius: 14px; }
  .bc-tile-icon { width: 26px; height: 26px; margin-bottom: 8px; font-size: 12px; }
  .bc-tiles--bare .bc-tile-value { font-size: 1.35rem; }
  /* An odd last tile spans the row instead of leaving a hole */
  .bc-tiles--bare .bc-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Layout: a wide row for charts, then a masonry of boards ---------- */
.bc-stats-wide {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.bc-stats-wide > .card-style:only-child { grid-column: 1 / -1; }
.bc-stats-wide--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-stats-grid { columns: 3 320px; column-gap: 16px; }
.bc-stats-grid > * { break-inside: avoid; }
.bc-stats-grid--two { columns: 2 380px; }
.bc-stats-grid--one { columns: 1; }
/* Multi-column layout drops a card's bottom margin at the end of a column, but keeps it on the last
   card, so the gap after a masonry was 0 or 16px. No margin on the last card, and a fixed gap after. */
.bc-stats .bc-stats-grid > .card-style:last-child { margin-bottom: 0 !important; }
.bc-stats-grid + .bc-stats-wide, .bc-stats-grid + .bc-stats-grid { margin-top: 16px; }
/* A long single board: its rows run in two columns on wide screens */
@media (min-width: 992px) {
  .bc-stats-grid--one .bc-podium-rest { display: block; columns: 2; column-gap: 28px; }
  .bc-stats-grid--one .bc-podium-rest > .bc-row { break-inside: avoid; }
  .bc-stats-grid--one .bc-podium { max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 991.98px) {
  .bc-stats-wide { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 767.98px) {
  .bc-stats-grid { columns: 1; }
  .bc-stats .card-style .content { margin-left: 16px; margin-right: 16px; }
}
/* No entrance stagger inside the masonry (columns re-flow while cards animate) */
.bc-stats .card-style { animation: none !important; }

.bc-stats-empty { margin: 4px 0 8px; color: var(--bc-faint, #9a9aa5); font-size: 13px; }
.bc-stats .alert { margin: 0 0 16px !important; }

/* Profiles per belt rows are links here */
a.bc-bc-row { color: inherit !important; text-decoration: none !important; border-radius: 10px; transition: background-color 0.2s var(--bc-ease, ease); }
a.bc-bc-row:hover { background: rgba(91, 75, 209, 0.045); }

/* ---------- Leaderboards ---------- */
.bc-board .bc-podium { margin-top: 4px; }
.bc-board .bc-list { margin-bottom: 0; }
/* Rows without faces carry a bar sized to the leader */
.bc-list--bars .bc-row-main { gap: 6px; }
.bc-list--bars .bc-bc-bar { height: 4px; max-width: 100%; }
.bc-list--bars .bc-bc-bar > span { background: var(--bc-brand-grad); opacity: 0.75; }
.bc-list--bars .bc-row:nth-child(-n+3) .bc-bc-bar > span { opacity: 1; }

/* ---------- Segmented belt tabs ---------- */
.bc-seg {
  display: flex;
  gap: 4px;
  margin: 0 0 10px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bc-surface-2, #f6f6f8);
  overflow-x: auto;
  scrollbar-width: none;
}
.bc-seg::-webkit-scrollbar { display: none; }
.bc-seg-btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--bc-muted, #6b6b76);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--bc-ease, ease), color 0.2s var(--bc-ease, ease), box-shadow 0.2s var(--bc-ease, ease);
}
.bc-seg-btn:hover { color: var(--bc-ink, #0b0b10); }
.bc-seg-btn.is-active { background: var(--bc-surface, #fff); color: var(--bc-ink, #0b0b10); box-shadow: 0 1px 3px rgba(16, 16, 30, 0.1), 0 0 0 1px var(--bc-line); }
.bc-seg-btn:focus-visible { outline: none; box-shadow: var(--bc-ring); }
.bc-seg-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--belt, #9aa0ab); box-shadow: inset 0 0 0 1px rgba(15, 15, 25, 0.18); }

/* ---------- Maps (amCharts) ---------- */
.bc-stats-map { width: 100%; height: clamp(300px, 46vw, 560px); }

/* ---------- Empty state ---------- */
.bc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 12px 24px; text-align: center; }
.bc-empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: var(--bc-accent-soft, rgba(91, 75, 209, 0.1));
  color: var(--bc-accent, #5b4bd1);
  font-size: 22px;
}
.bc-empty-title { margin: 0; color: var(--bc-ink, #0b0b10); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.bc-empty-text { margin: 0; max-width: 420px; color: var(--bc-muted, #6b6b76); font-size: 13.5px; line-height: 1.5; }
.bc-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }

/* ==========================================================================
   Face walls: people grids (fnDisplayUsers) as rounded photo tiles.
   Shared with the front page (.bc-index .bc-tiles, styles/index.css); on full
   pages the tiles wrap into a grid instead of scrolling sideways.
   ========================================================================== */
.bc-facewall > .row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 14px 10px;
  margin: 0 !important;
  padding: 4px 0 0 !important;
}
.bc-facewall > .row > [class*="col-"] { width: auto !important; max-width: none !important; flex: none !important; padding: 0 !important; margin: 0 !important; }
/* Split-by-belt walls: the belt drawn between the groups */
.bc-facewall > .mt-3 { margin: 10px 0 6px !important; }
@media (max-width: 767.98px) {
  .bc-facewall > .row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .bc-facewall .d-none.d-sm-block { display: block !important; }
}
@media (max-width: 359.98px) {
  .bc-facewall > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* People list pages: sections as cards with a count */
.bc-stats .bc-count { color: var(--bc-faint, #9a9aa5); font-weight: 500; font-size: 13px; margin-left: 6px; }

/* Tile values: numbers stay on one line; text values (durations, names) may wrap */
.bc-stats .bc-tile-value { font-size: clamp(1.3rem, 1.9vw, 1.85rem); }
.bc-stats .bc-tile-value:not(:only-of-type) { overflow-wrap: anywhere; }
.bc-stats .bc-tiles-card .bc-tiles { grid-template-columns: minmax(0, 1fr); }
.bc-stats .bc-tiles-card .bc-tile-value { white-space: normal; line-height: 1.15; }
.bc-seg-caption { margin: 0 0 6px; color: var(--bc-muted, #6b6b76); font-size: 12.5px; }

/* People list pages */
.bc-stats-sub { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; color: var(--bc-muted, #6b6b76); font-size: 13px; }
.bc-stats-sub i { color: var(--bc-faint, #9a9aa5); font-size: 12px; }
.bc-stats-grid--feed { columns: 1; max-width: 760px; }
.bc-btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--bc-surface-2, #f6f6f8);
  box-shadow: inset 0 0 0 1px var(--bc-line);
  color: var(--bc-ink, #0b0b10) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.2s var(--bc-ease, ease);
}
.bc-btn-soft:hover { background: var(--bc-surface-3, #eeeef2); }
.bc-btn-soft.is-primary { background: var(--bc-ink, #0b0b10); box-shadow: none; color: var(--bc-on-ink) !important; }
.bc-btn-soft.is-primary:hover { background: #26262e; }
.bc-tech-stand { margin: 0 0 10px; font-size: 13px; color: var(--bc-ink-2); } .bc-tech-stand small { color: var(--bc-muted); font-weight: 600; }
