/* Standings Page — Bloomberg mono treatment */
.standings-page-shell {
  margin-top: 24px;
  margin-bottom: 56px;
  max-width: 1280px;
}

.standings-header-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 26px;
}

/* Back button — flat mono, matches btn-league-back */
.standings-back-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  transition: color 0.12s;
}

.standings-back-btn:hover {
  color: var(--text);
}

/* League identity block — flat, directly on page surface */
.standings-league-details {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 18px 0;
}

.standings-league-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}

.standings-league-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.standings-league-copy h1 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
}

.standings-league-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.standings-meta-separator {
  color: var(--border);
}

/* Content layout */
.standings-ad-banner-section {
  padding-top: 36px;
  padding-bottom: 28px;
}

.standings-ad-banner-section-bottom {
  padding-top: 48px;
  padding-bottom: 8px;
}

.standings-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 78px;
  align-items: stretch;
}

.standings-main-column {
  min-width: 0;
}

.standings-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding-top: 208px;
  padding-bottom: 24px;
  align-items: center;
  align-self: stretch;
}

/* Table container */
.standings-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.standings-group-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.standings-group-header {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 0 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.standings-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  max-width: 100%;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.standings-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.standings-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.standings-row:nth-child(even) {
  background: #f0ede9;
}

html[data-theme="dark"] .standings-row:nth-child(even) {
  background: #131110;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .standings-row:nth-child(even) {
    background: #131110;
  }
}

.standings-row:hover {
  background: var(--hover);
}

html[data-theme="dark"] .standings-row:hover {
  background: var(--hover);
}

/* Rank column */
.col-rank {
  width: 40px;
  text-align: center !important;
  font-weight: 600;
  position: relative;
  color: var(--text-muted);
}

.col-rank.promo-indicator::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.col-rank.relegation-indicator::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #d04040;
}

/* Team Column */
.col-team {
  font-weight: 500;
  color: var(--text);
  width: auto;
}

.team-info-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-logo-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}

.team-name-text {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  display: block;
}

/* Statistics columns */
.col-stat {
  width: 38px;
  text-align: center !important;
  color: var(--text-muted);
}

.standings-table th.col-stat {
  text-align: center !important;
}

.col-pts {
  width: 44px;
  font-weight: 700;
  color: var(--text);
  text-align: center !important;
}

.standings-table th.col-pts {
  text-align: center !important;
}

/* Form indicators — plain mono letters only */
.col-form {
  width: 110px;
}

.form-indicators {
  display: flex;
  gap: 4px;
  align-items: center;
}

.form-dot {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  display: inline;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-win  { color: var(--accent); }
.form-loss { color: var(--text-muted); }
.form-draw { color: var(--text-muted); }

/* Goal diff — luminance only, no color */
.text-green { color: var(--text) !important; font-weight: 600; }
.text-red   { color: var(--text-muted) !important; font-weight: 500; }

.empty-standings-state {
  text-align: center;
  padding: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1100px) {
  .standings-content-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .standings-sidebar { display: none; }
}

@media (max-width: 760px) {
  .standings-page-shell { margin-top: 18px; margin-bottom: 44px; }
  .standings-league-details { padding: 14px 16px; }
  .standings-table th, .standings-table td { padding: 10px 10px; }
  .team-info-cell { gap: 8px; }
  .col-form { width: 90px; }
  .standings-ad-banner-section { padding-top: 24px; padding-bottom: 18px; }
  .standings-page-shell .home-ad-banner-shell { justify-content: flex-start; }
}

/* Abbreviated name: hidden at desktop, shown at mobile via media query below */
.standings-team-abbr { display: none; }

@media (max-width: 768px) {
  /* Full-width fixed layout */
  .standings-table { width: 100%; table-layout: fixed; }
  .standings-table th,
  .standings-table td { font-size: 11px; padding: 8px 4px; text-align: center; }

  /* Column widths */
  .standings-table .col-rank { width: 24px; }
  .standings-table .col-team { width: 64px; text-align: center; }
  .standings-table .col-played,
  .standings-table .col-w,
  .standings-table .col-d,
  .standings-table .col-l,
  .standings-table .col-gd,
  .standings-table .col-pts { width: 28px; }
  .standings-table .col-form { width: 40px; }

  /* Team cell: logo stacked above abbr */
  .team-name-text { display: none; }
  .team-info-cell { gap: 0; justify-content: center; }
  .standings-team-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .standings-team-abbr {
    display: block;
    font-family: monospace;
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #9a9590;
    white-space: nowrap;
  }

  /* Form column — center content, tighten gap */
  .standings-table .col-form { text-align: center; }
  .col-form .form-indicators { justify-content: center; gap: 1px; }
  .col-form .form-dot { font-size: 9px; }
  .form-letter { font-size: 9px; letter-spacing: 0; }
}
