/* Front styles for JM Accordion Plus v1.2 */
.jm-acc {
  --jm-title-color: inherit;
  --jm-title-hover: var(--jm-title-color);
  --jm-title-open: var(--jm-title-color);
  --jm-sep-color: #2b8aa3;
  --jm-sep-hover: var(--jm-sep-color);
  --jm-sep-open: var(--jm-sep-color);
  --jm-icon-color: currentColor;
  --jm-title-size: inherit;
  --jm-title-weight: inherit;
  --jm-title-letter: normal;
  --jm-title-line: normal;
  --jm-icon-gap: .6rem;
  border: 0;
}
.jm-acc__header {
  display: flex;
  align-items: center;
  gap: var(--jm-icon-gap);
  cursor: pointer;
  user-select: none;
  padding: .25rem 0;
  color: var(--jm-title-color);
  font-size: var(--jm-title-size);
  font-weight: var(--jm-title-weight);
  letter-spacing: var(--jm-title-letter);
  line-height: var(--jm-title-line);
}
.jm-acc__header.has-text-align-center { justify-content: center; text-align: center; }
.jm-acc__header.has-text-align-right  { justify-content: flex-end; text-align: right; }
.jm-acc__header:hover { color: var(--jm-title-hover); }
.jm-acc.is-open .jm-acc__header { color: var(--jm-title-open); }

/* Icon masks */
/* Built-in masks */
.jm-acc.has-icon-chevron .jm-acc.has-icon-plusminus .jm-acc.has-icon-caret /* Open state -> down */
.jm-acc.is-open 
/* Separator bar */
.jm-acc__separator {
  height: 4px;
  background-color: var(--jm-sep-color);
  border-radius: 2px;
  margin: .25rem 0 .5rem 0;
  transition: background-color .2s ease;
}
.jm-acc__header:hover + .jm-acc__separator { background-color: var(--jm-sep-hover); }
.jm-acc.is-open .jm-acc__separator { background-color: var(--jm-sep-open); }

/* Content */
.jm-acc__content { display: none; }
.jm-acc.is-open .jm-acc__content { display: block; }

/* Icon rendered as a baseline-aligned glyph before the title text */
.jm-acc__title {
  position: relative;
}
.jm-acc__title::before {
  content: "▸";
  display: inline;
  font: inherit;
  color: currentColor;         /* inherit title color */
  margin-right: 0.5ch;        /* space based on character width */
  vertical-align: baseline;   /* same baseline as text */
  line-height: 1;             /* tight glyph */
}
.jm-acc.is-open .jm-acc__title::before {
  content: "▾";
}

/* Explicit color binding on the title element */
.jm-acc__title { color: var(--jm-title-color); }
.jm-acc__header:hover .jm-acc__title { color: var(--jm-title-hover); }
.jm-acc.is-open .jm-acc__title { color: var(--jm-title-open); }

/* Robust separator: draw a border under the header using the same colors */
.jm-acc__header {
  border-bottom: var(--jm-sep-height,4px) solid var(--jm-sep-color);
}
.jm-acc__header:hover {
  border-bottom-color: var(--jm-sep-hover);
}
.jm-acc.is-open .jm-acc__header {
  border-bottom-color: var(--jm-sep-open);
}

/* Keep the original separator div but set minimal height to avoid double thickness */
.jm-acc__separator { height: 0; margin: 0; background-color: transparent; }

/* Force title size/weight even against opinionated themes */
.jm-acc .jm-acc__header .jm-acc__title {
  font-size: var(--jm-title-size, inherit) !important;
  font-weight: var(--jm-title-weight, inherit) !important;
}
