/* monitoring-results-impact */

.monitoring-results-impact-module {
  --map-max-width: 1250;
  --map-aspect-ratio: 10/5;
  /* the download link's color comes from icons.css's .text-icon-clr1, which
     falls back to --section-icon-text-clr - only set by the page's odd/even
     section wrapper, which this component isn't guaranteed to sit inside */
  --section-icon-text-clr: var(--clr-yellow-orange);

  --map-bg-light: #bdecef;
  --map-bg-medium: #69c4cc;
  --map-bg-dark: #078d9e;

  --map-ocean: #48b4c1;
  --map-no-data: #eeeeee;
  --map-border: var(--clr-white);
  --map-no-data-country-border: #e3e3e3;


  --heading-color: var(--clr-gray-dark);
  --legend-bg: rgba(33, 86, 140, 0.95);

  --control-bg: #ffffff;
  --control-border: #078f9b;
  --control-text: var(--clr-gray-dark);
  --control-text-strong: var(--clr-primary);

  --tab-active-bg: var(--clr-blue);
  --tab-active-text: var(--clr-white);

  --data-low: #ffe166;
  --data-mid-low: #ffc72c;
  --data-mid: #ffa64d;
  --data-mid-high: #ff7a30;
  --data-high: #f14c28;
  --data-very-high: #e50920;

  position: relative;
  overflow-x: hidden;
  min-height: auto;
}

/* Wave container */
.monitoring-results-impact-module {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--clr-white) !important;
}

/* isolation:isolate above traps the whole chapter's contents in their own
   stacking context - with no z-index on the chapter itself, that context
   paints at the page's z-index:auto layer regardless of any z-index set
   deeper inside it (country-popup.css's own z-index:4 on
   .country-popup__postioned included - that number only orders things
   WITHIN this isolated context, it can't let them escape above it).
   .section-nav-wrapper (layouts/section-nav/css/section-nav.css,
   position:fixed, its own separate branch of the page, z-index:3) sits in
   the page's positive-z-index layer instead, which always paints after/
   above the auto layer - so it covered the open country popup regardless
   of the popup's own z-index (reported, screenshot).
   Only while a country's actually selected (.country-popup-module.opened,
   set by js/monitoring-results-impact.js) does this chapter move into
   that same positive layer, at 4 (just above section-nav-wrapper's 3) -
   gated with :has() rather than applied unconditionally, which instead
   made this whole chapter outrank (and permanently hide behind its own
   opaque background) the page's nav dots for its entire scroll height,
   not just while a popup was actually open (reported regression). */
.monitoring-results-impact-module:has(.country-popup-module.opened) {
  z-index: 4;
}

/*
.monitoring-results-impact-module::before,
.monitoring-results-impact-module::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 180px;
  pointer-events: none;
  z-index: -1;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

*/

/* First wave - light teal */
/* .monitoring-results-impact-module::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 220' preserveAspectRatio='none'%3E%3Cpath d='M0 95 C220 15 370 65 570 130 C800 205 980 190 1190 135 C1370 90 1500 65 1600 95 L1600 220 L0 220 Z' fill='%231FA19B' fill-opacity='.35'/%3E%3C/svg%3E");
} */

/* Second wave - deeper teal */
/* .monitoring-results-impact-module::after {
  height: 145px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 220' preserveAspectRatio='none'%3E%3Cpath d='M0 135 C250 75 420 115 620 175 C850 235 1080 210 1280 160 C1430 120 1520 120 1600 140 L1600 220 L0 220 Z' fill='%23078D9E' fill-opacity='.65'/%3E%3C/svg%3E");
} */

.monitoring-results-for-impact .section-with-bg-image {
  min-height: auto;
}

.page-main-chapter .monitoring-results-impact-module {
  padding: 0;
}

.monitoring-results-impact-module .section-bg-image {
  display: none;
}

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

.monitoring-results-impact {
  position: relative;
  padding-left: var(--sp11);
  padding-right: var(--sp11);
}

.monitoring-results-impact-right {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: var(--sp14) 0 var(--sp11_5);
}

/* header: title + description + controls + selected indicator name */
.monitoring-impact-header {
  text-align: left;
}

/* Title/description on the left, indicator dropdown + view toggle + country
   search on the right, both top-aligned in one row (matches the Figma top
   section - was previously a single centered column). */
.monitoring-impact-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp6);
  margin-bottom: var(--sp5);
}

