/* === League roster listing === */
.section {
  margin-bottom: 24px;
}

.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  background: #21262d;
  object-fit: cover;
}

.team-card-info {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.team-card {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 12px 10px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.team-card:hover {
  background: #1c2128;
  border-color: #58a6ff;
}

/* Team grid: tiles always 50% of the container (minmax(0,1fr) lets a long
   name shrink-and-ellipsis instead of widening the track / forcing scroll). */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.team-grid .team-card {
  margin-bottom: 0;
}

.league-content:has(.team-grid) {
  max-width: 900px;
}

/* Let the name/owner column shrink below its content so ellipsis can apply */
.team-card-info > div {
  min-width: 0;
}

.team-name {
  font-size: 15px;
  font-weight: 500;
  color: #f0f6fc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-owner {
  font-size: 12px;
  color: #8b949e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sleeper-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #58a6ff;
  text-decoration: none;
}

.sleeper-link:hover {
  text-decoration: underline;
}


/* Mobile layout */
@media (max-width: 890px), (pointer: coarse) and (hover: none) {
  .team-avatar {
    margin-right: 4px;
  }
}