/* Wrapper shared by the generated charts and editor-authored field text. */
.air-participant-perspectives__field-content {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
}

/* Audience sections are stacked vertically with consistent spacing. */
.air-participant-perspectives {
  --air-perspectives-text: #20252b;
  --air-perspectives-muted: #5e6772;
  color: var(--air-perspectives-text);
  display: grid;
  gap: 2.5rem;
}

/* Student/Educator icon and heading. */
.air-participant-perspectives__heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.air-participant-perspectives__heading h3 {
  color: #1a1a1a;
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0;
}

.air-participant-perspectives__icon {
  flex: 0 0 auto;
  height: 6rem;
  max-width: none;
  width: auto;
}

/* Response categories use the same colors as the stacked bar segments. */
.air-participant-perspectives__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.375rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.air-participant-perspectives__legend li {
  align-items: center;
  display: flex;
  font-size: 0.8125rem;
  gap: 0.4375rem;
}

.air-participant-perspectives__swatch {
  display: inline-block;
  height: 0.9375rem;
  width: 0.9375rem;
}

.air-participant-perspectives__rows {
  display: grid;
  gap: 1.375rem;
}

/* Each desktop row places the complete question beside its stacked bar. */
.air-participant-perspectives__row {
  align-items: center;
  display: grid;
  gap: 1.125rem;
  grid-template-columns: minmax(15.625rem, 42%) minmax(18.75rem, 1fr);
}

.air-participant-perspectives__question {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}

.air-participant-perspectives__bar-wrap {
  min-width: 0;
}

/* Flexbox makes the four percentage widths form one 100% horizontal bar. */
.air-participant-perspectives__bar {
  display: flex;
  height: 2.625rem;
  overflow: hidden;
  width: 100%;
}

.air-participant-perspectives__segment {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 0.75rem;
  font-weight: 700;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

/* Slightly Agree uses a light fill, so dark text maintains contrast. */
.air-participant-perspectives__segment--slightly {
  color: #17212b;
}

.air-participant-perspectives__sample-size {
  color: var(--air-perspectives-muted);
  font-size: 0.6875rem;
  margin-top: 0.3125rem;
  text-align: right;
}

/* On narrow screens the question moves above the bar for readable wrapping. */
@media (max-width: 720px) {
  .air-participant-perspectives__field-content {
    padding: 1rem;
  }

  .air-participant-perspectives__icon {
    height: 4rem;
  }

  .air-participant-perspectives__row {
    gap: 0.5rem;
    grid-template-columns: 1fr;
  }

  .air-participant-perspectives__bar {
    height: 2.375rem;
  }
}
