.f2m-projects-map-container {
  margin: 0 3rem 0 0;
  position: relative;
}

.f2m-projects-map {
  width: 100%;
  min-height: 420px;
  height: clamp(420px, 58vh, 640px);
  border: 1px solid #d6dde3;
  border-radius: 6px;
  overflow: hidden;
  background: #eef2f5;
  touch-action: none;
}

.f2m-projects-map .mapboxgl-control-container {
  z-index: 10;
}

.mapboxgl-ctrl-group button:first-child {
  border-radius: 4px;
}

.maplibregl-ctrl-fullscreen.mapboxgl-ctrl-fullscreen {
  display: none;
}

.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-reset-bounds {
  width: 29px;
  height: 29px;
  min-width: 29px;
  padding: 0;
  background: #ffffff;
  border: 0;
  line-height: 29px;
  cursor: pointer;
}

.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-switch-style {
  width: auto;
  height: auto;
  padding: 10px;
  min-width: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-switch-style:hover {
  background: #eaf0f6;
  color: #333333;
}

.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-reset-bounds .maplibregl-ctrl-icon,
.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-switch-style .maplibregl-ctrl-icon {
  width: 29px;
  height: 29px;
  display: block;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-reset-bounds .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2229%22%20height%3D%2229%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M22.5%204.5h-16c-1.11%200-2%20.89-2%202v16c0%201.11.89%202%202%202h16c1.11%200%202-.89%202-2v-16c0-1.11-.89-2-2-2m0%2018h-16v-16h16m-7%204v2h-2v-2h-2l3-3%203%203m1%207v-2h-2v-2h2v-2l3%203m-9%201h-2v2l-3-3%203-3v2h2m5%205-3%203-3-3h2v-2h2v2%22%20style%3D%22fill%3A%23333%3Bfill-opacity%3A1%22%2F%3E%3C%2Fsvg%3E");
}

.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-switch-style .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2229%22%20height%3D%2229%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5.5%2013.5h8v-8h-8m0%2018h8v-8h-8m10%208h8v-8h-8m0-10v8h8v-8%22%20style%3D%22fill%3A%23333%3Bfill-opacity%3A1%22%2F%3E%3C%2Fsvg%3E");
}

.f2m-projects-map .mapboxgl-ctrl-group button.ctrl-switch-style.is-active {
  background: #eaf0f6;
  color: #333333;
}

.f2m-projects-map .mapboxgl-ctrl-group button:focus-visible {
  outline: 2px solid #2e90fa;
  outline-offset: 1px;
}

.f2m-projects-map__style-control {
  position: relative;
  overflow: visible;
}

.f2m-projects-map .switch-style-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(22rem, 86vw);
  max-height: min(72vh, 560px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #c7d1db;
  border-radius: 9px;
  box-shadow: 0 10px 24px rgba(22, 36, 52, 0.2);
  padding: 0.8rem;
}

.f2m-projects-map__panel-heading {
  margin: 0 0 0.75rem;
  color: #102335;
  font-size: 0.92rem;
  font-weight: 700;
}

.f2m-projects-map__panel-section + .f2m-projects-map__panel-section {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e3e9ee;
}

.f2m-projects-map__section-title {
  margin: 0 0 0.45rem;
  color: #30465d;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.f2m-projects-map__choice-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.f2m-projects-map__choice-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.f2m-projects-map__choice-button {
  width: 2rem;
  height: 1.1rem;
  min-width: 2rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-radius: 999px;
  padding: 0;
  flex-shrink: 0;
}

.f2m-projects-map__choice-label {
  color: #2e4458;
  font-size: 0.82rem;
  font-weight: 600;
}

.f2m-projects-map__choice-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 1.1rem;
  border-radius: 999px;
  background: rgba(20, 40, 58, 0.28);
  transition: background-color 120ms ease;
}

.f2m-projects-map__choice-button::after {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 35, 53, 0.32);
  transition: left 120ms ease, background-color 120ms ease;
}