.monitoring-impact-top__text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.monitoring-impact-title {
  margin: 0;
  line-height: 1.3;
  color: var(--heading-color);
}

.monitoring-impact-desc {
  margin: 0;
  max-width: 720px;
  color: var(--control-text);
  font-size: 16px;
  line-height: 1.333;
}

.monitoring-impact-desc>*:not(:last-child) {
  margin-bottom: 10px;
}

.monitoring-impact-desc strong {
  color: var(--tab-active-bg);
}

/* Right-hand column: controls row (indicator dropdown + view toggle) on
   top, country search beneath it, both right-aligned under the row. */
.monitoring-impact-top__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 20px;
}

/* Back to the original 2-segment switcher (both views always visible,
   active one marked .selected). No longer sits beside the description text,
   so the divider-via-border-left that separated it from that row is gone -
   it's now just another pill in the controls row. */
.monitoring-impact-view-toggle {
  display: flex;
  align-items: center;
}

/* Slider look (outlined track + a floating white "knob" on the selected
   side) - own color scheme, not the purple/white reference screenshot's
   colors. */
/* Explicit height (not padding-driven) matches .indicator-select__trigger
   and .country-search exactly (both 38px) - the padding-driven version
   computed to 42px (30px button + 2x5px padding + 2x1px border), a small
   but visible mismatch across the row of pill controls. */
.monitoring-impact-view-toggle__group {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 38px;
  padding: 0 var(--sp1);
  background: var(--control-bg);
  border-radius: var(--radius-22);
  border: 1px solid var(--control-border);
}

.view-toggle__btn {
  all: unset;
  box-sizing: border-box;
  padding: 0 var(--sp6);
  background: transparent;
  border-radius: var(--radius-22);
  color: var(--control-text);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  height: 30px !important;
  line-height: normal !important;
  min-width: 120px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

/* The "knob" - floats on solid white over the track, fully rounded on
   every corner (unlike the old left/right-only split-pill look) since it
   needs to read the same whichever side is active. */
.view-toggle__btn.selected {
  background: var(--tab-active-bg);
  color: var(--tab-active-text);
  pointer-events: none;
}

.view-toggle__btn:not(.selected):hover {
  background: transparent;
  color: var(--tab-active-bg);
}

.monitoring-impact-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--sp3);
}

.monitoring-results-section .priority-indicator-name {
  color: var(--clr-white);
}

/* indicator select pill */
.indicator-select {
  display: inline-flex;
  align-items: center;
  gap: var(--sp5);
}

