/* ==========================================================================
   QUESTION LIST
   Questions as rows on paper, divided by hairlines. A row opens in place: the
   plus turns into a cross and the answer unfolds under the question. On the
   Questions screen a row of chips filters them by group.
   ========================================================================== */

.question-list {
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
  background-color: var(--paper);
}

/* Tablet Landscape Up - Min 900px */
@media (min-width: 900px) {
  .question-list {
    padding-top: 5rem;
    padding-bottom: 7rem;
  }
}

.question-list.is-full {
  padding-top: 0;
}

.question-list__wrapper {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Tablet Portrait Up - Min 600px */
@media (min-width: 600px) {
  .question-list__wrapper {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Tablet Landscape Up - Min 900px */
@media (min-width: 900px) {
  .question-list__wrapper {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.question-list__header h2 {
  font-size: 40px;
}

/* Tablet Landscape Up - Min 900px */
@media (min-width: 900px) {
  .question-list__header h2 {
    font-size: 64px;
  }
}

.question-list__header p {
  margin-top: 0.75rem;
  font-size: 18px;
  color: var(--slate);
}

/* FILTERS */

.question-list__filters {
  display: flex;
  gap: 0.5rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

/* Tablet Portrait Up - Min 600px */
@media (min-width: 600px) {
  .question-list__filters {
    flex-wrap: wrap;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

.question-list__filter {
  flex-shrink: 0;
  min-height: 44px;
  padding-left: 1.125rem;
  padding-right: 1.125rem;
  border: 0;
  border-radius: 999px;
  background-color: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 620;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  transition: background-color var(--duration-sm) ease, color var(--duration-sm) ease, transform var(--duration-sm) var(--ease-out);
}

.question-list__filter:active {
  transform: scale(0.95);
}

.question-list__filter[aria-pressed="true"] {
  background-color: var(--ink);
  color: var(--white);
  box-shadow: none;
}

/* ROWS */

.question-list__rows {
  max-width: 880px;
  margin-top: 1.75rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.question-list-row {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.question-list-row[hidden] {
  display: none;
}

.question-list-row h3 {
  font-family: var(--body-font-family);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* Tablet Landscape Up - Min 900px */
@media (min-width: 900px) {
  .question-list-row h3 {
    font-size: 22px;
  }
}

.question-list-row button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  min-height: 68px;
  padding-top: 1rem;
  padding-right: 0;
  padding-bottom: 1rem;
  padding-left: 0;
  border: 0;
  background-color: transparent;
  text-align: left;
}

.question-list-row button .icon {
  width: 22px;
  height: 22px;
  transition: transform var(--duration-md) var(--ease-out);
}

.question-list-row.is-open button .icon {
  transform: rotate(45deg);
}

/* The answer unfolds from nothing to its own height. */
.is-scripted .question-list-row__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-lg) var(--ease-out);
}

.is-scripted .question-list-row.is-open .question-list-row__answer {
  grid-template-rows: 1fr;
}

.question-list-row__answer > div {
  overflow: hidden;
}

.question-list-row__answer p {
  max-width: 38em;
  padding-bottom: 1.375rem;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-lighter);
}

.question-list .text-link {
  margin-top: 1.25rem;
  color: var(--primary-color);
}
