/* GBVF Response Fund – Interactive CBO Map
   All styles are scoped to .gbvf-map so Bricks/theme styles don't clash. */

.gbvf-map {
  --gbvf-slate: #5c5b70;
  --gbvf-teal: #00bf9f;
  --gbvf-teal-hover: #4fd6bd;
  --gbvf-teal-dark: #009c82;
  --gbvf-gold: #f7c46c;
  --gbvf-ink: #2b2d42;
  --gbvf-muted: #6b6c7e;
  --gbvf-line: #e6e6ec;
  --gbvf-soft: #f6f6f9;
  --gbvf-heading-font: "Noto Serif", "Droid Serif", Georgia, serif;
  --gbvf-body-font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  font-family: var(--gbvf-body-font);
  color: var(--gbvf-ink);
  max-width: 1200px;
  margin: 0 auto;
  line-height: 1.5;
}
.gbvf-map *,
.gbvf-map *::before,
.gbvf-map *::after { box-sizing: border-box; }

/* ---------- Map ---------- */
.gbvf-map__stage {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}
.gbvf-map__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.gbvf-map__prov {
  fill: var(--gbvf-slate);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill .2s ease;
  outline: none;
}
.gbvf-map__prov:hover,
.gbvf-map__prov:focus-visible,
.gbvf-map__prov.is-hover { fill: var(--gbvf-teal-hover); }
.gbvf-map__prov.is-active { fill: var(--gbvf-teal); }
.gbvf-map__prov.is-user { fill: #7a798d; }
.gbvf-map__prov.is-user.is-active { fill: var(--gbvf-teal); }
.gbvf-map__prov:focus-visible { stroke: var(--gbvf-gold); stroke-width: 3; }

.gbvf-map__dot {
  fill: var(--gbvf-gold);
  stroke: var(--gbvf-ink);
  stroke-width: 1;
  pointer-events: none;
}
.gbvf-map__me { fill: #fff; stroke: var(--gbvf-ink); stroke-width: 2.5; pointer-events: none; }
.gbvf-map__me-pulse {
  fill: none; stroke: #fff; stroke-width: 2; pointer-events: none;
  transform-box: fill-box; transform-origin: center;
  animation: gbvf-pulse 1.8s ease-out infinite;
}
@keyframes gbvf-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gbvf-map__me-pulse { animation: none; } }

.gbvf-map__tip {
  position: absolute;
  pointer-events: none;
  background: var(--gbvf-ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.gbvf-map__tip.is-on { opacity: 1; }
.gbvf-map__tip strong { display: block; font-size: 14px; }
.gbvf-map__tip span { opacity: .8; }

.gbvf-map__hint {
  text-align: center;
  color: var(--gbvf-muted);
  font-size: 14px;
  margin: 10px 0 0;
}

/* ---------- Heading ---------- */
.gbvf-map__heading {
  font-family: var(--gbvf-heading-font);
  color: var(--gbvf-gold);
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.15;
  margin: 48px 0 24px;
  scroll-margin-top: 120px;
}

/* ---------- Toolbar ---------- */
.gbvf-map__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.gbvf-map__search {
  position: relative;
  flex: 1 1 280px;
}
.gbvf-map__search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; stroke: var(--gbvf-muted); fill: none; stroke-width: 2;
}
.gbvf-map input.gbvf-map__input,
.gbvf-map select.gbvf-map__select {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--gbvf-line);
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  color: var(--gbvf-ink);
  background: #fff;
  margin: 0;
}
.gbvf-map input.gbvf-map__input { padding: 0 14px 0 42px; }
.gbvf-map select.gbvf-map__select { padding: 0 36px 0 14px; flex: 0 1 220px; width: auto; cursor: pointer; }
.gbvf-map input.gbvf-map__input:focus,
.gbvf-map select.gbvf-map__select:focus { outline: none; border-color: var(--gbvf-teal); box-shadow: 0 0 0 3px rgba(0,191,159,.18); }

.gbvf-map .gbvf-map__btn {
  height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1.5px solid var(--gbvf-teal);
  background: #fff;
  color: var(--gbvf-teal-dark);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.gbvf-map .gbvf-map__btn:hover { background: var(--gbvf-teal); color: #fff; }
.gbvf-map .gbvf-map__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.gbvf-map .gbvf-map__btn[aria-busy="true"] { opacity: .6; cursor: progress; }

.gbvf-map__filters {
  display: inline-flex;
  background: var(--gbvf-soft);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.gbvf-map .gbvf-map__filter {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--gbvf-muted);
  cursor: pointer;
  white-space: nowrap;
}
.gbvf-map .gbvf-map__filter[aria-pressed="true"] { background: var(--gbvf-slate); color: #fff; }
.gbvf-map .gbvf-map__filter:hover:not([aria-pressed="true"]) { color: var(--gbvf-ink); }
.gbvf-map__count { font-weight: 400; opacity: .75; }

.gbvf-map__status {
  font-size: 14px;
  color: var(--gbvf-muted);
  margin: 4px 0 18px;
  min-height: 21px;
}
.gbvf-map .gbvf-map__link {
  background: none; border: 0; padding: 0; font: inherit; color: var(--gbvf-teal-dark);
  text-decoration: underline; cursor: pointer; font-weight: 600;
}
.gbvf-map__msg {
  background: #fff8ea;
  border-left: 4px solid var(--gbvf-gold);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  margin: 0 0 16px;
}
.gbvf-map__msg[hidden] { display: none; }

/* ---------- Table ---------- */
.gbvf-map__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  table-layout: fixed;
}
.gbvf-map__table th {
  background: var(--gbvf-teal);
  color: #fff;
  font-family: var(--gbvf-heading-font);
  font-weight: 400;
  font-size: 20px;
  text-align: left;
  padding: 20px 16px;
  border: 0;
}
.gbvf-map__table th:first-child { border-radius: 6px 0 0 6px; padding-left: 32px; }
.gbvf-map__table th:last-child { border-radius: 0 6px 6px 0; }
.gbvf-map__table td {
  padding: 22px 16px;
  vertical-align: top;
  font-size: 15px;
  border: 0;
  border-bottom: 1px solid var(--gbvf-line);
  background: transparent;
  overflow-wrap: anywhere;
}
.gbvf-map__table td:first-child { padding-left: 32px; }
.gbvf-map__table tr:last-child td { border-bottom: 0; }
.gbvf-map__name { font-weight: 700; }
.gbvf-map__tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}
.gbvf-map__tag--past { background: #ececf1; color: var(--gbvf-muted); }
.gbvf-map__tag--present { background: #e0f7f2; color: var(--gbvf-teal-dark); }
.gbvf-map__dist { display: block; font-size: 13px; color: var(--gbvf-teal-dark); font-weight: 600; margin-top: 4px; }
.gbvf-map__empty-cell { color: #b0b0bc; }
.gbvf-map mark { background: #fde9bf; color: inherit; padding: 0 1px; border-radius: 2px; }

.gbvf-map__col-name { width: 22%; }
.gbvf-map__col-prov { width: 13%; }
.gbvf-map__col-loc { width: 15%; }
.gbvf-map__col-addr { width: 19%; }
.gbvf-map__col-bio { width: 31%; }

.gbvf-map__none {
  text-align: center;
  padding: 40px 16px;
  color: var(--gbvf-muted);
}
.gbvf-map__more-wrap { text-align: center; margin-top: 24px; }

/* ---------- Mobile: rows become cards ---------- */
@media (max-width: 760px) {
  .gbvf-map__heading { margin-top: 32px; }
  .gbvf-map select.gbvf-map__select { flex: 1 1 100%; }
  .gbvf-map__filters { width: 100%; justify-content: space-between; }
  .gbvf-map .gbvf-map__filter { flex: 1; padding: 9px 6px; font-size: 13px; }
  .gbvf-map__w { display: none; }
  .gbvf-map .gbvf-map__btn { flex: 1 1 100%; justify-content: center; }
  .gbvf-map__table, .gbvf-map__table tbody, .gbvf-map__table tr, .gbvf-map__table td { display: block; width: 100%; }
  .gbvf-map__table colgroup, .gbvf-map__table thead { display: none; }
  .gbvf-map__table tr {
    border: 1px solid var(--gbvf-line);
    border-top: 4px solid var(--gbvf-teal);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .gbvf-map__table td,
  .gbvf-map__table td:first-child { padding: 4px 0; border: 0; }
  .gbvf-map__table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gbvf-muted);
    margin-top: 8px;
  }
  .gbvf-map__table td.gbvf-map__name { font-size: 17px; }
}