.indicator-select__label {
  color: var(--control-text);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.indicator-select__pill-wrap {
  position: relative;
}

.indicator-select__trigger {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp3);
  width: 280px;
  height: 38px;
  padding: var(--sp3) var(--sp6);
  border: 1px solid var(--control-border);
  border-radius: 19px;
  background: var(--control-bg);
  color: var(--control-text);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

/* Closed-state hover: fills the pill with the project's --clr-blue
   accent + white text/arrow. Open state is untouched -
   .open-dropdown .indicator-select__trigger:hover below still wins
   there via the compound selector. */
.indicator-select__trigger:hover {
  background: var(--clr-blue);
  border-color: var(--clr-blue);
  color: var(--clr-white);
}

.indicator-select__trigger.indicator-dropdown-placeholder:hover:after {
  background-image: url(/themes/custom/gff/templates/components/monitoring-results-impact/css/../img/white_arrow_down.svg);
}

/* Open (active) state: the trigger becomes the flat-bottomed cap of the
   dropdown card sitting directly beneath it - same --clr-blue fill/
   white text as the trigger's own hover above. Reverts to the normal
   white/teal pill on close. */
.open-dropdown .indicator-select__trigger,
.open-dropdown .indicator-select__trigger:hover {
  background: var(--clr-blue);
  border-color: var(--clr-blue);
  border-radius: 19px 19px 0 0;
  color: var(--clr-white);
}

.open-dropdown .indicator-select__trigger.indicator-dropdown-placeholder:after {
  background-image: url(/themes/custom/gff/templates/components/monitoring-results-impact/css/../img/white_arrow_down.svg);
}

.indicator-select__value {
  white-space: nowrap;
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
}

/* indicator dropdown (shared placeholder/content classes used by the widget's JS) */
.indicator-dropdown-placeholder:after {
  content: "";
  background: url(/themes/custom/gff/templates/components/monitoring-results-impact/css/../img/dark_arrow_down.svg) no-repeat center center transparent;
  width: 19px;
  height: 10px;
  transition: transform 0.3s linear 0s;
  flex-shrink: 0;
}

.open-dropdown .indicator-dropdown-placeholder:after {
  background-image: url(/themes/custom/gff/templates/components/monitoring-results-impact/css/../img/dark_arrow_down.svg);
  transform: rotate(180deg);
}

.indicators-dropdown-content {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: var(--sp3);
  background: var(--clr-white);
  z-index: 3;
  padding: var(--sp6) var(--sp6) var(--sp10);
  font-size: var(--fs-14);
  text-align: left;
  font-weight: var(--fw-normal);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius-22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* max-height/overflow live on the inner list, not this padded card, so a
   scrollbar sits safely inside the existing right padding instead of
   eating into it (which only happened once there were enough rows to
   actually need scrolling, making the gap inconsistent). */
.indicators-dropdown-list {
  display: block;
  max-height: 280px;
  overflow-y: auto;
}

/* Same treatment as the site-wide .site-scrollbar utility (base/base.css) -
   not applied via that class directly since it also carries its own
   padding-right, which would fight the padding these dropdowns already get
   from their non-scrolling parent card. */
.indicators-dropdown-list::-webkit-scrollbar,
.country-search__suggestions::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.indicators-dropdown-list::-webkit-scrollbar-track,
.country-search__suggestions::-webkit-scrollbar-track {
  background: #e0e0e0;
}

.indicators-dropdown-list::-webkit-scrollbar-thumb,
.country-search__suggestions::-webkit-scrollbar-thumb {
  background-color: var(--clr-primary);
  border-radius: 8px;
}

.open-dropdown .indicators-dropdown-content {
  opacity: 1;
  pointer-events: unset;
  margin-top: 0;
  border-radius: 0 0 var(--radius-22) var(--radius-22);
}

/* Figma 82:886 ("indicator dropdown open state"): rows are plain
   full-width bars (no per-row radius, that's only on the outer card),
   10px padding, 1px #DBDBDB divider between them. The selected row is
   distinguished *only* by a light #F2F2F2 background - its text stays the
   same regular weight/color as every other row (the design also shows a
   radio-circle + checkmark for selection, intentionally left out per
   explicit instruction). */
.indicator-option-item {
  padding: 0;
  border-bottom: 1px solid var(--clr-gray-light);
}

.indicator-option-item:last-child {
  border-bottom: none;
}

.indicator-dropdown-option {
  all: unset;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--sp3);
  line-height: 1.4286 !important;
  height: auto !important;
  color: var(--clr-gray-dark);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.indicator-dropdown-option:hover,
.indicator-dropdown-option:focus-visible,
.indicator-dropdown-option.selected {
  color: var(--clr-gray-dark);
  background: var(--clr-gray-100);
}

/* country search - collapsed to a plain round icon button by default (matches
   the Figma top section), expands into the full input pill once opened/
   focused/holding a selection. Width/padding transition between the two
   states instead of a hard display toggle, so the icon stays in place. */
.country-search {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 38px;
  height: 38px;
  background: var(--control-bg);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-22);
  padding: 0;
  /* No overflow clipping here at all - mixing overflow-x:hidden with
     overflow-y:visible doesn't stay visible (CSS Overflow spec: the
     visible axis computes to auto whenever the other isn't visible). That
     silently turned this into a real scroll container, and the absolutely
     positioned suggestions panel below it (top:100%) counted as scrollable
     overflow content - showing a phantom scrollbar on the collapsed pill
     and clipping the dropdown itself once opened. The collapsed input is
     already width:0/opacity:0 so there's nothing left to clip anyway. */
  overflow: visible;
  transition:
    width 0.2s ease,
    padding 0.2s ease,
    background-color 0.2s ease,
    border-radius 0.2s ease;
}

/* Same hover treatment as .impact-download-wrapper's download button
   (white fill, white border, dark icon) - :not()s keep it off while
   expanded/open, which already has its own background/border states
   below. */
.country-search:hover:not(:focus-within):not(.open-dropdown):not(.has-selection):not(.search-open) {
  background: var(--tab-active-bg);
  border-color: var(--tab-active-bg);
}

.country-search:hover:not(:focus-within):not(.open-dropdown):not(.has-selection):not(.search-open) .country-search__icon-btn {
  color: var(--tab-active-text);
}

.country-search:focus-within,
.country-search.open-dropdown,
.country-search.has-selection,
.country-search.search-open {
  width: 280px;
  justify-content: space-between;
  gap: var(--sp3);
  background: var(--control-bg);
  padding: var(--sp3) var(--sp6);
}

/* Same treatment as .indicator-select__trigger's open state: becomes the
   flat-bottomed cap of the suggestions panel directly beneath it. Border
   stays primary (not transparent) - same reasoning as that rule. */
.country-search.open-dropdown {
  background: var(--control-bg);
  border-color: var(--control-border);
  border-radius: var(--radius-22) var(--radius-22) 0 0;
}

.country-search__input {
  all: unset;
  /* No flex-grow while collapsed - `flex:1`'s basis:0% still lets it grab
     the box's leftover space (icon + gap gone to 0) even at width:0,
     which was shoving the icon off-center. Only grows once expanded. */
  flex: 0 1 0%;
  width: 0;
  min-width: 0;
  opacity: 0;
  text-align: left;
  color: var(--control-text);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  transition:
    width 0.2s ease,
    opacity 0.2s ease;
}

.country-search:focus-within .country-search__input,
.country-search.open-dropdown .country-search__input,
.country-search.has-selection .country-search__input,
.country-search.search-open .country-search__input {
  flex: 1 1 auto;
  width: auto;
  opacity: 1;
  color: var(--control-text);
}

.country-search__input::placeholder {
  color: var(--control-text);
}

.country-search:focus-within .country-search__input::placeholder,
.country-search.open-dropdown .country-search__input::placeholder,
.country-search.has-selection .country-search__input::placeholder,
.country-search.search-open .country-search__input::placeholder {
  color: var(--control-text);
}

.country-search__icon-btn {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Fills the collapsed 38px circle (.country-search's own width/height)
     so the whole visible pill is clickable, not just the small search-icon
     glyph centered inside it - was previously unsized, shrinking the hit
     area down to the icon's own bounding box. Reset back to auto once
     expanded below, where the pill's padding already carves out room and a
     fixed 38px would overflow its shorter content-box height. */
  width: 38px;
  height: 38px;
  color: var(--control-text);
  cursor: pointer;
}

/* Same generic body button:hover bleed already worked around on
   .indicator-select__trigger above - it wins on hover regardless of this
   button's own :unset base state, painting an unrelated site-wide
   background/border color over what should stay a bare icon button. */
.country-search__icon-btn:hover {
  background: transparent;
  border-color: transparent;
}

.country-search:focus-within .country-search__icon-btn,
.country-search.open-dropdown .country-search__icon-btn,
.country-search.has-selection .country-search__icon-btn,
.country-search.search-open .country-search__icon-btn {
  width: auto;
  height: auto;
  color: var(--control-text);
}

/* Same generic body button:focus bleed as the :hover fix above - once the
   search is open, focusing the icon-btn itself (reset/search-toggle)
   shouldn't paint the site-wide focus background over it. */
.country-search:focus-within .country-search__icon-btn:focus,
.country-search.open-dropdown .country-search__icon-btn:focus,
.country-search.has-selection .country-search__icon-btn:focus,
.country-search.search-open .country-search__icon-btn:focus {
  background: transparent;
}

.country-search__icon {
  display: none;
}

.country-search__icon--search {
  display: flex;
}

.country-search.has-selection .country-search__icon--search {
  display: none;
}

.country-search.has-selection .country-search__icon--reset {
  display: flex;
}

/* opacity/pointer-events (not display/hidden) drive visibility - same
   mechanism as .indicators-dropdown-content - because the wrap now carries
   its own padding: if display:none on the inner <ul> were the only thing
   hiding this card, the wrap's padding would still reserve its box (padding
   applies regardless of a child's display), showing an empty white card by
   default. */
.country-search__suggestions-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: var(--sp3);
  background: var(--clr-white);
  padding: var(--sp6) var(--sp6) var(--sp10);
  border-radius: var(--radius-22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.country-search.open-dropdown .country-search__suggestions-wrap {
  margin-top: 0;
  border-radius: 0 0 var(--radius-22) var(--radius-22);
  opacity: 1;
  pointer-events: unset;
}

/* Padding lives on the wrap above (non-scrolling), not here - mirrors
   .indicators-dropdown-content/.indicators-dropdown-list exactly, so the
   scrollbar sits inset from the card edge by the wrap's own padding instead
   of rendering flush against it. padding:0 zeroes the <ul>'s own UA-default
   left indent (~40px) - this ul has no p-0 utility class in markup (removed
   earlier: its !important conflicted with padding this element used to
   carry directly), so without this it stacks on top of the wrap's padding. */
.country-search__suggestions {
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
  text-align: left;
}

/* Mirrors .indicator-dropdown-option exactly (Figma 82:886) - same card
   padding/radius, row divider, and #F2F2F2-only selection highlight, no
   radio-button indicator. */
.country-search__suggestions>li {
  border-bottom: 1px solid var(--clr-gray-light);
}

.country-search__suggestions>li:last-child {
  border-bottom: none;
}

.country-search__option {
  all: unset;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--sp3);
  color: var(--clr-gray-dark);
  font-size: var(--fs-14);
  line-height: 1.4286 !important;
  height: auto !important;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.country-search__option:hover,
.country-search__option:focus-visible {
  color: var(--clr-gray-dark);
  background: var(--clr-gray-100);
}

/* right area */
.selected-priority-indicator-field {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--sp3);
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--clr-white);
}

.selected-priority-indicator-unit {
  display: none;
}

/* positioning parent for .monitoring-legends (absolute, left:0/top:0) -
   now a sibling of .imapct-map-outer inside here, not .monitoring-results-
   impact-right. */
.monitoring-results-section {
  position: relative;
}

/* flat world map (replaces the fixed-square globe) */
#impact-map-container {
  width: 100%;
  aspect-ratio: var(--map-aspect-ratio);
  height: auto;
}

