/* Clickable "where we are" US map on /search (_StateMap.cshtml). Tokens come from redesign.css. */

/* The search hero with the map (Vivian 10/27: more room between the two, a much bigger map). Below 1200px
   it is as wide as the header (.fx-nav__inner): card under the logo, map under "Contact Us". Half the
   gutter must stay inside the side margin or the page scrolls sideways (24 < 39px at 992; 40 < 48 from 1200).
   Gutters in px, not rem: a larger browser font grows rem but not that margin. */
.eq-container.eq-map-hero { width: min(1280px, 92%); }
@media (min-width: 992px)  { .eq-map-hero > .row { --bs-gutter-x: 48px; } }
@media (min-width: 1200px) { .eq-map-hero > .row { --bs-gutter-x: 80px; } }

/* Bigger map (Vivian 10/28: "we could still make the map even bigger", circling the empty space under
   it). From 1200px the hero runs wider than the header, the search card stays at 413px (1200) to 487px
   (from ~1430) and the map takes everything else: 777px wide at 1440, 993 from ~1660 (all were 713).
   48px side margins keep half the 80px gutter on the page, so nothing scrolls sideways. These rules
   replace col-xl-5 / col-xl-7, which only remain as the fallback. */
@media (min-width: 1200px) {
    .eq-container.eq-map-hero { width: min(1560px, calc(100% - 96px)); }
    .eq-map-hero > .row > .eq-map-hero__search { flex: 0 0 auto; width: calc(clamp(413px, 34vw, 487px) + var(--bs-gutter-x)); }
    .eq-map-hero > .row > .eq-map-hero__map { flex: 1 1 0; width: auto; min-width: 0; }
}

.eq-map { display: flex; flex-direction: column; gap: .6rem; }
.eq-map__svg { width: 100%; height: auto; display: block; }
.eq-map__hint { color: var(--eq-ink-soft); font-size: .92em; }

.eq-map__state, a.eq-map__state path { stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.eq-map__state { fill: #dfe6ee; }
a.eq-map__state { cursor: pointer; }
a.eq-map__state path { fill: var(--eq-blue); transition: fill .15s ease; }
a.eq-map__state:hover path,
a.eq-map__state:focus path,
a.eq-map__state.is-selected path { fill: var(--eq-blue-accent); }
a.eq-map__state:focus { outline: none; }
a.eq-map__state:focus-visible path { stroke: var(--eq-ink); stroke-width: 3; }   /* dark ring: readable on the blue fill */

.eq-map__label {
    fill: #fff; font: 700 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    pointer-events: none; paint-order: stroke; stroke: rgba(0, 0, 0, .28); stroke-width: 2px;
}
/* Outside caption for a state too small to hold its own (leader line back to a dot inside it). The
   white halo keeps it readable where it crosses a line or sits over a grey state. */
.eq-map__callout {
    fill: var(--eq-blue); font: 700 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round;
}
.eq-map__leader { stroke: var(--eq-ink); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.eq-map__dot { fill: var(--eq-ink); pointer-events: none; }

.eq-map__panel {
    width: min(100%, 40rem); margin-inline: auto;   /* office and city stay close on the wide map */
    background: var(--eq-surface); border: 1px solid var(--eq-line); border-radius: var(--eq-radius);
    box-shadow: var(--eq-shadow-sm); padding: 1rem 1.1rem;
    max-height: 24rem; overflow-y: auto;   /* a 19-office state must not push the map off screen */
}
.eq-map__panel:focus { outline: 2px solid var(--eq-blue); outline-offset: 2px; }
.eq-map__panel-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.eq-map__est { color: var(--eq-ink-soft); font-weight: 400; font-size: .85em; white-space: nowrap; }
.eq-map__close { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; color: var(--eq-ink-soft); padding: 0 .25rem; }
.eq-map__close:hover, .eq-map__close:focus-visible { color: var(--eq-ink); }
.eq-map__offices { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .4rem; }
.eq-map__offices li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.eq-map__offices span { color: var(--eq-ink-soft); }

.eq-map__list summary { cursor: pointer; color: var(--eq-blue); font-size: .95em; }
.eq-map__ul { columns: 2; column-gap: 1.5rem; list-style: none; padding: 0; margin: .5rem 0 0; font-size: .92em; }
.eq-map__ul li { break-inside: avoid; padding: .1rem 0; }
.eq-map__meta { color: var(--eq-ink-soft); margin-left: .35rem; }

@media (max-width: 575.98px) {
    .eq-map__labels { display: none; }   /* too small to read; the list below carries the years */
    .eq-map__ul { columns: 1; }
}
