/* css/standings.css */

.standings-tabs {
  margin: 1em 0;
  display: flex;
  gap: 0.5em;
}

.standings-tab {
  padding: 0.5em 1em;
  border: 1px solid #ccc;
  background: var(--color-off-white-light);
  cursor: pointer;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s ease;
  font-family: "League Spartan", sans-serif;
}

.standings-tab:hover {
  background: var(--color-off-white);
}

.standings-tab.active {
  background: var(--color-white);
  font-weight: bold;
}

/* table base */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: -1px; /* so active tab merges with table */
  font-family: sans-serif;
  font-size: 0.95rem;
  background: var(--color-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.standings-table th,
.standings-table td {
  padding: 0.5em 0.75em;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.standings-table th {
  background: #f0f0f0;
  font-weight: 600;
  font-size: 0.85rem;
}

.standings-table tr:nth-child(even) {
  background: #fafafa;
}

.standings-table tr:hover {
  background: var(--color-off-white-light);
}

.standings-table td strong {
  color: #222;
}

.standings-table td {
  vertical-align: middle; /* centrera innehåll vertikalt i raden */
}

.standings-table .team-cell {
  font-weight: 500;
  white-space: nowrap; /* håll ihop logga + text */
  text-align: left;
}

.standings-table .team-cell img.team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4em;
}

.standings-table .team-cell span {
  display: inline-block;
  vertical-align: middle;
}

/* compact version tweaks */
.standings-table.compact {
  font-size: 0.85rem;
  width: 400px;
}

.standings-table.compact th,
.standings-table.compact td {
  padding: 0.3em 0.4em;
}

.standings-table.compact .team-logo {
  width: 16px;
  height: 16px;
}

/* highlight bakgrund */
.standings-table tr.highlight-playoff {
  background: #e6ffe6; /* ljusgrön */
}
.standings-table tr.highlight-playin {
  background: #fffde6; /* ljusgul */
}
.standings-table tr.highlight-playout {
  background: #ffe6e6; /* ljusröd */
}

/* ev. linjer/streck */
.standings-table tr.highlight-playoff:last-of-type td {
  border-bottom: 2px solid #4caf50; /* grön linje under sista playoff-plats */
}
.standings-table tr.highlight-playin:last-of-type td {
  border-bottom: 2px solid #ff9800; /* orange linje under sista play-in-plats */
}
.standings-table tr.highlight-playout:last-of-type td {
  border-bottom: 2px solid #f44336; /* röd linje under sista play-out-plats */
}

/* season selector */

.standings-controls {
  display: flex;
  align-items: center;
  gap: 1em;
  margin: 1em 0;
}

.standings-controls .season-select {
  padding: 0.4em 0.6em;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "League Spartan", sans-serif;
}