.imapct-map-outer {
  position: relative;
  max-width: var(--map-max-width);
  margin: 0 auto;
}

/* Highmaps zoom controls (+/-) - base sizing/centering comes from JS
   (mapNavigation.buttonOptions' symbolSize/symbolX/symbolY in
   monitoring-results-impact.js - symbolX/Y were using the wrong
   reference box, which was the actual cause of the right-edge clip, not
   this transform). Hover colors are JS too (real navButtons element
   references), not a CSS :hover guess - two different CSS selector
   guesses for it never fired. */
.monitoring-results-impact-module .highcharts-map-navigation .highcharts-button {
  cursor: pointer;
}

/* .highcharts-button-disabled is toggled on the zoom-out button by hand
   (monitoring-results-impact.js, syncZoomOutDisabled()) at min zoom -
   Highcharts' own built-in toggle never actually fires in this build. */
.highcharts-button-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.monitoring-results-impact-module .highcharts-button-symbol {
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: scale(0.7);
  transform-origin: 14px 14px;
}

/* Sits in a row next to .country-search now, not pinned to the map
   section's own corner - see .country-search-row. */
.country-search-row {
  display: flex;
  align-items: center;
  gap: var(--sp3);
}

.impact-download-wrapper {
  display: flex;
  align-items: center;
}

