/**
 * GDHO graphics page.
 *
 * Layout approximates the legacy humanitarian_charts.htm design: a two-column
 * header (summary + map) stacking on narrow viewports, followed by two bar
 * charts and a pie chart. Typography inherits from the site theme.
 */

.gdho-graphics {
  box-sizing: border-box;
  max-width: 1150px;
  margin: 0 auto;
  padding: 40px 12px 0;
}

.gdho-graphics__title {
  margin: 0 0 24px;
  padding: 0 12px;
  color: #00222b;
  font-size: 32pt;
  font-weight: 600;
}

.gdho-graphics h2 {
  color: #0098a6;
  font-size: 16pt;
  font-weight: 700;
  line-height: 1.35;
  padding: 0 0 2px;
  margin: 0;
  overflow: visible;
}

.gdho-graphics h3 {
  color: #00a7b6;
  font-weight: 700;
  line-height: 1.35;
  padding: 0 0 2px;
  margin: 0;
  overflow: visible;
}

.gdho-graphics__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.gdho-graphics__half {
  box-sizing: border-box;
  width: 100%;
  padding: 0 12px;
  vertical-align: top;
}

.gdho-graphics__half--map {
  padding-left: 5%;
}

.gdho-graphics__total {
  color: #0098a6;
  font-size: 52pt;
  font-weight: 700;
  line-height: 1;
  margin: 12px 0 0;
  padding: 0;
}

.gdho-graphics__country-total {
  color: #00a7b6;
  font-size: 14pt;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  padding: 0 0 2px;
  min-height: 1.5em;
}

.gdho-graphics__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  color: #0098a6;
  font-size: 16pt;
  font-weight: 700;
}

.gdho-graphics__filters label {
  color: inherit;
  font-weight: inherit;
}

.gdho-graphics__filters select {
  font-size: 14pt;
  background-color: rgba(204, 204, 204, 0.5);
  border: none;
  padding: 6px;
  margin: 6px 0;
  max-width: 300px;
  color: #00222b;
  font-weight: 400;
}

.gdho-graphics__map {
  position: relative;
  width: 90%;
}

.gdho-graphics__map-canvas {
  position: relative;
  width: 100%;
  height: 260px;
}

.gdho-graphics__credit {
  font-size: 8pt;
  padding: 2px 8px 0;
  margin: 0;
}

.gdho-graphics__bars {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.gdho-graphics__bars .gdho-graphics__chart {
  box-sizing: border-box;
  width: 100%;
  padding: 0 12px;
  height: 400px;
}

.gdho-graphics__piechart {
  width: 100%;
  height: 300px;
}

.gdho-graphics__admin {
  margin-top: 24px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid #ccc;
  font-size: 11pt;
}

.gdho-graphics__admin table {
  width: 100%;
  border-collapse: collapse;
}

.gdho-graphics__admin td {
  padding: 2px 6px;
  border-bottom: 1px solid #eee;
}

@media (min-width: 450px) {
  .gdho-graphics__map-canvas {
    height: 300px;
  }

  .gdho-graphics h2 {
    font-size: 18pt;
  }

  .gdho-graphics__total {
    font-size: 72pt;
    line-height: 1;
  }
}

@media (min-width: 600px) {
  .gdho-graphics__half {
    width: 50%;
    padding-right: 2%;
    padding-bottom: 5%;
  }

  .gdho-graphics__bars .gdho-graphics__chart {
    width: 50%;
  }
}

@media (min-width: 1100px) {
  .gdho-graphics h2 {
    font-size: 22pt;
  }
}

/* Hide visually but keep it accessible to screen readers. */
.gdho-graphics .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;
}
