/*
 * FAQ component -- production styles.
 *
 * Per Product Design System §5.14: "Accordion at every breakpoint;
 * consistent full-width behaviour." There is NO @media rule in this
 * file, matching this exactly.
 *
 * Structural spacing references only the resolved Stage 2 spacing
 * tokens. Colour remains pending-design-signoff -- no colour value is
 * set below. Touch targets meet the approved 44px minimum via padding.
 */

@import url("../../config/tokens/tokens.generated.css");

.sr-faq {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-body);
}

.sr-faq__item {
  border-top: 1px solid var(--color-border);
}

.sr-faq__item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.sr-faq__question-heading {
  margin: 0;
}

.sr-faq__question-button {
  width: 100%;
  min-height: 44px; /* approved touch-target minimum, per §5.14 */
  text-align: left;
  padding: var(--space-m) 0;
  background: none;
  border: none;
  font: inherit;
  font-size: var(--font-body-size);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  word-break: break-word;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
}

.sr-faq__question-button:hover {
  color: var(--color-primary);
}

/* CSS-drawn "+" indicator, rotating to "×" when open -- no icon font
   required, mirroring the legacy chevron-rotation pattern
   (`.faq-item.open .faq-q i{transform:rotate(45deg)}`) exactly. */
.sr-faq__question-button::after {
  content: "+";
  flex-shrink: 0;
  color: var(--color-muted);
  font-weight: var(--font-weight-regular);
  transition: transform var(--motion-functional-duration) var(--motion-functional-easing);
}

.sr-faq__question-button[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.sr-faq__answer-panel {
  padding: 0 0 var(--space-m) 0;
}

.sr-faq__answer {
  margin: 0;
  word-break: break-word;
  color: var(--color-text-secondary);
  font-size: var(--font-body-size);
  line-height: var(--font-body-line-height);
}

@media (prefers-reduced-motion: reduce) {
  .sr-faq__question-button::after {
    transition: none;
  }
}
