/* ============================================================
   PAS4 — Accordion card headers: clickable look + open/close
   chevron indicator. Companion to pas4-accordion.js.
   ============================================================ */

/* Header row: full-width click target with chevron on the right */
.view .panel-group .card .class-header {
  padding: 0;
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.view .panel-group .card .class-header .btn-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}

/* Title link: opens the node (handled in pas4-accordion.js).
   Coloured + underline on hover so it reads as a link, distinct
   from the rest of the header, which toggles the card. */
.view .panel-group .card .class-header .btn-link a {
  color: var(--pas4-accent, #1e7e34);
  text-decoration: none;
}

.view .panel-group .card .class-header .btn-link a:hover {
  text-decoration: underline;
}

/* Chevron: points up when open, rotates down when closed */
.view .panel-group .card .class-header .btn-link::after {
  content: "";
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-size: 1rem;
  transform: rotate(180deg);          /* open state: chevron up */
  transition: transform 0.2s ease-in-out;
}

.view .panel-group .card .class-header .btn-link[aria-expanded="false"]::after {
  transform: rotate(0deg);            /* closed state: chevron down */
}

/* Card outline + spacing */
.view .panel-group .card {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.375rem;
  overflow: hidden;
}