/* MPPT analysis page (mppt.html). Builds on style.css; status colors are
   reserved for alerts and always paired with a text label and a marker
   shape (triangle = critical, dot = warning), never color alone. */

.alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-left-width: 4px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.alert-critical { border-left-color: #d03b3b; }
.alert-warning { border-left-color: #c98500; }
.alert-ok { border-left-color: #1baf7a; }

.alert-badge {
  flex: none;
  min-width: 78px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.alert-critical .alert-badge { color: #b52f2f; }
.alert-warning .alert-badge { color: #8a5b00; }

.alert-body { flex: 1; min-width: 0; }
.alert-title { margin: 0; color: var(--ink-primary); font-weight: 550; }
.alert-detail { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-muted); }

.mppt-overview {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: start;
}

.mppt-overview > * { min-width: 0; }

.worst-table tbody tr.is-clickable,
.string-rank tbody tr.is-clickable { cursor: pointer; }
.string-rank tbody tr.is-clickable:hover th,
.string-rank tbody tr.is-clickable:hover td,
.worst-table tbody tr.is-clickable:hover th,
.worst-table tbody tr.is-clickable:hover td,
.worst-table tbody tr.is-clickable:focus-visible th,
.worst-table tbody tr.is-clickable:focus-visible td {
  background: var(--surface-card-alt);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.day-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.day-nav select {
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--ink-primary);
  max-width: 70vw;
}

.day-nav .range-button:disabled { opacity: 0.35; cursor: default; }

.mppt-day-tiles { grid-template-columns: repeat(4, 1fr); }
.mppt-grid { margin-bottom: 12px; }
.mppt-grid .chart-card + .chart-card { margin-top: 0; }
.tech-tile-value.has-faults { color: #b52f2f; }

.event-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.event-list li { padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.event-list li:last-child { border-bottom: 0; }
.event-list .event-critical { color: #b52f2f; }
.event-list .event-warning { color: #8a5b00; }

.event-time {
  display: inline-block;
  min-width: 96px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.string-flag-critical th,
.string-flag-critical td { color: #b52f2f; }
.string-flag-warning th,
.string-flag-warning td { color: #8a5b00; }

@media (max-width: 900px) {
  .mppt-overview { grid-template-columns: 1fr; }
  .mppt-day-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .alert-item { flex-wrap: wrap; }
  .alert-badge { min-width: 0; }
}

.string-rank th:nth-child(-n+3),
.string-rank td:nth-child(-n+3) { text-align: left; }
