body {
  font-family: system-ui, sans-serif;
}

button {
  transition: background-color 0.2s ease;
}

/* ---------- Tabs ---------- */

.tab-link {
  padding: 0.75rem 1rem;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  color: #4b5563; /* gray-600 */
}

.tab-link:hover {
  color: #111827; /* gray-900 */
}

.tab-link-active {
  border-bottom-color: #2563eb; /* blue-600 */
  color: #111827;
}

/* ---------- Teams & Picks layout ---------- */

/* Each team row card - compressed design */
.team-slot {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
  border-radius: 0.375rem;
}

/* Compact read-only variant for league draft view */
.team-slot.readonly {
  padding: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Full-width layout for league draft view */
#leagueDraftView {
  width: 100%;
  max-width: 100%;
}

#leagueTeamBoard,
#leagueDeltaBoard,
#leagueConsensusBoard {
  width: 100%;
  max-width: 100%;
}

/* Sticky delta column on scroll (now on the right) */
.sticky-column {
  position: sticky;
  right: 0;
  z-index: 5;
  background: white;
}

/* Ensure all three column containers are flex columns */
#leagueTeamBoard,
#leagueDeltaBoard,
#leagueConsensusBoard {
  display: flex;
  flex-direction: column;
}

/* Ensure pick numbers stay aligned and rows have consistent height */
#leagueTeamBoard .team-slot,
#leagueDeltaBoard .team-slot,
#leagueConsensusBoard .team-slot {
  min-height: 60px;
  display: flex;
  align-items: stretch;
  margin: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Grid container ensures columns align */
#leagueDraftGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: 1rem;
  align-items: start;
}

/* Each column wrapper should stretch */
#leagueDraftGrid > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#leagueTeamBoard .team-slot-inner,
#leagueConsensusBoard .team-slot-inner {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 60px;
  height: 100%;
}

/* Delta column specific - ensure it matches height exactly */
#leagueDeltaBoard .team-slot {
  height: 100%;
}

/* Ensure pick numbers stay aligned */
#leagueTeamBoard .team-left,
#leagueConsensusBoard .team-left {
  min-width: 80px;
  flex-shrink: 0;
}

.team-slot:hover {
  background: #f9fafb;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

/* Inner layout: left = pick/team, right = player + trade toggle */
.team-slot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Left side = logo + pick/team text */
.team-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 0;
}

.team-logo {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  filter: contrast(1.1) brightness(0.95);
}

.team-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pick-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.pick-number {
  font-weight: 600;
  color: #6b7280;
}

.pick-separator {
  color: #9ca3af;
}

.team-name {
  font-weight: 600;
  color: #111827;
}

/* Right side = player slot + trade toggle */
.team-right-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
}

.team-player-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 32px;
  min-width: 0;
}

/* Full-width player area for read-only league view */
#leagueTeamBoard .team-player-area {
  justify-content: flex-start;
  flex: 1 1 auto;
}

/* Empty state text - only show on hover or when empty */
.player-drop-zone:empty {
  position: relative;
}

.player-drop-zone:empty::before {
  content: "+ Drop Player";
  font-size: 0.75rem;
  color: #9ca3af;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.team-slot:hover .player-drop-zone:empty::before,
.player-drop-zone:empty:focus-within::before {
  opacity: 1;
}

/* Trade toggle button - pill style */
.trade-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: 1.5px solid #d1d5db;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.trade-toggle:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.trade-toggle.active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.trade-icon {
  width: 14px;
  height: 14px;
}

/* Filled player inside a team slot - compressed design */
.team-slot-player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

/* Trade toggle styling - removed old checkbox styles */

/* Trade chip - small pill with icon */
.trade-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  color: #92400e;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 4px;
  cursor: help;
}

.trade-chip-icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.trade-chip-text {
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-tooltip {
  position: fixed;
  background: #1f2937;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.trade-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
}

/* Dopamine hit animations */
@keyframes pickFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.0);
    transform: scale(1);
  }
  20% {
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.25);
  }
  60% {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.10);
    transform: scale(1.01);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.0);
    transform: scale(1);
  }
}

.pick-just-filled {
  animation: pickFlash 450ms ease-out;
}

@keyframes logoPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.logo-pop {
  animation: logoPop 300ms ease-out;
}

/* Highlight next empty pick on drag */
.team-slot.drag-target {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}

/* ---------- Sticky Players Preview ---------- */
.players-panel {
  position: sticky;
  top: 16px;                         /* distance from top when sticking */
  align-self: start;                 /* important inside CSS grid */
  max-height: calc(100vh - 32px);    /* keeps it within the viewport */
  overflow: hidden;                  /* lets inner list handle scrolling */
}

/* Player cards - upgraded styling */
.player-card {
  transition: all 0.2s ease;
  cursor: grab;
}

.player-card:active {
  cursor: grabbing;
}

.player-card.drafted {
  opacity: 0.4;
  pointer-events: none;
}

/* Active pick highlight */
.team-slot.active-pick {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}

/* Draft confidence color coding */
.team-slot.confidence-aligned {
  border-left: 2px solid #10b981;
}

.team-slot.confidence-reach {
  border-left: 2px solid #f59e0b;
}

.team-slot.confidence-bold {
  border-left: 2px solid #ef4444;
}

/* ---------- Profile Section ---------- */
#profileSection {
  background-color: #f8f9fa;
  padding: 2rem 1rem;
  border-radius: 0.5rem;
}

/* Toast animations */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}


