/* ERCOT regional activity: copied from the All view (web/styles.css) so the views match. */
.ercot-activity-card {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 7;
  width: 310px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(12px);
}

.ercot-activity-card[hidden] {
  display: none;
}

.ercot-card__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ercot-activity-card h2,
.ercot-requests-drawer h2 {
  margin: 0;
  font-size: 1.08rem;
}

.ercot-activity-card__metric {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
}

.ercot-activity-card__metric strong {
  font-size: 2.35rem;
  line-height: 1;
}

.ercot-activity-card__metric span {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.3;
}

.ercot-activity-card__mix {
  display: flex;
  gap: 10px;
  margin-bottom: 13px;
  color: #475569;
  font-size: 0.7rem;
}

.ercot-activity-card__mix span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ercot-activity-card__mix i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.ercot-activity-card__mix .is-solar { background: #f59e0b; }
.ercot-activity-card__mix .is-battery { background: #8b5cf6; }
.ercot-activity-card__mix .is-wind { background: #0ea5e9; }

.ercot-activity-card__actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 7px;
  margin-top: 10px;
}

.ercot-card__primary,
.ercot-card__secondary {
  padding: 9px 12px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.ercot-card__primary {
  background: #0f766e;
  color: white;
}

.ercot-card__secondary {
  background: #fffdf8;
  color: #0f766e;
}

.ercot-card__primary:hover,
.ercot-card__secondary:hover {
  filter: brightness(0.96);
}

.ercot-activity-card > p,
.ercot-activity-card__loading {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 0.66rem;
  line-height: 1.35;
}

.ercot-county-badge {
  display: grid;
  min-width: 138px;
  gap: 2px;
  padding: 8px 11px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.ercot-county-badge[hidden] { display: none; }
.ercot-county-badge strong { font-size: 0.72rem; }
.ercot-county-badge span { color: #334155; font-size: 0.72rem; }

.ercot-requests-drawer {
  position: fixed;
  right: 18px;
  top: 18px;
  bottom: 18px;
  z-index: 12;
  display: flex;
  width: min(500px, calc(100vw - 400px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(14px);
}

.ercot-requests-drawer__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 12px;
}

.ercot-requests-drawer__head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.76rem;
}

.ercot-requests-drawer__close {
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 1.6rem;
}

.ercot-requests-drawer__filters {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ercot-requests-drawer__filters button {
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
}

.ercot-requests-drawer__filters button.is-active {
  background: #ecfdf5;
  color: #0f766e;
}

.ercot-requests-drawer__rows {
  overflow-y: auto;
  padding: 4px 10px 12px;
}

.ercot-request-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 74px;
  gap: 8px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ercot-request-row__main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ercot-request-row__main strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ercot-request-row small {
  display: block;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
}

.ercot-request-row__mw {
  font-size: 0.7rem;
  font-weight: 700;
  text-align: right;
}

.ercot-tech {
  padding: 4px 5px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
}

.ercot-tech--solar { background: #fef3c7; color: #92400e; }
.ercot-tech--battery { background: #ede9fe; color: #6d28d9; }
.ercot-tech--wind { background: #e0f2fe; color: #0369a1; }

.ercot-requests-drawer__note {
  margin: 0;
  padding: 10px 16px 13px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #64748b;
  font-size: 0.64rem;
  line-height: 1.4;
}

/* Public-view placement: clear of the zoom buttons. */
.ercot-activity-card { right: 56px; top: 12px; color: #0f172a; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.ercot-requests-drawer { color: #0f172a; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; z-index: 20; }
@media (max-width: 900px) {
  .ercot-activity-card { left: 12px; right: 12px; top: 12px; width: auto; }
  .ercot-requests-drawer { left: 10px; right: 10px; top: 10px; bottom: 10px; width: auto; }
}

/* Keep text dark on the light ERCOT card and list, even when the page is in dark mode. */
.ercot-activity-card, .ercot-activity-card h2, .ercot-activity-card strong,
.ercot-requests-drawer, .ercot-requests-drawer h2, .ercot-requests-drawer strong,
.ercot-request-row__mw, .ercot-county-badge, .ercot-county-badge strong { color: #0f172a; }
.ercot-request-row small, .ercot-requests-drawer__head p, .ercot-requests-drawer__note, .ercot-activity-card > p { color: #334155; }