.f2m-projects-map__choice-button:focus-visible,
.f2m-projects-map__overlay-toggle:focus-visible {
  outline: 2px solid #2e90fa;
  outline-offset: 2px;
}

.f2m-projects-map__choice-button.is-active::before {
  background: #1d4f7f;
}

.f2m-projects-map__choice-button.is-active::after {
  left: 1.06rem;
  background: #ffffff;
}

.f2m-projects-map__overlay-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.f2m-projects-map__overlay-card {
  border: 1px solid #d5dee7;
  border-radius: 8px;
  background: #f8fafd;
  padding: 0.55rem;
}

.f2m-projects-map__overlay-card.is-disabled {
  opacity: 0.6;
}

.f2m-projects-map__overlay-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.f2m-projects-map__overlay-toggle {
  width: 2rem;
  height: 1.1rem;
  min-width: 2rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-radius: 999px;
  padding: 0;
  flex-shrink: 0;
}

.f2m-projects-map__overlay-toggle-label {
  color: #2e4458;
  font-size: 0.82rem;
  font-weight: 700;
}

.f2m-projects-map__overlay-toggle.is-pending {
  cursor: progress;
  opacity: 0.8;
}

.f2m-projects-map__overlay-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 1.1rem;
  border-radius: 999px;
  background: rgba(20, 40, 58, 0.28);
  transition: background-color 120ms ease;
}

.f2m-projects-map__overlay-toggle::after {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 35, 53, 0.32);
  transition: left 120ms ease, background-color 120ms ease;
}

.f2m-projects-map__overlay-toggle.is-active::before {
  background: #1d4f7f;
}

.f2m-projects-map__overlay-toggle.is-active::after {
  left: 1.06rem;
  background: #ffffff;
}

.f2m-projects-map__overlay-description {
  margin: 0.48rem 0 0;
  color: #3f5265;
  font-size: 0.73rem;
  line-height: 1.34;
}

.f2m-projects-map__choropleth-wrap {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.52rem;
}

.f2m-projects-map__choropleth-label {
  color: #344f66;
  font-size: 0.72rem;
  font-weight: 700;
}

.f2m-projects-map__choropleth-select {
  width: 100%;
  font-size: 0.76rem;
  border: 1px solid #b8c7d6;
  border-radius: 6px;
  background: #ffffff;
  color: #14283a;
  padding: 0.35rem 0.42rem;
}

.f2m-projects-map__choropleth-select:focus-visible {
  outline: 2px solid #2e90fa;
  outline-offset: 1px;
}

.f2m-projects-map__legend {
  margin-top: 0.52rem;
  border-top: 1px solid #dce4eb;
  padding-top: 0.44rem;
}

.f2m-projects-map__legend-title {
  margin: 0;
  color: #344f66;
  font-size: 0.72rem;
  font-weight: 700;
}

.f2m-projects-map__legend-empty {
  margin: 0.28rem 0 0;
  color: #5c6f81;
  font-size: 0.73rem;
}

.f2m-projects-map__legend-list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.23rem;
}

.f2m-projects-map__legend-item {
  display: grid;
  grid-template-columns: 0.88rem 1fr;
  align-items: center;
  gap: 0.38rem;
}

.f2m-projects-map__legend-swatch {
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 2px;
  border: 1px solid rgba(20, 40, 58, 0.2);
}

.f2m-projects-map__legend-label {
  color: #2e4458;
  font-size: 0.72rem;
  line-height: 1.24;
}

.f2m-projects-map__reference {
  margin-top: 0.5rem;
  border-top: 1px solid #dce4eb;
  padding-top: 0.45rem;
}

.f2m-projects-map__reference summary {
  cursor: pointer;
  color: #344f66;
  font-size: 0.72rem;
  font-weight: 700;
}

.f2m-projects-map__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.f2m-projects-map__reference-text {
  margin: 0.45rem 0 0;
  color: #415667;
  font-size: 0.72rem;
  line-height: 1.32;
}

