/* t2030-indicators - Adolescent Health "What countries track" section body:
   the "Adolescent indicators by country and domain" matrix card with the
   "What the frameworks show" aside. Section header and the light (#EEF2F6)
   backdrop are rendered by the master twig.

   Design colors matched to tokens where exact: #4D4D4D --clr-gray-dark,
   #DBDBDB --clr-gray-light, #21568C --clr-blue, #1FA29C --clr-teal-500,
   #F8B323 --clr-yellow-orange. No token for the rest - scoped below. */
.t2030-indicators {
  --in-ink: var(--clr-gray-dark, #4d4d4d);
  --in-muted: #6b6b6b;
  --in-border: var(--clr-gray-light, #dbdbdb);
  --in-row-line: #f3f5f7;
  --in-navy: var(--clr-blue, #21568c);
  --in-teal: var(--clr-teal-500, #1fa29c);
  --in-gold: var(--clr-yellow-orange, #f8b323);
  --in-title: #15766f;
  --in-seg-bg: #e3e3e3;
  --in-row-hover: #edf5f5;
  --in-aside-bg: #eef2f6;
  --in-cols: 6;
  --in-name-w: 176px;
  --in-total-w: 56px;
  --in-min-w: 680px;
  --in-th-bg: #efefef;

  min-width: 0;
  font-family: var(--primary-ff, 'Poppins', sans-serif);
  color: var(--in-ink);
}

.t2030-indicators [hidden] {
  display: none !important;
}

/* ---------- top download ---------- */
.t2030-indicators__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.t2030-indicators__toolbar-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 33px;
}

/* Site visualisation.css positions every .share-download-options absolutely
   (align-top: top -40px, right 0), which lifts the bar into the section
   header and the card up under it on Drupal pages. Keep it in flow here. */
.t2030-indicators__toolbar-top .share-download-options {
  position: static;
  inset: auto;
  padding: 0;
}

/* Site download chrome (share-download-options) is styled by the site; only
   the hover/focus reveal is needed for it to function standalone. Icon/
   label colour is NOT set here - reusing the exact same .icon--download/
   .text-icon-clr1 markup as MNCH (mnch/death, mnch/mortality) means the
   master twig's own section wrapper (.odd-even-style,
   base/odd-even-styles/odd-even-styles.css + elements/icons/icons.css)
   already supplies the right colour per section, light or dark, with no
   per-component override needed. */
.t2030-indicators .options-field {
  position: relative;
}

.t2030-indicators .maximize-popup,
.t2030-indicators .icon--download {
  cursor: pointer;
}

.t2030-indicators .options-field-list {
  display: none;
  /* Site chrome positions this flush against the download icon (top:100%,
     no gap) - adds visible space between them. */
  margin-top: var(--sp2, 8px);
}

.t2030-indicators .options-field:hover .options-field-list,
.t2030-indicators .options-field:focus-within .options-field-list {
  display: block;
}

/* ---------- card ---------- */
.t2030-indicators__card {
  min-width: 0;
  background: var(--clr-white, #fff);
  border: 0;
  border-radius: 0 24px 0 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.t2030-indicators__title-row {
  display: flex;
  /* nowrap - see gender.css's own comment on this exact rule: a wrapping
     outer row can strand .card-actions alone on its own line, where
     justify-content:space-between collapses it to the start (left)
     instead of staying pinned right. .title-group wraps title/sub
     internally instead. */
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.t2030-indicators__title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  min-width: 0;
}

.t2030-indicators__card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

/* Site visualisation.css (loaded on Drupal pages) positions every
   .visualization-actions-block absolutely (top/right of its card). Here the
   Enlarge button sits in the title-row flex row, so keep it in flow. */
.t2030-indicators__card-actions .visualization-actions-block {
  position: static;
  inset: auto;
}

.t2030-indicators__divider {
  width: 1px;
  height: 30px;
  background: var(--in-teal);
}

.t2030-indicators__title {
  margin: 0;
  font-size: var(--fs-20, 20px);
  line-height: 1.35;
  font-weight: var(--fw-bold, 700);
  color: var(--in-title);
}

.t2030-indicators__sub {
  margin: 0 0 0 16px;
  padding-left: 16px;
  border-left: 2px solid var(--in-teal);
  font-size: var(--fs-14, 14px);
  line-height: 1.5;
  color: var(--in-ink);
}

.t2030-indicators__body {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.t2030-indicators__chart-col {
  flex: 2 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  container-type: inline-size;
}

/* ---------- sort (radios; teal select when the column is narrow) ---------- */
.t2030-indicators__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}

.t2030-indicators__seg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.t2030-indicators__seg--select {
  display: none;
}

.t2030-indicators__seg-label {
  font-size: var(--fs-14, 14px);
  font-weight: var(--fw-bold, 700);
  color: var(--in-ink);
}

.t2030-indicators__seg-group {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--in-seg-bg);
  border-radius: 999px;
}

/* The site's button.css sets `body button:hover, body button:focus` to
   teal bg + white text, which beats this one-class rule. Applying the
   base colours to :hover/:focus too keeps them; the state rules below
   (hover / checked / selected) still win. */
.t2030-indicators__seg-btn,
.t2030-indicators__seg-btn:hover,
.t2030-indicators__seg-btn:focus {
  white-space: nowrap;
  font: inherit;
  font-size: var(--fs-13, 13px);
  font-weight: var(--fw-semibold, 600);
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--in-ink);
  cursor: pointer;
}

.t2030-indicators__seg-btn[aria-checked="false"]:hover {
  background: var(--clr-white, #fff);
}

.t2030-indicators__seg-btn[aria-checked="true"] {
  background: var(--in-teal);
  color: var(--clr-white, #fff);
}

.t2030-indicators__select-wrap {
  position: relative;
  display: flex;
}

.t2030-indicators__select {
  font: inherit;
  font-size: var(--fs-14, 14px);
  font-weight: var(--fw-bold, 700);
  min-height: 40px;
  padding: 0 42px 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--in-teal);
  color: var(--clr-white, #fff);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.t2030-indicators__select option {
  color: var(--in-ink);
  background: var(--clr-white, #fff);
}

.t2030-indicators__select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  margin-top: -9px;
  color: var(--clr-white, #fff);
  pointer-events: none;
}

.t2030-indicators__seg-btn:focus-visible,
.t2030-indicators__select:focus-visible,
.t2030-indicators__scroll:focus-visible {
  outline: 2px solid var(--in-navy);
  outline-offset: 2px;
}

@container (max-width: 720px) {
  .t2030-indicators__seg--radio {
    display: none;
  }

  .t2030-indicators__seg--select {
    display: flex;
  }
}

/* ---------- legend ---------- */
.t2030-indicators__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--fs-13, 13px);
  color: var(--in-ink);
}

.t2030-indicators__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.t2030-indicators__dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--clr-white, #fff);
  border: 2px solid var(--in-border);
  box-sizing: border-box;
}

.t2030-indicators__dot--on {
  background: var(--in-navy);
  border-color: var(--in-navy);
}

.t2030-indicators__fcv {
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--in-teal);
  transform: rotate(45deg);
}

.t2030-indicators__fcv--legend {
  width: 7px;
  height: 7px;
}

/* ---------- matrix ---------- */
.t2030-indicators__scroll {
  border: 1px solid var(--in-border);
  border-radius: 8px;
  background: var(--clr-white, #fff);
  overflow-x: auto;
}

/* No side padding (right was 8px) so each row's / the head's border-bottom
   runs edge to edge, touching the scroll box's right border like it
   already does on the left (QC 452621). Total stays clear of the edge -
   it's centred in its own --in-total-w column. */
.t2030-indicators__matrix {
  min-width: var(--in-min-w);
  padding: 8px 0;
}

.t2030-indicators__head,
.t2030-indicators__row {
  display: grid;
  grid-template-columns: var(--in-name-w) repeat(var(--in-cols), minmax(78px, 1fr)) var(--in-total-w);
  gap: 0 4px;
}

.t2030-indicators__head {
  align-items: end;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--in-border);
}

.t2030-indicators__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.t2030-indicators__col-label,
.t2030-indicators__total-head {
  font-size: var(--fs-11, 11px);
  line-height: 1.25;
  font-weight: var(--fw-bold, 700);
  color: var(--in-ink);
}

.t2030-indicators__total-head {
  text-align: center;
}

.t2030-indicators__col-count {
  font-size: var(--fs-11, 11px);
  color: var(--in-muted);
}

.t2030-indicators__row {
  align-items: center;
  height: 28px;
  border-bottom: 1px solid var(--in-row-line);
  border-radius: 4px;
  cursor: default;
}

.t2030-indicators__row:hover,
.t2030-indicators__row:focus-visible {
  background: var(--in-row-hover);
}

.t2030-indicators__row:focus-visible {
  outline: 2px solid var(--in-navy);
  outline-offset: -2px;
}

.t2030-indicators__name {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  padding-right: 12px;
  font-size: var(--fs-12, 12px);
  color: var(--in-ink);
  white-space: nowrap;
}

.t2030-indicators__name-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.t2030-indicators__cell {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.t2030-indicators__total {
  text-align: center;
  font-size: var(--fs-12, 12px);
  font-weight: var(--fw-bold, 700);
  color: var(--in-ink);
}

.t2030-indicators__source {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--in-border);
  font-size: var(--fs-13, 13px);
  line-height: 1.55;
  color: var(--in-ink);
}

/* ---------- table ---------- */
.t2030-indicators__table-wrap {
  overflow: auto;
  /* border: 1px solid var(--in-border); */
  /* border-radius: 8px; */
}

.t2030-indicators__table {
  width: 100%;
  border-collapse: collapse;
}

.t2030-indicators__table th,
.t2030-indicators__table td {
  text-align: left;
}

.t2030-indicators__table thead th {
  position: sticky;
  top: 0;
}

.t2030-indicators__table .is-num {
  text-align: right;
}

/* ---------- enlarge popup (site chrome; only functional rules here) ---------- */
.t2030-indicators__popup {
  display: none;
}

.t2030-indicators__popup.is-active {
  display: flex;
}

.t2030-indicators__popup .popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 35, 0.55);
  z-index: 55;
}

.t2030-indicators__popup .popup-tab-content {
  display: none;
}

.t2030-indicators__popup .popup-tab-content.is-active {
  display: block;
}

/* indicators.js moves .t2030-indicators__controls into the popup's own
   Download row on enlarge (and back on close), so it sits outside
   .popup-content's scroll area instead of scrolling away with the chart
   rows. Lay the two out as one row: controls on the left, the existing
   Download link on the right. */
.t2030-indicators__popup .popup-download-options {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* justify-content:space-between (instead of this) only positions the
   Download link right when .t2030-indicators__controls is also present -
   on the Table tab, .controls gets hidden (see setView), leaving it as
   the only flex child, which space-between would then place at
   flex-start (left) instead. margin-left:auto keeps it pinned right
   regardless. */
.t2030-indicators__popup .popup-download-options>ul {
  margin-left: auto;
}

.t2030-indicators__popup .t2030-indicators__controls {
  justify-content: flex-start;
  gap: 12px 20px;
}

.t2030-indicators__popup .t2030-indicators__select {
  font-size: 13px;
  min-height: 34px;
}

.t2030-indicators__popup .custom-modal-close-field {
  cursor: pointer;
}

body.indicators-lock-scroll {
  overflow: hidden;
}

/* ---------- "What the frameworks show" aside ---------- */
.t2030-indicators__aside {
  flex: 1 1 280px;
  max-width: 380px;
  align-self: stretch;
  background: var(--in-aside-bg);
  border-radius: 0 20px 0 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.t2030-indicators__aside-title {
  margin: 0;
  font-size: var(--fs-18, 18px);
  line-height: 1.35;
  font-weight: var(--fw-bold, 700);
  color: var(--in-ink);
}

.t2030-indicators__figs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.t2030-indicators__fig {
  margin: 0;
  padding-left: 18px;
  border-left: 3px solid var(--in-gold);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t2030-indicators__fig-value {
  font-size: var(--fs-34, 34px);
  line-height: 1.05;
  font-weight: var(--fw-bold, 700);
  color: var(--in-navy);
}

.t2030-indicators__fig-label {
  font-size: var(--fs-15, 15px);
  line-height: 1.55;
  color: var(--in-ink);
}

.t2030-indicators__close {
  padding-top: 14px;
  border-top: 1px solid var(--in-border);
  font-size: var(--fs-14, 14px);
  line-height: 1.6;
  color: var(--in-ink);
}

.t2030-indicators__close>* {
  margin: 0;
}

.t2030-indicators__close>*+* {
  margin-top: 10px;
}

/* ---------- tooltip ---------- */
.t2030-indicators__tip {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  max-width: 300px;
  padding: 8px 12px;
  background: var(--clr-white, #fff);
  border: 1px solid var(--in-border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(30, 50, 80, 0.18);
  font-size: var(--fs-12, 12px);
  line-height: 1.45;
  color: var(--in-ink);
  pointer-events: none;
}

.t2030-indicators:has(.t2030-indicators__popup.is-active) .t2030-indicators__tip {
  z-index: 100000;
}

.t2030-indicators__tip-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-13, 13px);
}

.t2030-indicators__tip-tag {
  font-size: var(--fs-11, 11px);
  font-weight: var(--fw-bold, 700);
  padding: 1px 6px;
  border-radius: 0 6px 0 6px;
  background: #d5e9e8;
}

.t2030-indicators__tip-note {
  color: var(--in-muted);
}

/* ---------- responsive ---------- */
@media (min-width: 901px) {
  .t2030-indicators__aside {
    position: sticky;
    top: 96px;
    align-self: flex-start;
  }
}

@media (max-width: 1000px) {
  .t2030-indicators__sub {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .t2030-indicators__aside {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .t2030-indicators__popup .t2030-indicators__controls {
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .t2030-indicators {
    --in-name-w: 132px;
    --in-total-w: 44px;
    --in-min-w: 640px;
  }

  .t2030-indicators__seg-btn {
    padding: 0 12px;
  }

  .t2030-indicators__card {
    padding: 18px 14px;
  }

  .t2030-indicators__fig-value {
    font-size: var(--fs-28, 28px);
  }

  .t2030-indicators__divider {
    display: none;
  }
}
