/* California Gas Prices - plain CSS, no framework. */

:root {
  --bg: #0f1419;
  --panel: #1b2129;
  --ink: #e6e9ee;
  --muted: #9aa4b2;
  --accent: #f5a623;
  --low: #2e9e5b;    /* cheaper */
  --high: #d6453d;   /* pricier */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body {
  display: flex;
  flex-direction: column;
}

#topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid #000;
}

#topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.stats {
  display: flex;
  gap: 1.5rem;
  margin: 0;
}

.stats dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.stats dd {
  margin: 0.1rem 0 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
}

#install {
  align-self: center;
  background: var(--accent);
  color: #1b2129;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
#install:hover { filter: brightness(1.05); }

main {
  flex: 1 1 auto;
  min-height: 0;
}

#map {
  width: 100%;
  height: 100%;
}

#footer {
  padding: 0.5rem 1.25rem;
  background: var(--panel);
  border-top: 1px solid #000;
  font-size: 0.8rem;
  color: var(--muted);
}

#footer .sep { margin: 0 0.5rem; opacity: 0.5; }

.noscript {
  padding: 1rem 1.25rem;
  color: var(--muted);
}

/* Price marker bubbles drawn with a Leaflet divIcon. */
.price-pin {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
}

/* Popup contents */
.popup-region { font-weight: 700; font-size: 1rem; }
.popup-price { font-size: 1.5rem; font-weight: 700; margin: 0.2rem 0; }
.popup-meta { color: #555; font-size: 0.8rem; }

/* Legend */
.legend {
  background: var(--panel);
  color: var(--ink);
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  line-height: 1.5;
  font-size: 0.8rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.legend h2 { margin: 0 0 0.4rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.legend .row { display: flex; align-items: center; gap: 0.5rem; }
.legend .swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
