.imapct-map-outer {
  max-width: none;
}

.country-search {
  max-width: 300px;
}

/* Absolute/bottom-right from 1200px down through tablet (768px) -
   position:static only kicks in below that, in -max-767.css. */
.impact-download-wrapper {
  top: auto;
  bottom: 56px;
  transform: none;
}

/* Title/desc beside the controls column (base desktop layout) only has
   room down to ~1200px - below that the controls column's own min-content
   (indicator pill + view toggle + search icon) squeezes the text column
   uncomfortably narrow before the -max-991.css stack kicked in. Pulling
   that same stack up to this breakpoint instead gives the text its own
   full-width row all the way down to 992px, with nothing left to overflow
   or squeeze - -max-991.css's own narrower tweaks (indicator-select
   column, 300px trigger) still only start where they already did, since
   the controls row has plenty of width to stay inline once it's no longer
   sharing the row with the text column.
   margin-bottom trimmed a little from the base desktop value - the stacked
   title+desc+controls block is already taller than the single-row desktop
   header, so it doesn't need quite as much air below it on top of that -
   but not trimmed all the way down, or the block reads cramped against
   the map below it. */
.monitoring-impact-top {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: var(--sp6);
}

/* Base markup nests two rows inside this wrapper (.monitoring-impact-
   controls for indicator+toggle, .country-search-row for search+download)
   stacked in a column - a mobile-only necessity (-max-767.css keeps that
   stack, everything full-width there). Enough row width through most of
   this range to keep both rows side by side instead, cutting a whole
   extra row of height out of the stacked header - narrower widths in this
   same range still wrap the two rows (country-search is always its full
   280px open width now, not the old collapsed-38px/expanded-280px toggle),
   which is fine: a static 2-row wrap, not the dynamic reflow-on-focus
   "jump" that used to happen. gap bumped up from the base 10px so those
   two rows (merged or wrapped) read as a deliberate pair, not crowded. */
.monitoring-impact-top__controls {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  gap: var(--sp4);
}

/* Boxed "card" treatment for the indicator+toggle row, 768-1199px only -
   a pale teal panel with the two controls on one line, separated by a
   vertical divider instead of the desktop's bare row. Scoped above 767px
   deliberately: -max-767.css stacks this same row into a column for true
   mobile (its own long-established layout, no reference for a boxed/
   divided look at that width), and a left-border divider would read as a
   stray line once the row goes vertical. */
@media (min-width: 768px) {

  /* gap:0 here - the divider's own margin/padding (on .monitoring-impact-
     view-toggle below) does the spacing instead, so there's exactly one
     gap, not two stacked ones. nowrap + indicator-select flexing to fill
     the leftover width keeps this a single row at every width in this
     range; the toggle's own min-width/button sizes stay fixed. */
  .monitoring-impact-controls {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    background: #bee9e6;
    border-radius: var(--radius-xs);
    padding: var(--sp6) var(--sp7);
  }

  .monitoring-impact-controls .indicator-select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .monitoring-impact-controls .indicator-select__pill-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }

  .monitoring-impact-controls .indicator-select__trigger {
    width: 100%;
  }

  /* Divider between the two controls - margin/border/padding instead of a
     dedicated element, so no twig change is needed for it. */
  .monitoring-impact-controls .monitoring-impact-view-toggle {
    flex-shrink: 0;
    margin-left: var(--sp7);
    padding-left: var(--sp7);
    border-left: 1px solid var(--clr-gray-400);
  }

  /* Dark label inside the boxed panel - the teal label color desktop uses
     reads muddier against this panel's own teal-tinted background. */
  .monitoring-impact-controls .indicator-select__label {
    color: var(--clr-gray-dark);
  }
}

.country-search-row {
  width: 100%;
  justify-content: flex-end;
}

/* Always-expanded search pill below 1200px - not the icon-only,
   tap-to-reveal collapse desktop uses to save row width. Same values the
   interactive :focus-within/.has-selection/.search-open states already
   use (base stylesheet), just applied unconditionally so this row doesn't
   need user interaction to show the input. -max-767.css already did this
   for mobile with its own 100%-width variant; this covers the gap above
   it down to 768px.
   flex:1 (not a flat 280px) - .country-search-row above is width:100%/
   justify-content:flex-end, so a fixed 280px pill left most of that full-
   width row empty to its left instead of filling it (reported, screenshot
   - looked like an isolated narrow box floating at the row's right edge,
   not matching the full-width indicator/toggle controls above it). The
   1024-1199px sub-range below still pins its own narrower 200px +
   flex-shrink:0 - that's a different layout (search shares a row with the
   indicator/toggle controls there via a border-left divider, not alone on
   its own full-width row), unaffected by this. */
