/**
 * Dow Julio Component Library
 * 
 * Reusable styled components following the retro Miami Dolphins aesthetic
 * 
 * USAGE:
 * 1. Import design-tokens.css first
 * 2. Import this file
 * 3. Apply classes to your React elements
 * 
 * CODENOTE: These are CSS classes, not React components
 * Use className="component-name" in your JSX
 * 
 * UPDATED: Added animations, enhanced progress bars, display/mono typography integration
 * UPDATED: Dec 2024 - Added Standings and Players page styles
 */

/* ============================================
   PAGE CONTAINERS - Full Background Styling
   ============================================ */

/* CODENOTE: All page containers use full viewport background
   - Background color: --bg-page (light cerulean #ecf5f9)
   - Fills entire viewport with min-height: 100vh
   - Zero padding/margin = edge-to-edge content (matching TeamDetail)
   - Headers extend to top of screen (into safe area on iOS) */

.standings-page,
.players-page,
.league-settings-page,
.settings-page,
.trade-page,
.demo-page,
.team-detail {
  min-height: 100vh;
  background: var(--bg-page);
  padding: 0;
  margin: 0;
}

/* ============================================
   ANIMATION KEYFRAMES
   ============================================ */

/* CODENOTE: Progress bar shine effect - sweeps across filled portion */
@keyframes progressShine {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}

/* CODENOTE: Checkbox/selection pop effect */
@keyframes selectionPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* CODENOTE: Card selection highlight pulse */
@keyframes selectionPulse {
  0% {
    box-shadow: 0 0 0 0 var(--color-action-primary);
  }
  70% {
    box-shadow: 0 0 0 6px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* CODENOTE: Fade in for modals, overlays */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* CODENOTE: Slide up for modals, bottom sheets */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CODENOTE: Number count up effect (for scores) */
@keyframes countPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* CODENOTE: Subtle bounce for CTAs */
@keyframes subtleBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-default);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: all var(--transition-default);
  border: none;
  text-align: center;
}

/* CODENOTE: Display font button - use for primary CTAs */
.btn-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-base) var(--space-xl);
  border-radius: var(--border-radius-md);
  font-family: var(--font-display);
  font-size: var(--font-size-display-md);
  letter-spacing: var(--letter-spacing-display);
  cursor: pointer;
  transition: all var(--transition-default);
  border: var(--border-width-thick) solid transparent;
  text-align: center;
}

.btn-display-primary {
  background: linear-gradient(
    135deg,
    var(--color-action-primary),
    var(--color-action-light)
  );
  color: var(--color-white);
  border-color: var(--color-action-primary);
  box-shadow: var(--shadow-action);
}

.btn-display-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240, 124, 15, 0.3);
}

.btn-display-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--color-action-primary);
  color: var(--color-white);
  border: var(--border-width-thick) solid var(--color-action-primary);
}

.btn-primary:hover {
  background: var(--color-action-dark);
  border-color: var(--color-action-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-action);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-action-primary);
  border: var(--border-width-thick) solid var(--color-action-primary);
}

.btn-secondary:hover {
  background: var(--color-action-primary);
  color: var(--color-white);
}

.btn-aqua {
  background: var(--scrim-white-medium);
  color: var(--color-white);
  border: var(--border-width-thick) solid var(--border-accent-header);
}

.btn-aqua:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--border-accent-header);
}

.btn-danger {
  background: var(--color-danger-primary);
  color: var(--color-white);
  border: var(--border-width-thick) solid var(--color-danger-primary);
}

.btn-icon {
  background: none;
  border: none;
  color: inherit;
  padding: var(--space-sm);
  cursor: pointer;
}

/* Mobile-only hamburger menu button - hidden on desktop (lg: 1024px+) */
.btn-icon-mobile {
  background: none;
  border: none;
  color: inherit;
  padding: var(--space-sm);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .btn-icon-mobile {
    display: none;
  }
}

/* ============================================
   CARDS
   ============================================ */

/* Basic card */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius-default);
  padding: var(--space-base);
  box-shadow: var(--shadow-default);
  border: var(--border-width-medium) solid var(--border-default);
}

/* Retro thick-border card */
.card-retro {
  background: var(--bg-card);
  border-radius: var(--border-radius-default);
  padding: var(--space-base);
  border: 3px solid var(--border-accent-body);
  box-shadow: var(--shadow-default);
}

