/* ==========================================================================
   Collapsible Sections — 3-level hiërarchie
   Overgenomen en aangepast vanuit EntranosFlux/flux style.css
   ========================================================================== */

/* --- Gedeelde collapse mechanica --- */

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  user-select: none;
}

.collapsible-header:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.collapse-icon {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: #555;
  border-radius: 3px;
  flex-shrink: 0;
}

.collapse-icon:hover {
  background-color: rgba(0, 0, 0, 0.08);
  color: #333;
}

.collapsible-header.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.collapsible-content {
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.collapsible-content.collapsed {
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
}


/* --- Level 1: Hoofdsecties (vervangt h1) --- */

.collapsible-l1-header {
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #546689;
}

.collapsible-l1-header .header-left span {
  font-size: 2.25rem;
  font-weight: normal;
  line-height: 1.2;
  color: inherit;
}

.collapsible-l1-header .collapse-icon {
  width: 28px;
  height: 28px;
}

.collapsible-l1-content {
  max-height: 20000px; /* Groot genoeg voor hele secties met grafieken */
}


/* --- Level 2: Sub-secties (vervangt h2) --- */

.collapsible-l2-header {
  padding: 0.4rem 0;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid #aab;
}

.collapsible-l2-header .header-left span {
  font-size: 1.5rem;
  font-weight: normal;
  line-height: 1.2;
  color: #333;
}

.collapsible-l2-header .collapse-icon {
  width: 22px;
  height: 22px;
}

.collapsible-l2-content {
  max-height: 10000px;
}


/* --- Level 3: Sub-sub-secties (vervangt h3) --- */

.collapsible-l3-header {
  padding: 0.3rem 0;
  margin-top: 0.5rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid #ccd;
}

.collapsible-l3-header .header-left span {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  color: #555;
  text-transform: none;
  letter-spacing: normal;
}

.collapsible-l3-header .collapse-icon {
  width: 18px;
  height: 18px;
}

.collapsible-l3-content {
  max-height: 5000px;
  padding-left: 0.25rem;
}


/* --- Speciale context: witte h1 (section_caseinfo) --- */

.collapsible-l1-header.header-light .header-left span {
  color: white;
}

.collapsible-l1-header.header-light {
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.collapsible-l1-header.header-light .collapse-icon {
  color: rgba(255, 255, 255, 0.7);
}

.collapsible-l1-header.header-light:hover {
  background-color: rgba(255, 255, 255, 0.08);
}
