.power-ratings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.power-ratings-table th, .power-ratings-table td {
  border: 1px solid #ddd;
  padding: 6px;
  text-align: center;
}

.power-ratings-table th {
  background: #111;
  color: #fff;
  table-layout: fixed;
  width: auto;
}
.team-header {
  white-space: nowrap;
}

.info-icon {
  font-size: 0.75em;
  margin-left: 6px;
  cursor: help;
  opacity: 0.7;
}

.info-icon:hover {
  opacity: 1;
}
.info-popover {
  display: none;
  position: absolute;
  background: #111;
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  max-width: 220px;
  z-index: 10;
}

.info-popover.show {
  display: block;
}
.table-container {
  max-height: 720px; /* ~25 rows + header */
  overflow-y: auto;
  margin-bottom: 32px; /* spacing before charts */
}


.table-toggle:hover {
  text-decoration: underline;
}

.power-up { color: #1fa21f; font-weight: bold; }
.power-down { color: #d01818; font-weight: bold; }

.power-filters {
  text-align: center;
  margin: 20px;
  font-size: 14px;
}
.power-ap-rank {
  display: inline-flex;   /* key fix */
  align-items: center;
  justify-content: center;

  font-size: 0.7em;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  color: #fff;
  line-height: 1;

  margin-left: 4px;
}

/* Podium */
.power-ap-gold {
  background-color: #d4af37;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
}

.power-ap-silver {
  background-color: #c0c0c0;
  color: #111;
}

.power-ap-bronze {
  background-color: #cd7f32;
}

/* Everyone else */
.power-ap-standard {
  background-color: #2a6edb;
}

.table-container {
  max-width: 1000px;   /* sweet spot for 8–12 columns */
  margin: 0 auto;     /* center on page */
  padding: 0 16px;    /* mobile breathing room */
}
.power-ratings-table td.power-team-cell {
  text-align: left !important;
}

.power-page-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}
.power-page-title {
  text-align: center;
  margin-bottom: 12px;
}

.power-team-cell {
  text-align: left;

}
.power-ratings-table .team-name {
  flex: 0 0 auto;   /* overrides flex-grow: 1 */
}
.team-cell-content {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  margin-left: 0;
  justify-content: flex-start;   /* must be this */

}

.team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.delta {
  font-weight: 600;
  text-align: right;
  width: 70px;
}

.delta.up {
  color: #16a34a; /* green */
}

.delta.down {
  color: #dc2626; /* red */
}

.delta.neutral {
  color: #000000; /* black */
}


/*Sorting */
th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th.sorted-asc::after {
  content: " ▲";
  font-size: 0.7em;
  opacity: 0.6;
}

th.sorted-desc::after {
  content: " ▼";
  font-size: 0.7em;
  opacity: 0.6;
}
th[data-sort] {
  user-select: none;
}