/* Player card (with left accent) */
.card-player {
  background: var(--bg-card);
  border-radius: var(--border-radius-default);
  padding: var(--space-base);
  border: var(--border-width-medium) solid var(--border-default);
  border-left: var(--border-width-thickest) solid var(--border-aqua);
  box-shadow: var(--shadow-default);
  transition: all var(--transition-default);
}

.card-player:active {
  transform: scale(0.98);
}

/* CODENOTE: Selected state with animation */
.card-player.selected {
  background: var(--bg-highlight);
  border-color: var(--border-action);
  border-left-color: var(--border-action);
  animation: selectionPulse 0.4s ease-out;
}

.card-player.featured {
  border: var(--border-width-thick) solid var(--border-action);
  box-shadow: var(--shadow-action);
}

/* Scoreboard card */
.card-scoreboard {
  background: var(--color-structure-deepest);
  color: var(--text-inverse);
  border-radius: var(--border-radius-default);
  padding: var(--space-base);
  border: var(--border-width-thick) solid var(--border-aqua);
}

/* ============================================
   HEADERS - With Display Font
   ============================================ */

.header-page {
  background: var(--color-structure-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-border);
}

.header-section {
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-black);
  margin-bottom: var(--space-base);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  padding-bottom: var(--space-sm);
  border-bottom: var(--border-width-medium) solid var(--border-action);
}

/* CODENOTE: Display font header - use for page titles, section headers */
.header-display {
  font-family: var(--font-display);
  font-size: var(--font-size-display-lg);
  letter-spacing: var(--letter-spacing-display-wide);
  line-height: var(--line-height-none);
  text-transform: uppercase;
  margin: 0;
}

.header-display-sm {
  font-family: var(--font-display);
  font-size: var(--font-size-display-sm);
  letter-spacing: var(--letter-spacing-display);
  line-height: var(--line-height-none);
  text-transform: uppercase;
  margin: 0;
}

.header-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-black);
  margin: 0;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
}

/* ============================================
   TABS
   ============================================ */

.tabs {
  display: flex;
}

.tab {
  flex: 1;
  padding: var(--space-base) var(--space-sm);
  background: transparent;
  color: var(--text-inverse);
  border: none;
  border-right: var(--border-width-default) solid var(--scrim-white-medium);
  cursor: pointer;
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  font-size: var(--font-size-base);
  letter-spacing: var(--letter-spacing-wide);
  transition: all var(--transition-default);
  position: relative;
}

.tab:last-child {
  border-right: none;
}

.tab.active {
  background: var(--color-action-primary);
  color: var(--color-white);
}

.tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--border-width-thick);
  background: transparent;
}

/* ============================================
   SCORES & NUMBERS - With Mono Font
   ============================================ */

/* CODENOTE: All numerical displays should use mono font for finance feel */

/* Large scoreboard number */
.score-large {
  font-family: var(--font-mono);
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-none);
}

/* Medium score (player points) */
.score-medium {
  font-family: var(--font-mono);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-none);
}

/* Small score (averages) */
.score-small {
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
}

/* Score display box */
.score-box {
  background: var(--color-structure-deepest);
  color: var(--text-inverse);
  padding: var(--space-md) var(--space-base);
  border-radius: var(--border-radius-default);
  border: var(--border-width-thick) solid var(--border-action);
  text-align: center;
}

.score-box-winning {
  border-color: var(--color-highlight-cream);
}

.score-box-winning .score-large,
.score-box-winning .score-medium {
  color: var(--color-highlight-cream);
}

/* ============================================
   BADGES & LABELS
   ============================================ */

.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
}

.badge-position {
  background: var(--color-accent-aqua);
  color: var(--text-inverse);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-normal);
  font-weight: var(--font-weight-bold);
}

.badge-status {
  background: var(--color-structure-bg);
  color: var(--text-primary);
  border: var(--border-width-default) solid var(--border-default);
  text-transform: uppercase;
  font-weight: var(--font-weight-bold);
}

.badge-featured {
  background: var(--color-danger-primary);
  color: var(--text-inverse);
  text-transform: uppercase;
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-normal);
  padding: var(--space-xs) var(--space-md);
}

/* ============================================
   PROGRESS BARS - Enhanced with Animations
   ============================================ */

.progress-container {
  background: var(--bg-card);
  border-radius: var(--border-radius-default);
  padding: var(--space-lg);
  border: var(--border-width-thick) solid var(--border-aqua);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-base);
}

.progress-label {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

/* CODENOTE: Progress value uses mono font */
.progress-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-tight);
}

