/**
 * Accordion paragraph - colour, layout, spacing and borders come from the
 * colour-scheme classes and Bootstrap utilities in the twig templates; only
 * what those can't express lives here. Row titles use Bootstrap's nav-link
 * (inside .nav), so their colour and hover match the main menu.
 */

/* Safari still draws its own disclosure triangle on a flex summary. */
.neway-accordion summary::-webkit-details-marker {
  display: none;
}

/* The main menu's font ($ff-Contax65Med in scss/typography.scss). */
.neway-accordion summary {
  font-family: 'Contax65Med', Arial, Helvetica, sans-serif;
  cursor: pointer;
}

/* Visible keyboard focus in the text colour (4.6:1 on clay-light); Bootstrap's pale ring is too faint here. */
.neway-accordion summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
  box-shadow: none;
}

/* Chevron points right when closed, tilts 20deg as a hint, points down when open. */
.neway-accordion__icon {
  transition: transform 0.2s ease;
}

.neway-accordion details:not([open]) > summary:is(:hover, :focus-visible) .neway-accordion__icon {
  transform: rotate(20deg);
}

.neway-accordion details[open] > summary .neway-accordion__icon {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .neway-accordion__icon {
    transition: none;
  }
}
