/* ============================================================
   IMPACT PLAYERS — Styles
   ============================================================ */

/* --- Live gameweek pulsing dot --- */
.impact-live-dot {
  color: #22c55e;
  animation: impact-pulse 1.5s ease-in-out infinite;
}

@keyframes impact-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.page-impact-players {
  padding-bottom: 4rem;
}

.impact-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 1rem;
}

/* --- Controls layout --- */
.impact-controls {
  margin: 2rem 0 1.5rem 0;
}

.impact-controls-row {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.impact-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

/* --- Custom dropdown --- */
.impact-dd {
  position: relative;
  min-width: 140px;
}

.impact-dd-selected {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  padding-right: 1.8rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  transition: border-color 0.15s ease;
}

.impact-dd-selected::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--muted);
  transition: transform 0.2s ease, border-color 0.15s ease;
}

.impact-dd-selected:hover {
  border-color: #ffffff;
}

.impact-dd-selected:hover::after {
  border-top-color: #ffffff;
}

.impact-dd.open .impact-dd-selected {
  border-color: #ffffff;
}

.impact-dd.open .impact-dd-selected::after {
  border-top-color: #ffffff;
  transform: translateY(-50%) rotate(180deg);
}

.impact-dd-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.impact-dd.open .impact-dd-options {
  display: block;
}

.impact-dd-option {
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--divider);
  transition: background 0.1s ease, color 0.1s ease;
}

.impact-dd-option:last-child {
  border-bottom: none;
}

.impact-dd-option:hover {
  background: #ffffff;
  color: var(--dropdown-bg);
}

.impact-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 0.45rem 0.6rem;
  caret-color: #ffffff;
  min-width: 140px;
}

.impact-input::placeholder {
  color: var(--text-dim);
  opacity: 1;
}

.impact-input:focus {
  border-color: #ffffff;
  outline: none;
}

.impact-scan-info {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

/* --- Filters row --- */
.impact-filters {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.impact-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* --- Submit button --- */
.impact-submit-row {
  margin-bottom: 1.25rem;
}

.impact-submit-btn {
  background: #ffffff;
  color: var(--bg);
  border: 1px solid #ffffff;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 2rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.15s ease;
}

.impact-submit-btn:hover {
  background: transparent;
  color: #ffffff;
}

.impact-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Results count --- */
.impact-results-count {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Card grid --- */
.impact-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.impact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 1.1rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.impact-card:hover {
  background: var(--hover-bg);
}

.impact-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center bottom;
  flex-shrink: 0;
  background: var(--hover-bg);
}

.impact-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.impact-card-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.impact-card-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
  padding-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: none;
}

.impact-card-score {
  display: inline-block;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: none;
}

.impact-card-score-gray {
  background: var(--badge-bg);
}

.impact-card-events {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.impact-card-event {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  flex-shrink: 0;
}

.impact-card-event img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Right-aligned stats --- */
.impact-card-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
}

.impact-card-stats-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.impact-card-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

.impact-card-stat-sep {
  font-size: 1.3rem;
  color: var(--text-dim);
  text-shadow: none;
}

.impact-card-stat-rarity {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

/* --- Game scoreline --- */
.impact-card-game {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.impact-card-team-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.impact-card-game-score {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

.impact-card-game-dash {
  font-size: 0.95rem;
  padding-left: 5px;
  padding-right: 5px;
  color: var(--text-dim);
  text-shadow: none;
}

/* --- Pagination --- */
.impact-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.impact-page-btn {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 1.2rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.impact-page-btn:hover:not(:disabled) {
  border-color: #ffffff;
  background: var(--hover-bg);
}

.impact-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.impact-page-info {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .impact-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .impact-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .impact-filter-group {
    width: 100%;
  }

  .impact-dd,
  .impact-input {
    width: 100%;
    min-width: unset;
  }

  .impact-card-grid {
    grid-template-columns: 1fr;
    width: 95%;
    margin: 0 auto;
  }

  .impact-card {
    padding: 0.75rem 0.65rem;
    gap: 0.5rem;
  }

  .impact-card-avatar {
    width: 34px;
    height: 34px;
  }

  .impact-card-name {
    font-size: 0.9rem;
  }

  .impact-card-score {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  .impact-card-event {
    width: 16px;
    height: 16px;
  }

  .impact-card-team-logo {
    width: 18px;
    height: 18px;
  }

  .impact-card-game-score {
    font-size: 0.8rem;
  }

  .impact-card-game-dash {
    font-size: 0.75rem;
  }

  .impact-card-stat-value {
    font-size: 1rem;
  }

  .impact-card-stat-sep {
    font-size: 1rem;
  }

  .impact-card-stat-rarity {
    font-size: 0.9rem;
  }
}