/* Retro thick progress bar */
.progress-bar {
  background: var(--color-structure-bg);
  border-radius: var(--border-radius-full);
  height: 24px;
  overflow: hidden;
  border: var(--border-width-medium) solid var(--color-structure-deepest);
  position: relative;
  margin-bottom: var(--space-sm);
}

/* CODENOTE: Compact progress bar for tight spaces */
.progress-bar-compact {
  background: var(--color-structure-deep);
  border-radius: var(--border-radius-full);
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--color-structure-primary);
  position: relative;
}

.progress-fill {
  height: 100%;
  transition: width var(--animation-duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--border-radius-full);
  border-right: var(--border-width-medium) solid var(--color-structure-deepest);
  position: relative;
  overflow: hidden;
}

/* CODENOTE: Animated shine effect on progress bars */
.progress-fill-animated {
  height: 100%;
  transition: width var(--animation-duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--border-radius-full);
  position: relative;
  overflow: hidden;
}

.progress-fill-animated::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--scrim-white-bold),
    transparent
  );
  animation: progressShine var(--animation-progress-shine);
}

.progress-fill-success,
.progress-fill-animated.success {
  background: linear-gradient(
    90deg,
    var(--color-action-primary),
    var(--color-action-light)
  );
}

.progress-fill-warning,
.progress-fill-animated.warning {
  background: linear-gradient(
    90deg,
    var(--color-action-light),
    var(--color-action-lighter)
  );
}

.progress-fill-danger,
.progress-fill-animated.danger {
  background: linear-gradient(
    90deg,
    var(--color-danger-primary),
    var(--color-danger-light)
  );
}

/* CODENOTE: Aqua variant for years/secondary metrics */
.progress-fill-aqua,
.progress-fill-animated.aqua {
  background: linear-gradient(
    90deg,
    var(--color-accent-aqua),
    var(--color-accent-aqua-light)
  );
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: var(--font-weight-semibold);
}

/* ============================================
   STAT CARDS - With Mono Numbers
   ============================================ */

/* Small stat display (3-column grid) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-base);
}

.stat-card {
  background: var(--color-structure-deepest);
  color: var(--text-inverse);
  border-radius: var(--border-radius-default);
  padding: var(--space-md);
  text-align: center;
  border: var(--border-width-medium) solid var(--border-aqua);
}

.stat-label {
  font-size: var(--font-size-xs);
  opacity: 0.8;
  margin-bottom: var(--space-xs);
  letter-spacing: var(--letter-spacing-normal);
  text-transform: uppercase;
}

/* CODENOTE: Stat values use mono font */
.stat-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-none);
}

/* ============================================
   ALERTS & BANNERS
   ============================================ */

.alert {
  border-radius: var(--border-radius-default);
  padding: var(--space-base);
  margin-bottom: var(--space-base);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  animation: slideUp var(--animation-fade);
}

.alert-info {
  background: var(--color-accent-aqua-bg);
  border: var(--border-width-default) solid var(--color-accent-aqua);
  color: var(--color-accent-aqua-dark);
}

.alert-warning {
  background: var(--color-action-bg);
  border: var(--border-width-default) solid var(--color-action-light);
  color: var(--color-action-darkest);
}

.alert-danger {
  background: var(--color-danger-bg);
  border: var(--border-width-default) solid var(--color-danger-primary);
  color: var(--color-danger-dark);
}

/* ============================================
   MATCHUP COMPONENTS - With Display/Mono Fonts
   ============================================ */

/* Scorebug (main matchup display) */
.scorebug {
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-inverse);
  border-radius: var(--border-radius-default);
  padding: var(--space-xl) var(--space-base);
  margin-bottom: var(--space-xl);
  border: var(--border-width-thick) solid var(--scrim-white-strong);
}

/* CODENOTE: Scorebug header uses display font */
.scorebug-header {
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--font-size-display-sm);
  letter-spacing: var(--letter-spacing-display);
  opacity: 0.9;
  margin-bottom: var(--space-base);
  text-transform: uppercase;
}

.scorebug-scores {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-base);
}

.scorebug-team {
  flex: 1;
  text-align: center;
}

.scorebug-team-label {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-sm);
  opacity: 0.8;
}

/* CODENOTE: VS divider uses display font */
.scorebug-divider {
  font-family: var(--font-display);
  font-size: var(--font-size-display-xl);
  color: var(--color-action-primary);
  padding: 0 var(--space-sm);
}