/* Matches .country-search's collapsed size/shape (38x38 circle, 1px cyan
   border) now that it sits right next to it in .country-search-row. Icon
   is a local copy (arrow only, no baked-in circle - this wrapper already
   draws its own circle, the shared elements/icons SVGs come with one
   baked in and would double up).
   background-image is set locally below instead of relying solely on
   icons.css's generic .icon--right:after rule - keeps the --icon/
   --icon-hover declaration and their url()s' consumption in the same
   stylesheet, so relative path resolution can't depend on which file
   ends up winning the cascade. */
.impact-download-wrapper .download-dataset {
  --icon-text-gap: 0;
  --icon-width: 18px;
  --icon-height: 18px;
  --icon: url(/themes/custom/gff/templates/components/monitoring-results-impact/css/../img/download-arrow-black.svg) !important;
  --icon-hover: url(/themes/custom/gff/templates/components/monitoring-results-impact/css/../img/download-arrow-white.svg) !important;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background-color: var(--control-bg);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-22);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.impact-download-wrapper .download-dataset:hover {
  background-color: var(--tab-active-bg);
  border-color: var(--tab-active-bg);
}

.impact-download-wrapper .download-dataset:after {
  background-image: var(--icon);
}

.impact-download-wrapper .download-dataset:hover:after {
  background-image: var(--icon-hover);
}


/* Floats as its own card pinned to the left edge, off the
   .monitoring-results-impact-right ancestor (position:relative). A
   display:grid + position:sticky version of this was tried (to keep the
   legend in view while scrolling a tall map) but reverted — it changed
   .imapct-map-outer from a plain block child to a grid item, which
   affected the map's own measured width/size at Highcharts init time
   and broke the page layout. Back to the original plain absolute
   overlay; the "stays visible while scrolling" behavior needs a
   different (JS-based, not CSS Grid) approach if revisited. */
