.monitoring-results-impact-module {
  --map-max-width: calc(100vw - var(--sp14) - var(--sp14));
}

.monitoring-results-impact {
  padding-left: var(--sp6);
  padding-right: var(--sp6);
}

/* -max-1199.css merges this wrapper's two rows (controls, country-search)
   side by side for tablet's extra width - back to a stacked column here,
   same as the original mobile layout. */
.monitoring-impact-top__controls {
  flex-direction: column;
  width: 100%;
}

/* Same boxed "card" treatment -max-1199.css uses for tablet (768-1199px),
   minus the divider: that version keeps indicator+toggle on one row
   separated by a vertical line, but this stays the existing stacked
   column here, so a side-by-side divider has nothing to sit between. */
.monitoring-impact-controls {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: var(--sp5);
  background: #bee9e6;
  border-radius: var(--radius-xs);
  padding: var(--sp6) 18px;
}

/* Dark label inside the boxed panel - same reasoning as the tablet
   version in -max-1199.css: the teal label color desktop uses reads
   muddier against this panel's own teal-tinted background. */
.indicator-select__label {
  color: var(--clr-gray-dark);
}

.monitoring-impact-view-toggle {
  margin: 0 auto;
}

.indicator-select {
  width: 100%;
  justify-content: space-between;
}

.country-search,
.country-search:focus-within,
.country-search.open-dropdown,
.country-search.has-selection {
  width: 100%;
  justify-content: space-between;
  padding: var(--sp3) var(--sp6);
}

.country-search {
  /* display:flex, not block - the sibling rule just above sets
     justify-content:space-between on this same element, a no-op under
     block layout. Under block, .country-search__input/__icon-btn (both
     inline-level by default) flowed like text instead: a long country
     name filled the row and wrapped the icon-btn (search/reset icon) onto
     its own line below, overlapping the pill's rounded bottom border
     (reported, screenshot) instead of staying docked to the row's right
     edge. */
  display: flex;
  flex: 1;
  width: auto;
}

/* Icon-only collapse is a desktop space-saving trick (room for other
   controls beside it) - no such constraint on a full-width mobile row, so
   the input stays visible instead of needing a tap to reveal it. */
.country-search__input {
  width: auto;
  opacity: 1;
}

/* The tablet breakpoint (max-991) fixes this at 300px for the two-up
   layout there - orphaned at that width once .indicator-select itself goes
   full-width here, leaving the button narrow inside its now much wider
   wrapper. */
.indicator-select__trigger {
  width: 100%;
}

/* Floating pinned to the left edge (desktop/tablet) is too cramped once
   the map/section itself shrinks to mobile width - drop back to a static,
   centered card below the map instead. */
.monitoring-legends {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  align-items: center;
  max-width: 500px;
  margin: var(--sp5) auto 0;
}

.monitoring-legends .map-legends.legends__container {
  align-items: center;
  gap: var(--sp6);
}

.monitoring-results-impact-module .map-custom-legend {
  display: flex;
  gap: 10px 15px;
  flex-wrap: wrap;
}

/* Same specificity (2 classes) as the shared elements/chart/coloraxis-
   legends-2/legend.css's .color-axis_layout-1 .color-axis-block{width:var(
   --axis-width)} rule, which loads AFTER this file in stories.html/twig -
   ties resolve by source order, so the shared rule was winning and this
   never actually took effect. Both classes already live on the same
   ancestor element (.monitoring-legends.color-axis_layout-1), so combining
   them here bumps specificity to 3 classes without needing !important.
   max-width:none additionally beats elements/chart/coloraxis-legends-2/
   legend-max-576.css's `.color-axis_layout-1 .color-axis-block{max-width:
   var(--axis-width)}` (also 2 classes, only active at <=576px) - same
   specificity-tie situation, same fix. */
.monitoring-legends.color-axis_layout-1 .color-axis-block {
  width: 100%;
  max-width: none;
}

.indicator-dropdown-placeholder {
  font-size: var(--fs-15);
  line-height: 1.3 !important;
}

/* Same theme-bleed issue, no existing rule/class to attach the fix to. */
.country-search__icon-btn {
  width: auto;
  height: auto !important;
  line-height: normal !important;
}

/* Inline beside the search bar (.country-search-row's own flex row
   already lays them out side by side) instead of its own centered
   full-width row below - matches the current reference. Desktop's
   absolute positioning still needs clearing here regardless. */
.impact-download-wrapper {
  position: static;
  top: auto;
  bottom: auto;
  transform: none;
}