.scorebug-footer {
  margin-top: var(--space-base);
  padding-top: var(--space-base);
  border-top: 2px solid var(--scrim-white-strong);
  text-align: center;
}

/* CODENOTE: Differential uses mono font */
.scorebug-differential {
  font-family: var(--font-mono);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
}

.scorebug-differential-label {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  margin-top: var(--space-xs);
  letter-spacing: var(--letter-spacing-normal);
}

/* ============================================
   CONTRACT COMPONENTS - With Mono Numbers
   ============================================ */

/* Split contract display (salary + years) */
.contract-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.contract-box {
  padding: var(--space-base);
  border-radius: var(--border-radius-default);
  text-align: center;
}

.contract-box-salary {
  background: var(--color-structure-deepest);
  border: var(--border-width-medium) solid var(--border-action);
}

.contract-box-salary .contract-label {
  font-size: var(--font-size-xs);
  color: var(--color-accent-aqua-light);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

/* CODENOTE: Contract values use mono font */
.contract-box-salary .contract-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  color: var(--text-inverse);
  line-height: var(--line-height-none);
}

.contract-box-years {
  background: var(--color-highlight-cream);
  border: var(--border-width-medium) solid var(--border-action);
}

.contract-box-years .contract-label {
  font-size: var(--font-size-xs);
  color: var(--color-action-dark);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

.contract-box-years .contract-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  color: var(--color-action-darkest);
  line-height: var(--line-height-none);
}

/* ============================================
   CHECKBOX/SELECTION COMPONENTS
   ============================================ */

/* CODENOTE: Custom checkbox with animation */
.checkbox-custom {
  width: 20px;
  height: 20px;
  border: var(--border-width-medium) solid var(--border-medium);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-custom.checked {
  background: var(--color-action-primary);
  border-color: var(--color-action-primary);
}

.checkbox-custom .checkmark {
  width: 12px;
  height: 12px;
  color: var(--color-white);
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--animation-pop);
}

.checkbox-custom.checked .checkmark {
  opacity: 1;
  transform: scale(1);
  animation: selectionPop var(--animation-pop);
}

/* ============================================
   MODAL BASE STYLES
   ============================================
   Canonical modal system. Consumed by Players bulk-edit modal
   (js/components/pages/Players.js:1465-1509) and reusable for any
   future generic modal. Namespaced modals (auth-modal-*, player-modal-*,
   roster-management-modal-*, score-override-modal-*) have their own
   styles and do not depend on this block.
   PR 1/8 (2026-05-15): consolidated. The legacy .modal-backdrop /
   .modal-container / .modal-close-button system (no JS consumers) was
   deleted because it duplicated .modal-header and .modal-footer selectors
   here, causing cascade-fight bugs. */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim-black-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop, 90);
  padding: var(--space-base);
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--border-accent-body);
  overflow: hidden;
}

.modal-header {
  padding: var(--space-lg);
  background: var(--color-structure-primary);
  color: var(--text-inverse);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--font-size-display-sm);
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  margin: 0;
}

.modal-subtitle {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  margin-top: var(--space-xs);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-md) var(--space-lg);
  background: var(--color-structure-bg);
  border-top: 2px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
  .stat-grid {
    gap: var(--space-sm);
  }

  .stat-card {
    padding: var(--space-sm);
  }

  .stat-value {
    font-size: var(--font-size-xl);
  }

  .score-large {
    font-size: var(--font-size-4xl);
  }

  .btn {
    padding: var(--space-sm) var(--space-base);
    font-size: var(--font-size-sm);
  }

  .btn-display {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-display-sm);
  }

  .header-display {
    font-size: var(--font-size-display-md);
  }
}

/* ============================================
   MISSING UTILITY CLASSES
   ============================================ */

