/* ============================================================
   DISPATCH — solar.css
   Prefix: sol-
   Solar data panels — Plant 1, Plant 2, Combined
   ============================================================ */

/* ── Panel base ───────────────────────────────────────── */
.sol-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 16px;
  position: relative;
  overflow: hidden;
}

/* ── Panel header ─────────────────────────────────────── */
.sol-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.sol-plant-name {
  font-family: var(--font-label);
  font-size: 8px;
  color: var(--orange);
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.sol-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.sol-last-updated {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--mid);
  letter-spacing: 1px;
  text-align: right;
  flex-shrink: 0;
  margin-left: 8px;
  margin-top: 2px;
}

/* ── Stats grid ───────────────────────────────────────── */
.sol-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  flex: 1;
}

.sol-stats.sol-stats-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ── Individual stat ──────────────────────────────────── */
.sol-stat {
  background: var(--cream);
  border: 1.5px solid #e0dbd0;
  padding: 8px 10px;
  position: relative;
  overflow: hidden;
}

.sol-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--orange);
  opacity: 0.4;
}

.sol-stat-value {
  font-family: var(--font-label);
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 3px;
}

.sol-stat-value span {
  font-size: 10px;
  font-weight: 400;
  color: var(--mid);
  margin-left: 2px;
}

.sol-stat-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--mid);
  letter-spacing: 1px;
  line-height: 1.3;
}

/* ── Accent variants ──────────────────────────────────── */
.sol-stat.sol-accent-green::before  { background: #22c55e; opacity: 0.7; }
.sol-stat.sol-accent-blue::before   { background: #3b82f6; opacity: 0.7; }
.sol-stat.sol-accent-orange::before { background: var(--orange); opacity: 0.7; }

.sol-stat.sol-accent-green .sol-stat-value  { color: #16a34a; }
.sol-stat.sol-accent-blue .sol-stat-value   { color: #2563eb; }
.sol-stat.sol-accent-orange .sol-stat-value { color: var(--orange); }

/* ── Divider between sections ─────────────────────────── */
.sol-divider {
  height: 1px;
  background: #e0dbd0;
  margin: 10px 0;
  flex-shrink: 0;
}

/* ── Environmental row ────────────────────────────────── */
.sol-env {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.sol-env-item {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.sol-env-icon {
  font-size: 14px;
  margin-bottom: 2px;
}

.sol-env-value {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 900;
  color: #16a34a;
  line-height: 1;
}

.sol-env-unit {
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--mid);
}

.sol-env-label {
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--mid);
  letter-spacing: 0.5px;
  margin-top: 2px;
  line-height: 1.2;
}

/* ── Loading state ────────────────────────────────────── */
.sol-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
}

.sol-loading-dot {
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  animation: sol-pulse 1.4s ease-in-out infinite;
}

@keyframes sol-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

.sol-loading-text {
  font-family: var(--font-label);
  font-size: 8px;
  color: var(--mid);
  letter-spacing: 2px;
}

/* ── Error state ──────────────────────────────────────── */
.sol-error {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--orange);
  letter-spacing: 1px;
  padding: 16px;
  text-align: center;
}

/* ── Combined panel — full width strip ───────────────── */
.sol-combined-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: var(--border);
}

.sol-combined-item {
  padding: 10px 16px;
  border-right: 1.5px solid #e0dbd0;
  position: relative;
}

.sol-combined-item:last-child {
  border-right: none;
}

.sol-combined-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--orange);
}

.sol-combined-value {
  font-family: var(--font-label);
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 3px;
}

.sol-combined-value span {
  font-size: 9px;
  font-weight: 400;
  color: var(--mid);
}

.sol-combined-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--mid);
  letter-spacing: 1px;
}