.f2m-projects-map__reference-link {
  display: inline-block;
  margin-top: 0.45rem;
  color: #1d4f7f;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: underline;
}

.f2m-projects-map .mapboxgl-marker {
  cursor: pointer;
}

.f2m-projects-map-marker {
  cursor: pointer;
  line-height: 0;
  z-index: 1;
}

.f2m-projects-map-marker:hover,
.f2m-projects-map-marker:focus-visible,
.f2m-projects-map-marker.is-selected {
  z-index: 1000;
}

.f2m-projects-map-marker svg {
  display: block;
  width: 24px;
  height: auto;
  filter: drop-shadow(0 0 0 1px rgba(255, 255, 255, 0.95)) drop-shadow(0 3px 6px rgba(25, 25, 25, 0.25));
  transition: transform 120ms ease, filter 120ms ease;
}

.f2m-projects-map-marker:hover svg,
.f2m-projects-map-marker:focus-visible svg {
  transform: scale(1.5);
  filter: drop-shadow(0 0 0 2px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 0 4px rgba(25, 25, 25, 0.25));
}

.f2m-projects-map-marker.is-selected svg {
  transform: scale(1.5);
  filter: drop-shadow(0 0 0 2px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 0 4px rgba(25, 25, 25, 0.25));
}

.f2m-projects-map-marker:hover svg path,
.f2m-projects-map-marker:focus-visible svg path,
.f2m-projects-map-marker.is-selected svg path {
  stroke: #ffffff;
  stroke-width: 2px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
}

.project-listing.is-map-selected {
  background: #eef8f1;
  box-shadow: inset 3px 0 0 rgba(25, 25, 25, 0.25);
}

.f2m-projects-map-popup {
  font-size: 0.875rem;
  line-height: 1.35;
  max-width: 260px;
}

.f2m-projects-map .mapboxgl-popup {
  z-index: 1200;
}

.f2m-projects-map-popup__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.f2m-projects-map-popup__title a:focus,
.f2m-projects-map-popup__title a:focus-visible {
  outline: none;
  box-shadow: none;
}

html[data-ada="true"] .f2m-projects-map-popup__title a:focus-visible,
body.ada-enabled .f2m-projects-map-popup__title a:focus-visible,
body.accessibility-enabled .f2m-projects-map-popup__title a:focus-visible {
  outline: 2px solid #2e90fa;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #b2ddff;
}

.f2m-projects-map-popup__meta {
  margin: 0;
  color: #44515f;
}

.view-mapping:not(.attachment) .view-header .legend-wrap {
  display: flex;
  align-items: left;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  font-size: 0.9em;
  margin: 1rem 0 !important;
}

.view-mapping:not(.attachment) .view-header .legend-wrap strong,
.view-mapping:not(.attachment) .view-header > strong {
  padding-right: 0.5rem;
}

.f2m-projects-map-fullscreen-host:fullscreen,
.f2m-projects-map-fullscreen-host:-webkit-full-screen {
  background: #ffffff;
  padding: 1rem;
  overflow: auto;
}

.f2m-projects-map-fullscreen-host:fullscreen .f2m-projects-map,
.f2m-projects-map-fullscreen-host:-webkit-full-screen .f2m-projects-map {
  height: min(70vh, 760px);
  max-height: none;
}

@media (max-width: 768px) {
  .f2m-projects-map-container {
    margin: 0.8rem;
  }

  .f2m-projects-map {
    min-height: 360px;
    height: 56vh;
  }

  .f2m-projects-map .switch-style-panel {
    width: min(92vw, 21rem);
    max-height: 66vh;
  }
}

/* HIDE MAPBOX COPYRIGHT */
.mapboxgl-ctrl-attrib, .mapboxgl-ctrl-bottom-left, .mapboxgl-ctrl-bottom-right {
  display: none;
}