/* Settings Header Components */
.settings-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.settings-header-menu-btn {
  background: none;
  border: none;
  padding: var(--space-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  transition: background var(--transition-fast);
}

.settings-header-menu-btn:hover {
  background: var(--scrim-white-soft);
  border-radius: var(--border-radius-sm);
}

.settings-header-back-btn {
  background: none;
  border: none;
  padding: var(--space-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  transition: background var(--transition-fast);
}

.settings-header-back-btn:hover {
  background: var(--scrim-white-soft);
  border-radius: var(--border-radius-sm);
}

.settings-header-title {
  font-family: var(--font-display);
  font-size: var(--font-size-display-md);
  letter-spacing: var(--letter-spacing-display);
  color: var(--text-inverse);
  flex: 1;
}

/* Spinner Loading Component */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-default);
  border-top-color: var(--color-action-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scoring Settings - Additional Layout Classes */
.scoring-settings-presets-grid {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.scoring-settings-stats-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.scoring-settings-brackets-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.scoring-settings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.scoring-settings-loading-content {
  text-align: center;
}

.scoring-settings-spinner-margin {
  margin-bottom: var(--space-base);
}

.scoring-settings-loading-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Score Entry - Additional Layout Classes */
.score-override-matchup-team {
  flex: 1;
}

.score-override-team-home {
  text-align: right;
}

.score-override-team-away {
  text-align: left;
}

.score-override-players-section {
  margin-top: var(--space-sm);
}

.score-override-players-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.score-override-player-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.score-override-modal-buttons {
  display: flex;
  gap: var(--space-base);
}

.score-override-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-override-loading-content {
  text-align: center;
}

.score-override-spinner-margin {
  margin-bottom: var(--space-base);
}

.score-override-loading-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Phase 3: Trade Room, Waivers, Commissioner Tools
   ========================================================================== */

/* Trade Room tabs */
.trade-tabs { display: flex; border-bottom: 2px solid var(--border-default); }
.trade-tab { flex: 1; padding: 12px; text-align: center; cursor: pointer; border: none; background: none; font-weight: 500; color: var(--text-secondary); }
.trade-tab.active { color: var(--color-action-primary); border-bottom: 2px solid var(--color-action-primary); margin-bottom: -2px; }
.trade-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 10px; font-size: 12px; margin-left: 6px; padding: 0 6px; }

/* Status badges */
.status-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
/* PR 8/8: status badge colors migrated from raw hex to semantic tokens.
   Accepted/Executed/Awarded -> success; Rejected/Vetoed/Outbid -> danger;
   Proposed -> info; Pending -> warning; Countered -> action (warm orange,
   matches existing action color family); Expired -> neutral. */
.status-proposed { background: var(--color-info-bg); color: var(--color-info-dark); }
.status-countered { background: var(--color-action-lightest); color: var(--color-action-darkest); }
.status-accepted { background: var(--color-success-bg); color: var(--color-success-text); }
.status-rejected { background: var(--color-danger-bg); color: var(--color-danger-dark); }
.status-executed { background: var(--color-success-bg); color: var(--color-success-text); }
.status-vetoed { background: var(--color-danger-bg); color: var(--color-danger-dark); }
.status-expired { background: var(--color-neutral-bg); color: var(--color-neutral-text); }
.status-pending { background: var(--color-warning-bg); color: var(--color-warning-dark); }
.status-awarded { background: var(--color-success-bg); color: var(--color-success-text); }
.status-outbid { background: var(--color-danger-bg); color: var(--color-danger-dark); }

/* Waiver page */
.waiver-container { padding: 16px; max-width: 1280px; margin: 0 auto; }
.waiver-budget-bar { height: 8px; border-radius: 4px; background: var(--color-structure-bg); overflow: hidden; margin: 8px 0; }
.waiver-budget-fill { height: 100%; border-radius: 4px; background: var(--color-action-primary); transition: width 0.3s; }
.waiver-player-card { padding: 12px; border-bottom: 1px solid var(--border-default); display: flex; align-items: center; gap: 12px; cursor: pointer; }
.waiver-player-card:hover { background: var(--bg-hover); }
.waiver-claim-card { padding: 12px; border: 1px solid var(--border-default); border-radius: 8px; margin-bottom: 8px; }

/* Commissioner tools */
.commissioner-container { padding: 16px; max-width: 1280px; margin: 0 auto; }
.commissioner-card { padding: 16px; border: 1px solid var(--border-default); border-radius: 8px; margin-bottom: 12px; background: var(--bg-card); }
.commissioner-card-header { font-weight: 600; margin-bottom: 8px; }
.commissioner-input-group { margin-bottom: 12px; }
.commissioner-input-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; color: var(--text-secondary); }
.commissioner-input-group input, .commissioner-input-group select { width: 100%; padding: 8px 12px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 14px; }
.commissioner-input-group textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 14px; min-height: 60px; resize: vertical; }

/* Trade proposal cards */
.trade-proposal-card { border: 1px solid var(--border-default); border-radius: 8px; padding: 12px; margin-bottom: 8px; background: var(--bg-card); }
.trade-proposal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.trade-proposal-teams { display: flex; align-items: center; gap: 8px; }
.trade-proposal-actions { display: flex; gap: 8px; }
.trade-proposal-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

