/* Defensive Coverage Chart (team builder and team analysis) */
.defensive-chart-panel {
  padding: 1.25rem;
}

.defensive-chart-scroll {
  overflow-x: auto;
}

.defensive-chart {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 0.85rem;
  text-align: center;
}

.defensive-chart th {
  padding: 0.25rem;
  color: var(--app-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/*
 * The Type column: header centered over the badges like every other
 * column, and only as wide as the badges (width: 1% shrinks it; nowrap
 * stops it from wrapping), so the Pokémon columns share the rest.
 */
.defensive-chart th:first-child {
  width: 1%;
  text-align: center;
  white-space: nowrap;
}

.defensive-chart tbody th .pokemon-type-badge {
  display: inline-block;
  min-width: 5.5rem;
  text-align: center;
}

.defensive-chart-member img {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  object-fit: contain;
}

.defensive-chart-cell {
  min-width: 2.75rem;
  height: 2rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: #f8fafc;
  font-weight: 700;
}

.defensive-chart-cell.is-weak {
  background: rgba(255, 116, 116, 0.28);
}

.defensive-chart-cell.is-very-weak {
  background: rgba(255, 116, 116, 0.6);
}

.defensive-chart-cell.is-resistant {
  background: rgba(82, 199, 122, 0.25);
}

.defensive-chart-cell.is-very-resistant {
  background: rgba(82, 199, 122, 0.5);
}

.defensive-chart-cell.is-immune {
  background: #020814;
  color: var(--app-muted);
}

/* Fixed width so the totals don't take space from the Pokémon columns. */
.defensive-chart-total {
  width: 4.5rem;
}

td.defensive-chart-total {
  color: #f8fafc;
  font-weight: 700;
}

td.defensive-chart-total.is-uncovered {
  color: var(--danger);
}

.defensive-chart-empty {
  margin: 0;
  color: #8398b5;
}
