/**
 * @file
 * The accordion item's header block (templates/biopama-accordion-item.html.twig,
 * `start`, `actions` and `controls`).
 *
 * The header is a block: the start, the heading's button and the actions on
 * the first line, the controls on a full-width second line. The block
 * takes the button's own skin tokens, so it reads as one header, closed and
 * open.
 */

.biopama-accordion-head {
  background-color: var(--bs-accordion-btn-bg);
  transition: background-color 0.15s ease-in-out;
}

/* Open: the active background. */
.biopama-accordion-head:has(.accordion-button:not(.collapsed)) {
  background-color: var(--bs-accordion-active-bg);
}

/* No divider: Bootstrap draws one on the open button only, where it stops
   short of the start and the actions and runs between the heading and the
   controls (user, 2026-10-29: no horizontal rules in the analyser's menu).
   The button keeps its focus ring. */
.biopama-accordion-head .accordion-button:not(.collapsed):not(:focus) {
  box-shadow: none;
}

/* The heading takes the room the actions leave. A zero basis keeps it on the
   first line while the block wraps for the controls; a long label wraps
   inside it instead. */
.biopama-accordion-head > .accordion-header {
  flex: 1 1 0;
  min-width: 0;
}

/* In CSS rather than padding utilities (!important), so a caller can line
   the start and the actions up with its own columns. */
.biopama-accordion-start {
  padding-left: 0.5rem;
}

.biopama-accordion-actions {
  padding-right: 0.5rem;
}
