/* t2030  */
.page-main-chapter--t2030 {
  --sp-large: 60px;
}

.page-main-chapter--t2030 .resources__themes,
.page-main-chapter--t2030 .about-data {
  background: transparent;
  padding: 0;
}

.page-main-chapter--t2030 .section-view-content:not(:has(.popup-component.is-active))>* {
  position: relative;
  z-index: 1;
}

.page-main-chapter--t2030 .page-main-chapter__inner .sub-chapers-grouping .sub-chaper {
  border: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.page-main-chapter--t2030 .page-main-chapter__inner .sub-chapers-grouping .sub-chaper:not(:last-child) {
  margin-bottom: 24px;
}

.page-main-chapter--t2030 .normal-content-module+.sub-chapers-grouping {
  margin-top: var(--sp6);
}

/* Banner: minimum height = the design's rendered banner card (578px at
   1440). Selector outranks banner.css's `.t2030-banner__card.hero-banner`
   (min-height: 400px), which loads after this file. */
.hero-banner-module .t2030-banner__card.hero-banner {
  min-height: 578px;
}

/* Up to 991px the site's fixed secondary nav (grey EXPLORE bar) sits
   right under the header and covered the top of the banner. Push the
   banner down by the bar's height so it is fully visible. */
@media (max-width: 991px) {
  .hero-banner-module .t2030-banner {
    margin-top: 50px;
  }
}

@media (max-width: 767px) {
  .hero-banner-module .t2030-banner {
    margin-top: 44px;
  }

  /* Enlarge popups below 767px: shared across every card using this
     popup's Sort by/Show controls (mnch/mortality, srhr/gender,
     shared-components/trend-panel, adolescent/indicators - same set
     listed above for the __seg--radio/__seg--select display swap) - by
     suffix/literal-class once here instead of repeating per component.
     Per-component gap value on [class$="__controls"] (differs - e.g.
     trend-panel's own 12px 15px vs others' plain 12px) stays in each
     component's own CSS, not generalized here. */
  .page-main-chapter--t2030 .popup-component .popup-download-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-main-chapter--t2030 .popup-component [class$="__controls"] {
    width: 100%;
  }

  .page-main-chapter--t2030 .popup-component [class$="__select-wrap"] {
    width: 100%;
  }

  .page-main-chapter--t2030 .popup-component [class$="__seg--select"] {
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    width: 100%;
  }
}

/* ---------- enlarge popups: no leftover space under short content ----------
   Shared "enlarge" popup shell (popup-component > popup-inner-section >
   popup-content > popup-content-inner > chart-wrap/table-wrap) is reused
   as-is by every card across continuum, equity, mortality, death, feeding,
   survival, indicators, indicator-count, gender, family-planning and
   trend-panel - each one just MOVES its own chart/table into this same
   markup rather than building its own popup. None of those components'
   own CSS constrains this shell's height, so a chart/table shorter than
   the shell's own sizing leaves a visible gap under the content instead
   of the popup shrinking to fit it. Size every layer by its content here,
   once, instead of repeating this per component. */
.page-main-chapter--t2030 .popup-component .popup-inner-section,
.page-main-chapter--t2030 .popup-component .popup-content,
.page-main-chapter--t2030 .popup-component .popup-content-inner {
  height: auto;
}

.page-main-chapter--t2030 .popup-component .chart-wrap,
.page-main-chapter--t2030 .popup-component .table-wrap {
  height: auto;
  min-height: 0;
}

/* ---------- enlarge popups: pill dropdowns over segmented buttons -------
   Several cards (mnch/mortality, srhr/gender, shared-components/trend-panel,
   adolescent/indicators so far) offer the same Sort by/Show/View control
   twice: a segmented button group for wide inline layouts (BEM suffix
   __seg--radio) and a teal pill <select> that the same component's own CSS
   already shows below a ~720px container width (BEM suffix __seg--select) -
   same underlying control/JS either way. The enlarge popup is wide, so that
   narrow-container swap never fires there and the segmented buttons show
   instead; force the pill variant there too, by suffix so any component
   following this same naming picks it up for free. */
.page-main-chapter--t2030 .popup-component [class$="__seg--radio"] {
  display: none;
}

.page-main-chapter--t2030 .popup-component [class$="__seg--select"] {
  display: flex;
}
