/* Show/Hide — a disclosure built on native <details>/<summary>. */

.govbb-show-hide {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--govbb-space-xs);
}

.govbb-show-hide__summary {
  display: inline-flex;
  align-items: center;
  gap: var(--govbb-space-xs);
  color: var(--govbb-color-interactive);
  font-size: var(--govbb-font-size-body);
  line-height: var(--govbb-line-height-base);
  cursor: pointer;
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 0.1em;
  text-decoration-thickness: max(1px, 0.0625em);
  list-style: none;
  transition: color 0.2s;
}

.govbb-show-hide__summary::-webkit-details-marker {
  display: none;
}

.govbb-show-hide__summary::marker {
  content: '';
}

/* Disclosure triangle — points right when closed, rotates down when open. */
.govbb-show-hide__summary::before {
  content: '';
  flex-shrink: 0;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-right-width: 0;
  border-left: 8px solid;
  transition: transform 0.2s;
}

.govbb-show-hide[open] .govbb-show-hide__summary::before {
  transform: rotate(90deg);
}

.govbb-show-hide__summary:hover,
.govbb-show-hide__summary:focus-visible {
  color: var(--govbb-color-interactive-active);
}

.govbb-show-hide__summary:active,
.govbb-show-hide__summary:focus-visible {
  background: var(--govbb-color-brand-accent);

  /* renders the ring in forced-colors mode, where the gold bg is stripped */
  outline: 2px solid transparent;
}

.govbb-show-hide__content {
  display: flex;
  flex-direction: column;
  gap: var(--govbb-space-s);
  padding-left: var(--govbb-space-xm);
  border-left: 4px solid var(--govbb-color-neutral);
}
