/* 1️⃣ Light gray for only top-level collapsed panel titles */
.accordion-title-lightgray > .fsElementContent > section.fsPanel > header > h2.fsElementTitle[aria-expanded="false"],
.accordion-title-lightgray > .fsElementContent > section.fsPanel > header > h2.fsElementTitle:not([aria-expanded="true"]) {
  background-color: #f2f2f2 !important;
  color: #000000 !important;
  padding: 1em !important;
  margin-bottom: 0.25em;
}

/* 2️⃣ Theme primary color for open/expanded panels only */
.accordion-title-lightgray > .fsElementContent > section.fsPanel.fsStateOpen > header > h2.fsElementTitle {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  padding: 1em !important;
  margin-bottom: 0.25em;
}

/* 3️⃣ Optional: Hover effect on closed top-level panel */
.accordion-title-lightgray > .fsElementContent > section.fsPanel > header > h2.fsElementTitle[aria-expanded="false"]:hover {
  background-color: #e6e6e6 !important;
}

/* 4️⃣ Prevent style from affecting nested accordions */
.accordion-title-lightgray section.fsPanelGroup.fsAccordion .fsElementTitle {
  background-color: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

/* 5️⃣ Adjust title link padding, no left border */
.accordion-title-lightgray > .fsElementContent > section.fsPanel > header > h2.fsElementTitle > a {
  border-left: none !important;
  padding-left: 1em !important;
  position: relative;
}

/* 6️⃣ Pseudo-element just for divider line — no + or - content */
.accordion-title-lightgray > .fsElementContent > section.fsPanel > header > h2.fsElementTitle > a::before,
.accordion-title-lightgray > .fsElementContent > section.fsPanel.fsStateOpen > header > h2.fsElementTitle > a::before {
  content: "";
  display: inline-block;
  width: 1em;
  margin-right: 8px;
  border-right: 1px solid #e5e5e5;
  padding-right: 8px;
  box-sizing: content-box;
}
