/*
  va-map-local.css — "you are here" map for an individual office page.
  Served from /local_assets/www.cals.vt.edu/va-map/

  Everything is scoped under .va-map-local, so it is safe to load globally via
  modifyGlobalTemplate.css. Independent of va-map.css; the two can coexist.

  The highlight colour is one variable:
    --vml-highlight   default VT burnt orange #e5751f

  It reads against every district fill because the rest of the map is held back —
  non-current localities are drawn washed out, so the highlight is the only
  saturated thing on the page. Change the variable and that still holds. Colour is
  never the only cue: the current locality also carries a heavy dark outline, and
  the sentence above the map says the same thing in words.
*/

.va-map-local {
  --vml-northwest: #e0711f;
  --vml-northeast: #f2a75c;
  --vml-southwest: #7b2340;
  --vml-central:   #2c7a8c;
  --vml-southeast: #8ec9ce;

  --vml-highlight: #e5751f;
  --vml-ink:       #17202a;
  --vml-muted:     #4c5a67;
  --vml-line:      #ccd6de;
  --vml-maroon:    #861f41;

  color: var(--vml-ink);
  max-width: 44rem;
}

.va-map-local *,
.va-map-local *::before,
.va-map-local *::after { box-sizing: border-box; }

.va-map-local__title { margin-block: 0 0.4rem; }
.va-map-local__lede { margin-block: 0 1rem; color: var(--vml-muted); }

.va-map-local__note {
  margin-block: 0 1rem;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--vml-maroon);
  border-radius: 0.4rem;
  background: #faf5f7;
  color: var(--vml-maroon);
}

.va-map-local__canvas {
  border: 1px solid var(--vml-line);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.5rem;
  overflow: hidden;
}

.va-map-local__svg { display: block; width: 100%; height: auto; }

/* Context: present but deliberately quiet. */
.va-map-local__shape {
  fill: #e7edf2;
  stroke: #fff;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
  opacity: 0.9;
}

.va-map-local__shape[data-district="northwest"] { fill: var(--vml-northwest); opacity: 0.3; }
.va-map-local__shape[data-district="northeast"] { fill: var(--vml-northeast); opacity: 0.3; }
.va-map-local__shape[data-district="southwest"] { fill: var(--vml-southwest); opacity: 0.3; }
.va-map-local__shape[data-district="central"]   { fill: var(--vml-central);   opacity: 0.3; }
.va-map-local__shape[data-district="southeast"] { fill: var(--vml-southeast); opacity: 0.3; }

.va-map-local__shape[data-current="true"] {
  fill: var(--vml-highlight);
  opacity: 1;
}

.va-map-local__ring {
  fill: none;
  stroke: var(--vml-ink);
  stroke-width: 2.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.va-map-local__dot {
  fill: #8c9aa7;
  stroke: #fff;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.va-map-local__halo {
  fill: none;
  stroke: var(--vml-ink);
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.va-map-local__here {
  fill: var(--vml-highlight);
  stroke: var(--vml-ink);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

/* ── contact details ──────────────────────────────────────────────────── */
.va-map-local__card { margin-block-start: 1rem; }

.va-map-local__details {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
}

.va-map-local__details dt { font-weight: 700; }
.va-map-local__details dd { margin: 0; }

.va-map-local__give {
  margin-block-start: 1.1rem;
  padding-block-start: 0.9rem;
  border-block-start: 1px solid var(--vml-line);
}

.va-map-local__give-label { margin: 0 0 0.4rem; font-weight: 700; }

.va-map-local__give-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.va-map-local__give-link {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--vml-maroon);
  border-radius: 999px;
  color: var(--vml-maroon);
  font-weight: 600;
  text-decoration: none;
}

.va-map-local__give-link:hover { background: var(--vml-maroon); color: #fff; }

.va-map-local__give-link:focus-visible {
  outline: 3px solid var(--vml-maroon);
  outline-offset: 2px;
}

.va-map-local__give-note {
  margin-block: 0.6rem 0;
  font-size: 0.85rem;
  color: var(--vml-muted);
}

.va-map-local__all { margin-block: 1rem 0; }

.va-map-local__all a:focus-visible,
.va-map-local__details a:focus-visible {
  outline: 3px solid var(--vml-maroon);
  outline-offset: 2px;
}

@media (prefers-contrast: more) {
  .va-map-local__shape[data-district] { opacity: 0.18; }
  .va-map-local__ring { stroke-width: 3.4; }
}
