/*!
 * glenridge-map companion styles -- tooltip/popup/legend chrome for the
 * elements glenridge-map.js creates. Optional: a consumer page is free to
 * skip this and style .grm-* classes itself to match its own design
 * language instead.
 *
 * Every color and the font are CSS custom properties with sensible
 * defaults (this household's own dark palette) -- a consumer can restyle
 * to match their own site just by setting these on any ancestor of the
 * map container (no fork, no !important fight), e.g.:
 *
 *   #my-map { --grm-accent: #e2685f; --grm-font: Georgia, serif; }
 *
 * Nothing here assumes the HOST page is dark -- only the map canvas
 * itself is (a deliberate no-basemap "night map" look), and even that is
 * just the --grm-surface default, overridable the same way.
 */
.grm-tooltip {
  background: var(--grm-surface, #1a1a19);
  color: var(--grm-ink, #ffffff);
  border: 1px solid var(--grm-border, rgba(255,255,255,0.10));
  border-radius: 4px;
  font-family: var(--grm-font, inherit);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 9px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.grm-tooltip::before { display: none; }
.grm-tooltip .grm-val { font-weight: 400; color: var(--grm-muted, #c3c2b7); margin-top: 2px; font-size: 12px; }

.grm-popup .leaflet-popup-content-wrapper {
  background: var(--grm-surface, #1a1a19); color: var(--grm-ink, #ffffff);
  border: 1px solid var(--grm-border, rgba(255,255,255,0.10)); border-radius: 8px;
  font-family: var(--grm-font, inherit);
}
.grm-popup .leaflet-popup-tip { background: var(--grm-surface, #1a1a19); }
.grm-popup .leaflet-popup-content { margin: 14px 16px; min-width: 220px; }
.grm-popup h3 { margin: 0 0 6px; font-size: 15px; }
.grm-popup .grm-total { font-size: 20px; font-weight: 700; color: var(--grm-accent, #3987e5); }
.grm-popup .grm-caveat { font-size: 11px; color: var(--grm-muted-2, #898781); margin-top: 6px; line-height: 1.4; }
.grm-popup ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 160px; overflow-y: auto; }
.grm-popup li { border-top: 1px solid var(--grm-border, rgba(255,255,255,0.10)); padding: 6px 0; font-size: 12px; }
.grm-popup li a { color: var(--grm-muted, #c3c2b7); text-decoration: none; }
.grm-popup li a:hover { color: var(--grm-accent, #3987e5); }
.grm-popup .grm-amt { color: var(--grm-ink, #ffffff); font-weight: 600; }

.grm-legend-title { font-family: var(--grm-font, inherit); font-size: 12px; color: var(--grm-muted, #c3c2b7); margin-bottom: 6px; }
.grm-legend-ramp { height: 10px; width: 220px; border-radius: 3px; }
.grm-legend-scale { display: flex; justify-content: space-between; width: 220px; margin-top: 4px; font-family: var(--grm-font, inherit); font-size: 11px; color: var(--grm-muted-2, #898781); }
.grm-legend-caveat { margin-top: 6px; font-family: var(--grm-font, inherit); font-size: 11px; color: var(--grm-muted-2, #898781); max-width: 260px; line-height: 1.4; }

/* Leaflet's own chrome (zoom control, attribution) assumes a light UI --
   restyle for a map that's always on a dark canvas regardless of host page. */
.leaflet-control-zoom a {
  background: var(--grm-surface, #1a1a19) !important;
  color: var(--grm-muted, #c3c2b7) !important;
  border: 1px solid var(--grm-border, rgba(255,255,255,0.10)) !important;
}
.leaflet-control-zoom a:hover { color: var(--grm-ink, #ffffff) !important; }
.leaflet-control-attribution {
  background: var(--grm-surface-transparent, rgba(26,26,25,0.85)) !important;
  color: var(--grm-muted-2, #898781) !important;
  font-family: var(--grm-font, inherit) !important;
}
.leaflet-control-attribution a { color: var(--grm-muted, #c3c2b7) !important; }
.leaflet-popup-close-button { color: var(--grm-muted-2, #898781) !important; }
