/* Election Results page (2026-11-04). Layout only; everything else comes from water-systems.css, political-maps.css
   and the site defaults in app/globals.css. */
.election-results .er-grid > header{align-items:center}
.election-results .er-pick{display:flex;align-items:center;gap:10px;margin:12px 0 10px;font:700 12px var(--font-body);color:var(--forest)}
.election-results .er-pick select{height:32px;padding:0 8px;border:1px solid var(--rule-strong);border-radius:6px;font:400 14px var(--font-body);color:var(--ink);background:#fff}
.election-results .er-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px}
.election-results .er-filters input,.election-results .er-filters > select{height:36px;padding:0 8px;border:1px solid var(--rule-strong);border-radius:6px;font:400 13px var(--font-body);color:var(--ink);background:#fff}
.election-results .er-filters input{width:210px}
.election-results .er-filters .er-band-right{margin-left:auto;display:inline-flex;align-items:center;gap:8px}
.election-results .er-filters .pm-clear{height:36px}
/* Column labels wrap, two lines at most (Robert, 2026-11-04): each column as narrow as its widest entry. */
.election-results .er-grid thead th{white-space:normal;width:1%;vertical-align:bottom;line-height:1.2}
.election-results .er-grid tbody tr{cursor:pointer}
.election-results .er-grid tbody tr:hover,.election-results .er-grid tbody tr.er-hot{background:var(--wash)}
.election-results .er-grid td{white-space:nowrap}
/* Sideways scroll bar on the grids (Robert, 2026-11-04: "can i have a horizontal scroll on grid"). */
.election-results .er-grid .water-grid-scroll,.election-results .er-grid .pm-scroll{overflow-x:auto}
/* Counties: every county, word-wrapped (Robert, 2026-11-04: "word wrap data in the counties column"). */
.election-results .er-grid td.er-counties{white-space:normal;min-width:14em;max-width:20em}
.election-results .er-detail .er-grid tbody tr{cursor:default}
.election-results .er-how{margin:8px 0 0;color:var(--blue);font-weight:700;font-size:13px}
.election-results .er-how-top{margin:0 0 14px}
.election-results .er-map-note{margin:0 0 8px;color:var(--muted);font-size:13px}
/* District results panel under the left grid, narrowed to its contents (Robert, 2026-11-04). */
.election-results .er-detail{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:28px;max-width:760px}
.election-results .er-detail table{width:auto;min-width:420px}
.election-results .er-detail .water-grid-scroll{max-height:none}
.election-results .er-other td{color:var(--muted)}
/* Stacked cells: winner on top, opponent under in gray (Robert, 2026-11-04). */
.election-results .er-grid td{vertical-align:top}
.election-results .er-stack div{min-height:1.35em;line-height:1.35}
.election-results .er-stack div + div{color:var(--muted)}
/* Winner's line in bold (Robert, 2026-11-04: black and gray alone don't show winner and loser enough). */
.election-results .er-grid td.er-stack > div:first-child{font-weight:700}
/* The whole row is one click target: candidate lines inside it pass the click to the row. */
.election-results .er-grid tbody tr *{cursor:pointer}
.election-results .er-inc{font-size:12px;font-weight:700} /* incumbent star bold on every line (Robert, 2026-11-04) */
/* Totals table under the map lowered, clear of Long Island (Robert, 2026-11-04: "lower the totaling grid on the
   right"); the Voting District Map pulls it 28px up into the map. */
.election-results .pm-map .lm-party-table{margin:24px auto 8px}
/* Column label bar of the totals tables: labels centered top to bottom, the Upstate % star not lifting its label
   (Robert, 2026-11-04: "column label bar vertically justified"). */
.election-results .pm-map .lm-party-table thead th{vertical-align:middle;line-height:1.2;padding-top:4px;padding-bottom:4px}
.election-results .pm-map .lm-party-table thead th sup{line-height:0;vertical-align:super}
/* 1st Term over Consecutive Terms: wide enough that its label stays on two lines (Robert's two-line rule). */
.election-results .er-grid thead th.er-terms-head{min-width:13.5em}
.election-results .er-terms div + div{color:var(--grid-text)}
/* Map highlight in the site's gold (Robert, 2026-11-04) for picked districts only. Downstate districts drawn in the
   county blue on this page so the gold shows on them too. Pointing (at a district or its grid row) gets a gold outline
   and no gold fill, so it never looks selected (Robert, 2026-11-05: Long Island looked selected on mouseover). */
.election-results .landing7-map path.lm-dist-down,
.election-results .landing7-map path.lm-dist-down.lm-dist-on{fill:#2e5c9e}
.election-results .landing7-map path.lm-dist-picked,
.election-results .landing7-map path.lm-dist-down.lm-dist-picked{fill:#d4a83a}
.election-results .landing7-map path.lm-dist-hot{stroke:#d4a83a;stroke-width:3}
/* Gray separator line under each district (Robert, 2026-11-04); the site's map grey. */
.election-results .er-grid tbody td{border-bottom:1px solid #b9c1c8}
.election-results .er-seats{margin-top:22px;width:auto;min-width:460px}
.election-results .er-seats caption{text-align:left}
.election-results .er-seats td:not(:first-child),.election-results .er-seats th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.election-results .er-seats-total td{border-top:2px solid var(--rule-strong)}
.election-results .er-district-row td{border-bottom:2px solid var(--rule-strong)}

/* Totals tables under the map: header band as tall as the left grid's (43px here) (Robert, 2026-11-05). */
.election-results .pm-map .lm-party-table thead th{height:43px;box-sizing:border-box}

/* Selected column in the map blue, orange text in the map labels' font (body font, 800 weight), size unchanged
   (Robert, 2026-11-05: blue with gold, bold, then "maybe make them orange. same font as map", "leave size alone").
   Orange = the site's --heat-6. #site to win over the grid color settings in globals.css. */
#site .election-results .pm-map .lm-party-table:not(.pm-summary-table) :is(th,td):last-child{background-color:#2e5c9e;color:var(--heat-6);font-family:var(--font-body);font-weight:800}
/* Active row (its details show below the grid): picked gold plus a map-blue outline (Robert, 2026-11-05: "show the
   active/selected row"). */
.election-results .er-grid tbody tr.pm-shown{background:#ffe066;outline:2px solid #2e5c9e;outline-offset:-2px}
/* Detail title smaller than the page's grid titles (Robert, 2026-11-05: "with smaller font"). */
.election-results .er-detail .er-detail-title{font-size:17px}
/* Votes by County grid lowered about 10px (Robert, 2026-11-05). */
.election-results .er-detail .er-county-grid{margin-top:10px}
/* The two totals tables under the map share column widths, so their columns line up (Robert, 2026-11-05: "align the
   Summary"). */
.election-results .pm-map .lm-party-table{table-layout:fixed}
.election-results .pm-map .lm-party-table :is(th,td):first-child{width:26%}
.election-results .pm-map .lm-party-table :is(th,td):not(:first-child){width:18.5%}
/* Counties cell: three lines at most; the full list shows on pointing (title) (Robert, 2026-11-05). */
.election-results .er-grid .er-counties-clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* A filter in use: the site-wide .filter-on look in app/globals.css (Robert, 2026-11-05). */
/* Grid titles: 17px small capitals site-wide now (app/globals.css, --grid-title-size). */

/* Spaced-county map styles moved to public/district-islands.css (2026-11-05). */

/* District count under the grid title (Robert, 2026-11-05): "Results for 150 of 150 Assembly Districts". */
.election-results .er-count{margin:-4px 0 10px;color:var(--muted);font-size:13px}
/* No results yet for the picked election (Robert, 2026-11-11). */
.election-results .er-pending{margin:18px 0 40px;padding:14px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);color:var(--ink);font-size:16px;font-weight:700}
.election-results .er-waiting{color:var(--muted);font-style:italic}
/* "Waiting for Official Results" across the map, covering the map and its tables (Robert, 2026-11-11). */
.election-results .er-map-waiting{position:relative}
.election-results .er-map-waiting-msg{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.9)}
.election-results .er-map-waiting-msg span{transform:rotate(-12deg);padding:14px 26px;border:3px solid var(--title-navy);color:var(--title-navy);font:700 34px var(--font-title);font-variant-caps:small-caps;letter-spacing:.04em;background:#fff}
.election-results .er-map-waiting-msg{align-items:flex-start;padding-top:250px}
.election-results .er-map-waiting-msg{inset:0 -40px}