.monitoring-legends {
  position: absolute;
  left: 0;
  bottom: 50px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp3);
  max-width: 265px;
  padding: 15px;
  background: var(--legend-bg);
  border-radius: 10px;
  /* Figma-specific legend tuning, kept here rather than in the shared
     coloraxis-legends-2 component (elements/chart/coloraxis-legends-2) so it
     doesn't affect other charts using that same shared legend. */
  --axis-width: 215px;
  --bar-height: 10px;
  /* Same reasoning: the visible bar (.color-area-positive) paints from
     this variable, not from the map's own colorAxis config (JS) - it's a
     static decorative gradient, not actually data-driven. Shared file's
     :root default is a flat transparent->red fade; overridden here to the
     new 6-stop data-* scale, scoped to this component only. */
  --gradient-positive-only: linear-gradient(to right,
      var(--data-low) 0%,
      var(--data-mid-low) 20%,
      var(--data-mid) 40%,
      var(--data-mid-high) 60%,
      var(--data-high) 80%,
      var(--data-very-high) 100%);
}

/* Stacked (gradient bar above the no-data swatch), not side-by-side - the
   card is narrow/floating now, not a full-width row. */
.monitoring-legends .map-legends.legends__container {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp3);
}

.monitoring-legends .color-axis-values .value-label {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: var(--fw-normal);
}

/* .map-custom-legend (wraps the "not reporting"/partner/eligible swatch
   items) had no desktop rule at all - only -max-767.css set display:flex,
   so above that breakpoint the items fell back to block and stacked
   vertically instead of sitting in a row. */
.monitoring-results-impact-module .map-custom-legend {
  display: flex;
  align-items: center;
  gap: 0 var(--sp6_75);
  flex-wrap: wrap;
}

.monitoring-legends .map-legends .legend-item {
  align-items: center;
}

.monitoring-legends .legend-item .serieName {
  font-size: var(--fs-13);
  font-weight: var(--fw-normal);
}

.monitoring-legends.color-axis_layout-1 .legend-item .symbol {
  flex-shrink: 0;
  border: 1px solid #ffffff;
}

/* map hover tooltip */
.map-tooltip {
  display: flex;
  flex-direction: column;
  gap: var(--sp2);
  min-width: 160px;
  padding: var(--sp3) var(--sp4);
  background: var(--clr-white);
  border-radius: var(--radius-8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-family: var(--primary-ff);
  pointer-events: none;
}

.map-tooltip__header {
  display: flex;
  align-items: center;
  gap: var(--sp2);
}

.map-tooltip__type {
  display: flex;
  align-items: center;
  gap: var(--sp2);
}

.map-tooltip__type-dot {
  /* background/border set inline per-point (white/blue, partner/eligible) -
     see the tooltip formatter's typeDotStyle. border:none!important below
     overrides that inline border for good, independent of per-point type. */
  width: 8px;
  height: 8px;
  border-radius: 100%;
  flex-shrink: 0;
  margin-top: -1px;
  border: none !important;
}

.map-tooltip__type-label {
  font-size: var(--fs-11);
  font-weight: var(--fw-bold);
  color: var(--clr-blue);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.map-tooltip__flag {
  width: 22px;
  height: 15px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--clr-gray-light);
}

.map-tooltip__name {
  font-size: var(--fs-13);
  font-weight: var(--fw-bold);
  color: var(--clr-gray-dark);
  text-transform: uppercase;
}

.map-tooltip__indicator-label {
  font-size: var(--fs-11);
  font-weight: var(--fw-semibold);
  color: var(--clr-gray-dark);
}

.map-tooltip__value {
  display: flex;
  align-items: center;
  gap: var(--sp2);
  min-width: 0;
}

.map-tooltip__number {
  font-size: var(--fs-20);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--clr-gray-dark);
}

.map-tooltip__divider {
  width: 1px;
  height: 16px;
  flex-shrink: 0;
  background: var(--clr-gray-dark);
}

.map-tooltip__unit {
  display: block;
  font-size: var(--fs-11);
  line-height: 1.3;
  max-width: 110px;
  min-width: 0;
  white-space: normal;
  color: var(--clr-gray-dark);
}

.map-tooltip__no-data {
  font-size: var(--fs-12);
  font-style: italic;
  color: var(--clr-gray-600);
}

.map-tooltip__wasting-text {
  font-size: 12px;
  font-style: italic;
  color: var(--clr-gray-dark);
}
