/* key-players.css — horizontally scrollable "Key Players" row above game cards */

/* Section container */
.kp-section {
  position: relative;
  z-index: 1;
  padding: 0.75rem 0 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  margin-bottom: 0.25rem;
}

.kp-heading {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.50);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}

/* Horizontal scroll wrapper */
.kp-scroll-wrap {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0 0.5rem 0.5rem;
  /* Hide scrollbar for a cleaner look */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.kp-scroll-wrap::-webkit-scrollbar {
  display: none;
}

/* Individual player card */
.kp-card {
  flex: 0 0 auto;
  width: 170px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kp-card:hover {
  background: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.06);
  border-color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.20);
}

/* Player header: headshot + name/meta */
.kp-player-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Headshot */
.kp-headshot {
  width: 40px;
  height: 40px;
  overflow: visible;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.kp-headshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kp-headshot-fallback {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.7);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Team badge (small logo overlapping headshot bottom-right) */
.kp-team-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  overflow: hidden;
  background: transparent;
  border: none;
}

.kp-team-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Player name & meta */
.kp-player-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kp-player-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--theme-text-primary, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.kp-player-meta {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.40);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Stat lines */
.kp-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
}

.kp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 1px;
}

.kp-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.90);
  line-height: 1.2;
}

.kp-stat-val.kp-stat-missing {
  color: rgba(255, 255, 255, 0.20);
  font-size: 0.7rem;
}

.kp-stat-label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .kp-card {
    transition: none;
  }
}

/* Mobile: scaled up cards */
@media (max-width: 1000px) {
  .kp-section {
    padding: 1.2rem 0 0.9rem;
  }

  .kp-heading {
    font-size: 1.35rem;
    padding: 0 0.65rem;
    margin-bottom: 0.65rem;
  }

  .kp-scroll-wrap {
    gap: 1rem;
    padding: 0 0.65rem 0.65rem;
  }

  .kp-card {
    width: 292px;
    padding: 1.2rem;
    gap: 0.85rem;
    border-radius: 1rem;
  }

  .kp-player-header {
    gap: 0.65rem;
  }

  .kp-headshot {
    width: 68px;
    height: 68px;
  }

  .kp-team-badge {
    width: 30px;
    height: 30px;
    bottom: -3px;
    right: -3px;
  }

  .kp-player-name {
    font-size: 1.3rem;
  }

  .kp-player-meta {
    font-size: 1rem;
  }

  .kp-stats {
    gap: 0.5rem;
  }

  .kp-stat {
    gap: 4px;
  }

  .kp-stat-val {
    font-size: 1.35rem;
  }

  .kp-stat-val.kp-stat-missing {
    font-size: 1.1rem;
  }

  .kp-stat-label {
    font-size: 0.95rem;
  }
}
