/* assets/css/ncaa-standings.css */

/* ==========================
   Page layout
   ========================== */

.page-standings__inner {
  display: block;
}

.standings-panel--full {
  width: 100%;
}

.standings-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-standings__top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-standings__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.standings-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.standings-filter select {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 6px 28px 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--accent-primary);
  color: var(--text-main);
}

@media (max-width: 700px) {
  .page-standings__top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}

/* ==========================
   Conference card sections
   ========================== */

.standings-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.standings-conf-card {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--accent-secondary);
  background: var(--accent-primary);
}

.standings-conf-card__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.standings-conf-card__logo {
  width: auto;
  display: block;
}

.standings-conf-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

/* ==========================
   Card + table shell (desktop/tablet)
   ========================== */

.standings-card {
  border-top: 0;
  background: var(--team-gradient);
}

/* Scroll container */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-scroll,
.standings-card {
  min-width: 0;
}

/* Desktop table */
.standings-table {
  width: 100%;
  font-size: 0.9rem;
  background: var(--accent-primary);
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.standings-table th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.standings-table tbody tr:hover {
  filter: brightness(1.08);
}

.standings-table__headerline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.standings-table__logo {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.standings-table__logo img {
  max-width: unset;
  height: 20px;
  object-fit: contain;
  display: block;
}

.standings-table__team-name {
  font-weight: 800;
  min-width: 0;
}

.standings-table__cell-pts strong {
  font-weight: 900;
}
  .standings-table__row  { 
    background: var(--team-gradient)!important;
  }

/* ==========================
   Rank pill (top-right on mobile cards)
   ========================== */

.standings-rankpill {
  display: none;              /* hidden on desktop by default */
  margin-left: auto;          /* pushes it to the far right */
  align-self: flex-start;

  padding: 5px 8px;
  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;

  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* ==========================
   MOBILE: rankings-style cards
   ========================== */

@media (max-width: 700px) {
  .standings-conf-card {
    border: 0;
    background: unset;
  }

  .standings-conf-card__header {
    border: 1px solid var(--accent-secondary);
    border-radius: 6px;
    background: var(--accent-primary);
  }

  .standings-card {
    background: unset;
    border: 0;
  }

  .table-scroll {
    overflow: visible;
  }

  .standings-table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    background: unset;
  }

  .standings-table thead {
    display: none;
  }

  /*
    Each TR becomes a card:
    - header spans full width
    - chips auto-flow below
  */
  .standings-table tbody tr {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;

    margin-top: 10px;
    padding: 12px;

    border: 1px solid var(--accent-secondary);
    border-radius: 6px;
    background: var(--team-gradient);
  }

  /* Remove default borders/padding for card mode */
  .standings-table td {
    border-bottom: 0;
    padding: 0;
    white-space: normal;
  }

  /* Header cell spans full width */
  .standings-table__cell-header {
    grid-column: 1 / -1;
  }

  .standings-table__headerline {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .standings-table__logo {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .standings-table__logo img {
    height: 24px;
  }

  .standings-table__team-name {
    font-weight: 800;
    font-size: 1.02rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  /* Show the rank pill in mobile card mode */
  .standings-rankpill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Chips */
  .standings-table__cell {
    display: flex;
    flex-direction: column;
    gap: 2px;

    padding: 8px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);

    text-align: center;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
  }

  /* Labels for chips */
  .standings-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.95;
    font-weight: 700;
  }

  .standings-table__cell-pts {
    font-weight: 900;
  }
}

.standings-note {
  opacity: 0.8;
  font-size: 12px;
  margin-top: 14px;
}
