/* Find your polling place - map UI. Builds on the vote page design tokens. */

.map-head { margin-bottom: var(--space-4); }
.map-head h1 { font-size: var(--step-4); }
.map-head p  { color: var(--ink-soft); max-width: var(--measure); margin-top: var(--space-2); }

/* search + autocomplete */
.search { position: relative; max-width: 34rem; margin-top: var(--space-3); }
.search input {
  width: 100%; font: inherit; font-size: var(--step-0);
  padding: .85em 1.1em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.14); overflow: hidden;
}
.suggest li {
  padding: .6em .8em; border-radius: 10px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.suggest li:hover, .suggest li[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.search-hint { margin-top: var(--space-2); font-size: var(--step--1); color: var(--muted); }

/* the map */
.map {
  height: clamp(360px, 56vh, 640px); margin-top: var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface);
}

/* peek-then-unlock (map folded into the vote page) */
.map-wrap { position: relative; }
.map-wrap .map { transition: height .38s var(--ease); }
.map-wrap.peek .map { height: clamp(360px, 56vh, 640px); pointer-events: none; }   /* full size + inert while locked */
.map-wrap .peek-lock { display: none; }
.map-wrap.peek .peek-lock {
  display: flex; position: absolute; inset: 0; z-index: 5;
  align-items: center; justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.25);            /* 25% black scrim over the locked map */
  pointer-events: none;
}
.map-wrap.peek .peek-cta {
  pointer-events: auto; cursor: pointer; font: inherit;
  font-size: var(--step--1); font-weight: 600;
  background: var(--ink); color: var(--bg);
  padding: .7em 1.3em; border: 0; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.map-wrap.peek .peek-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.24); }
.map-wrap.peek .peek-cta:active { transform: translateY(0); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.map-wrap.peek .peek-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* the hero result card */
.result {
  margin-top: var(--space-4); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(var(--space-4), 4vw, var(--space-6));
}
.result .eyebrow { color: var(--muted); font-size: var(--step--1); text-transform: uppercase; letter-spacing: .06em; }
.result .place { font-size: var(--step-4); margin: var(--space-2) 0 var(--space-1); }
.result .addr  { color: var(--ink-soft); font-size: var(--step-1); }
.result .hours { color: var(--accent); font-weight: 600; margin-top: var(--space-2); }
.result .eta { margin-top: var(--space-2); font-size: var(--step-0); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.result .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.result .disclaim { margin-top: var(--space-4); font-size: var(--step--1); color: var(--muted); max-width: var(--measure); }

/* legend chips under the map */
.legend { display: flex; gap: var(--space-4); margin-top: var(--space-3); font-size: var(--step--1); color: var(--ink-soft); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: .5em; }
.legend .dot { width: .8em; height: .8em; border-radius: 50%; }
.legend .home { background: #ff2d88; }
.legend .poll { background: #d21f7a; }
