/* Styles for CBB Pick'em */
.cbb-jersey {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
}

/* Pick row: slot badge | matchup | controls */
.cbb-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.cbb-row.locked-row { background: #f1f3f5; }
.cbb-slot {
  flex: 0 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #212529;
  color: #fff;
}
.cbb-slot-num { font-size: 22px; font-weight: 700; line-height: 1; }
.cbb-slot-pts { font-size: 11px; opacity: .8; }
.cbb-row-main { flex: 1 1 auto; min-width: 0; }
.cbb-row-controls {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.drag-handle {
  cursor: grab;
  touch-action: none;
  user-select: none;
  padding: 4px 8px;
  color: #6c757d;
  letter-spacing: -3px;
  font-size: 18px;
}

.cbb-matchup {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.cbb-vs {
  align-self: center;
  font-weight: 600;
  color: #333;
}
.cbb-team-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cbb-team-btn:disabled { cursor: default; opacity: .85; }
.cbb-team-btn:not(:disabled):hover { border-color: #b6d4fe; }
.cbb-team-btn.selected {
  border-color: #0d6efd;
  background: #cfe2ff;
}
.cbb-team-name { overflow-wrap: anywhere; }

/* Hidden future feature container (progress bars / distribution). Kept hidden by default) */
.hidden-feature {
  display: none;
}

/* Mobile: stack the two teams so nothing runs off screen */
@media (max-width: 576px) {
  .cbb-row { gap: 8px; padding: 10px; }
  .cbb-slot { flex-basis: 38px; }
  .cbb-matchup { flex-direction: column; gap: 4px; }
  .cbb-vs { align-self: flex-start; font-size: 12px; padding-left: 8px; }
  .cbb-jersey { width: 56px; height: 56px; }
  .cbb-team-btn { padding: 8px; min-height: 64px; }
  .cbb-row-controls .btn { padding: 6px 10px; }
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Game time/location on the left, preview link centered in the space to the right */
.cbb-info { display: flex; align-items: center; gap: 12px; }
.cbb-info > div:first-child { flex: 0 0 auto; }
.cbb-preview { flex: 1 1 auto; text-align: center; }


/* Right-justify preview link and special note */
.cbb-preview { text-align: right; }
.cbb-note { font-size: .8rem; font-weight: 600; color: #b02a37; }
@media (max-width: 576px) {
  .cbb-info { align-items: flex-start; }
  .cbb-preview { font-size: .8rem; max-width: 45%; }
  .cbb-note { font-size: .7rem; }
}


/* Final-game result colouring for the picked team */
.cbb-team-btn.selected.result-win {
  border-color: #146c43;
  background: #d1e7dd;
}
.cbb-team-btn.selected.result-loss {
  border-color: #b02a37;
  background: #f8d7da;
}
/* Started games the user did not pick: no blue shading or outline */
.cbb-row.locked-row .cbb-team-btn:not(.selected) {
  background: transparent;
  border-color: transparent;
}


/* Group picks: freeze the first (User) column while the table scrolls sideways.
   The table background is set once here; the frozen cells reuse it so they stay
   opaque and match the rest of the table. */
.group-picks-table { --bs-table-bg: #f8f9fa; }
.group-picks-table th:first-child,
.group-picks-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: var(--bs-table-bg);
  border-right: 1px solid #dee2e6;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-picks-table thead th:first-child { z-index: 2; }
