/**
 * Team Recruiting Rankings — On3/Rivals industry-team layout.
 * Builds on the shared .ob-cc design system (ob-commitments.css). Defines the
 * rankings grid (# | Team | Commits | 5★ | 4★ | 3★ | Avg | Points) and the
 * .ob-tr__* team-cell bits. Mobile-first: compact two-line card under 760px.
 */

/* # | Team | 5★ | 4★ | 3★ | Total | Avg | Score (On3 column order) */
.ob-cc__row--rankings {
  grid-template-columns:
    0.5fr minmax(0, 2.6fr) 0.6fr 0.6fr 0.6fr 0.8fr 0.8fr 0.9fr;
}

/* Numeric columns read centered, like On3's table. */
.ob-cc__col--rank,
.ob-cc__col--commits,
.ob-cc__col--star,
.ob-cc__col--avg,
.ob-cc__col--points {
  text-align: center;
  justify-content: center;
}

.ob-cc__col--rank {
  font-weight: 800;
  color: var(--site-primary-color);
  font-size: 1.05rem;
}

.ob-cc__col--avg,
.ob-cc__col--points {
  font-weight: 700;
  color: #36454f;
  font-variant-numeric: tabular-nums;
}

.ob-cc__col--points {
  color: var(--site-primary-color);
}

/* Team cell — logo chip + name. */
.ob-tr__team {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  text-decoration: none;
  min-width: 0;
}

.ob-tr__logo {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

/* Beat the global `.ob-featured img { width/height:100% }` stretch rule. */
.ob-tr .ob-tr__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ob-tr__teamname {
  font-weight: 800;
  font-size: 1rem;
  color: var(--site-primary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Star-count cells: number + small accent star, dimmed at zero. */
.ob-tr__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #36454f;
}

.ob-tr__stars.is-zero {
  color: var(--text-secondary-color);
  font-weight: 600;
}

.ob-tr__star {
  color: var(--site-primary-color);
  font-size: 0.7em;
}

.ob-tr__stars.is-zero .ob-tr__star {
  color: var(--text-secondary-color);
  opacity: 0.5;
}

.ob-cc__row--head .ob-tr__star {
  color: inherit;
}

/* Texas — highlight the home team. */
.ob-cc__row--rankings.is-texas {
  background-color: var(--ob-highlight-soft);
  box-shadow: inset 3px 0 0 var(--site-primary-color);
}

.ob-cc__source {
  margin-top: var(--spacing-4);
  font-size: 0.85rem;
}

.ob-cc__source a {
  color: var(--site-primary-color);
  font-weight: 600;
  text-decoration: none;
}

.ob-cc__source a:hover {
  text-decoration: underline;
}

/* -----------------------------------------------------------------------
 * Texas spotlight hero (above the rankings table). Mobile-first: identity
 * stacked over a 2-up stat grid; side-by-side from 640px.
 * -------------------------------------------------------------------- */
.ob-tr__hero {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);
  padding: var(--spacing-6);
  margin-bottom: var(--spacing-6);
  border-radius: var(--ob-radius);
  color: #fff;
  background:
    radial-gradient(120% 140% at 0% 0%, #d9670a 0%, var(--site-primary-color) 55%, #9a4600 100%);
  box-shadow: 0 6px 22px rgba(191, 87, 0, 0.28);
}

.ob-tr__hero-id {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  min-width: 0;
}

.ob-tr__hero-logo {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.ob-tr .ob-tr__hero-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ob-tr__hero-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ob-tr__hero-eyebrow {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
}

.ob-tr__hero-class {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ob-tr__hero-link {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  opacity: 0.92;
}

.ob-tr__hero-link:hover {
  text-decoration: underline;
}

.ob-tr__hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-2);
}

.ob-tr__hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--spacing-4);
  border-radius: var(--ob-radius-sm);
  background-color: rgba(255, 255, 255, 0.14);
}

.ob-tr__hero-num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ob-tr__hero-num sup {
  font-size: 0.55em;
  font-weight: 700;
  margin-left: 1px;
}

.ob-tr__hero-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.ob-tr__hero-chips {
  display: flex;
  gap: 6px;
}

.ob-tr__hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ob-tr__hero-chip span {
  font-size: 0.7em;
}

.ob-tr__hero-chip--5 { color: #ffe08a; }
.ob-tr__hero-chip--4 { color: #ffd0b0; }
.ob-tr__hero-chip--3 { color: rgba(255, 255, 255, 0.85); }

@media screen and (min-width: 640px) {
  .ob-tr__hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-8);
    padding: var(--spacing-8);
  }
  .ob-tr__hero-stats {
    grid-template-columns: repeat(4, auto);
    gap: var(--spacing-2);
  }
  .ob-tr__hero-stat {
    min-width: 92px;
  }
}

/* Mobile: rank + team on one line, stats wrap to a compact second line. */
@media screen and (max-width: 760px) {
  .ob-cc__row--rankings {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "rank team"
      "rank stats";
    column-gap: var(--spacing-4);
    row-gap: 4px;
  }
  .ob-cc__row--rankings .ob-cc__col--rank {
    grid-area: rank;
    align-self: center;
    font-size: 1.2rem;
  }
  .ob-cc__row--rankings .ob-cc__col--team {
    grid-area: team;
    align-self: end;
  }
  /* Lay the numeric cells out inline beneath the team name. */
  .ob-cc__row--rankings .ob-cc__col--commits { grid-area: stats; }
  .ob-cc__row--rankings .ob-cc__col--star,
  .ob-cc__row--rankings .ob-cc__col--avg,
  .ob-cc__row--rankings .ob-cc__col--points {
    display: none;
  }
  .ob-cc__row--rankings .ob-cc__col--commits {
    justify-content: flex-start;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary-color);
  }
  .ob-cc__row--rankings .ob-cc__col--commits::before {
    content: "Commits: ";
  }
}
