/* Group Standings Styles */

/* Groups Grid */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Group Card */
.group-card {
  background: linear-gradient(135deg,
    rgba(0, 76, 151, 0.03) 0%,
    rgba(198, 12, 48, 0.03) 100%
  );
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Group Header */
.group-header {
  background: linear-gradient(135deg, var(--eagles-blue) 0%, var(--phillies-red) 100%);
  color: white;
  padding: 1rem 1.25rem;
  border-bottom: 3px solid var(--flyers-orange);
}

.group-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.group-progress {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* Standings Table */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.standings-table thead {
  background-color: var(--accent-white);
  border-bottom: 2px solid var(--border-light);
}

.standings-table th {
  padding: 0.75rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.standings-table th:first-child {
  padding-left: 1rem;
}

.standings-table td {
  padding: 0.75rem 0.5rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
}

.standings-table td:first-child {
  padding-left: 1rem;
}

.standings-table tbody tr {
  transition: background-color 0.2s ease;
}

.standings-table tbody tr:hover {
  background-color: rgba(0, 76, 151, 0.03);
}

/* Qualifier Rows (Top 2) */
.standings-table tbody tr.qualifier {
  background: linear-gradient(90deg,
    rgba(0, 76, 151, 0.08),
    rgba(198, 12, 48, 0.08)
  );
  font-weight: 500;
}

.standings-table tbody tr.qualifier:hover {
  background: linear-gradient(90deg,
    rgba(0, 76, 151, 0.12),
    rgba(198, 12, 48, 0.12)
  );
}

.standings-table tbody tr.qualifier td:first-child {
  border-left: 4px solid var(--eagles-blue);
}

/* Qualifier Badge */
.qualifier-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--eagles-blue), var(--phillies-red));
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  margin-left: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Column Widths */
.standings-table .col-rank {
  width: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--eagles-blue);
}

.standings-table .col-player {
  min-width: 140px;
}

.standings-table .col-stat {
  width: 50px;
  text-align: center;
}

.standings-table .col-points {
  width: 60px;
  text-align: center;
  font-weight: 700;
  color: var(--eagles-blue);
}

.standings-table .col-diff {
  width: 60px;
  text-align: center;
  font-weight: 600;
}

/* Positive/Negative Differential */
.diff-positive {
  color: #28A745;
}

.diff-negative {
  color: #DC3545;
}

.diff-zero {
  color: var(--text-muted);
}

/* Record Display */
.record {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
}

/* Mobile Adjustments for Groups */
@media (max-width: 768px) {
  .groups-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .group-name {
    font-size: 1.1rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.85rem;
  }

  .standings-table th:first-child,
  .standings-table td:first-child {
    padding-left: 0.5rem;
  }

  .col-player {
    min-width: 100px;
  }

  /* Hide some columns on very small screens */
  .standings-table .col-tied {
    display: none;
  }
}

@media (max-width: 480px) {
  .standings-table th,
  .standings-table td {
    font-size: 0.75rem;
    padding: 0.4rem 0.2rem;
  }

  .group-header {
    padding: 0.75rem 1rem;
  }

  .group-name {
    font-size: 1rem;
  }

  /* Hide additional columns on tiny screens */
  .standings-table .col-lost {
    display: none;
  }

  .qualifier-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
  }
}

/* Legend */
.standings-legend {
  margin-top: 2rem;
  padding: 1rem;
  background-color: white;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.standings-legend h3 {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.standings-legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.standings-legend li {
  padding: 0.25rem 0;
}

.legend-qualifier {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--eagles-blue), var(--phillies-red));
  border-radius: 2px;
  margin-right: 0.5rem;
}