.country-search {
  flex: 1 1 auto;
  width: auto;
  justify-content: space-between;
  gap: var(--sp3);
  padding: var(--sp3) var(--sp6);
}

/* Text/placeholder color here mirrors the same interactive states' own
   .country-search__input color (gray-dark) - those rules are scoped to
   :focus-within/.has-selection/.search-open specifically, which this
   always-open look doesn't necessarily carry, so without this the input
   would render in the collapsed state's white text/placeholder - invisible
   against the page's white background. */
.country-search__input {
  flex: 1 1 auto;
  width: auto;
  opacity: 1;
  color: var(--clr-gray-dark);
}

.country-search__input::placeholder {
  color: var(--clr-gray-dark);
}

.country-search__icon-btn {
  color: var(--clr-gray-dark);
  width: 18px;
}

/* The magnifying-glass icon's only job was signalling "tap to open" on
   the collapsed pill - redundant once the input is always open. The reset
   (X) icon keeps its existing .has-selection-gated visibility unchanged,
   still needed to clear a selected country. */
.country-search__icon--search {
  display: none;
}

/* Base stylesheet's solid-fill hover (whole box turns primary-colored,
   icon turns white) is a collapsed-circle-button affordance - it still
   fires here since it's keyed off real interaction state classes
   (:not(:focus-within) etc.), none of which this always-open bar
   necessarily carries. Same selector, neutralized back to the plain
   outlined look so hovering the open 280px bar doesn't suddenly paint it
   solid. */
.country-search:hover:not(:focus-within):not(.open-dropdown):not(.has-selection):not(.search-open) {
  background: transparent;
  border-color: var(--clr-primary);
}

.country-search:hover:not(:focus-within):not(.open-dropdown):not(.has-selection):not(.search-open) .country-search__icon-btn {
  color: var(--clr-gray-dark);
}

/* 1024-1199px: indicator+toggle+search+download all sit inside ONE teal
   card. .monitoring-impact-controls (indicator+toggle) and .country-
   search-row (search+download) are the two DOM children of this wrapper -
   moving the card's background/padding/radius up to the wrapper itself
   (instead of just .monitoring-impact-controls, as the 768px version
   above does) makes it wrap both groups together, one shared box. Scoped
   above 1023px deliberately: the 768-1023px slice keeps the simpler
   two-piece version this file already builds above. */
@media (min-width: 1024px) {

  /* gap:0 - the two dividers below (margin+padding+border-left, same
     technique both times) now fully control the spacing on either side
     of themselves, so there's exactly one gap per divider, not a parent
     gap stacked on top of it. */
  .monitoring-impact-top__controls {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    background: #bee9e6;
    border-radius: var(--radius-xs);
    padding: var(--sp6) 15px;
  }

  /* No longer its own box - the wrapper above carries the background/
     padding/radius now. flex:1 (not the 768px version's width:100%)
     lets it share the row with .country-search-row instead of claiming
     the full width for itself. */
  .monitoring-impact-controls {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    background: transparent;
    padding: 0;
    border-radius: 0;
  }

  /* Divider margin/padding (both this one and the view-toggle's own,
     overridden to match below) tightened to 15px from the earlier 25px
     (var(--sp7)) value. */
  .monitoring-impact-controls .monitoring-impact-view-toggle {
    margin-left: 15px;
    padding-left: 15px;
  }

  /* Divider before the search pill lives here (margin-left/padding-left/
     border-left), not on .country-search itself - that element is a fully
     rounded pill (border-radius 22px), so a border-left on it curves into
     the corners instead of reading as a clean straight line. This wrapper
     has no radius, so its left edge is a true straight pipe the full
     height - same margin+padding values as .monitoring-impact-view-
     toggle's own divider above, so both dividers read as equal gaps.
     width:auto overrides this same selector's width:100% set earlier in
     this file (valid when this row had its own full-width line below the
     controls card; now it shares one nowrap row with that card instead). */
  .country-search-row {
    width: auto;
    flex-shrink: 0;
    gap: 15px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid var(--clr-gray-400);
  }

  /* Narrower than the 280px always-open default elsewhere in this file -
     this row is now sharing space with the indicator+toggle box instead
     of having the full row to itself. */
  .country-search {
    flex-shrink: 0;
    width: 200px;
  }

  /* The magnifying-glass icon was hidden file-wide (search is always
     open, the icon's "tap to open" job is redundant) - shown again here
     specifically, matching this reference. */
  .country-search__icon--search {
    display: flex;
  }
}
