{% set unique_id = "#dropdown-" ~ module.module_id %}

/* ========================================
   Dropdown / Accordion Module
   Only handles interactive states & animation
   (base styles are inline on elements)
   ======================================== */

/* Container - no layout needed, handled inline */

/* When flush (no spacing), join items visually */
 .hs-dropdown__item {
  /* base - overridden inline but keeps cascade for flush mode */
}
 .hs-dropdown__item + .hs-dropdown__divider + .hs-dropdown__item {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
 .hs-dropdown__item:has(+ .hs-dropdown__divider) {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom: none !important;
}
 .hs-dropdown__divider + .hs-dropdown__item {
  border-top: none !important;
}

/* Hover state */
 .hs-dropdown__header:hover {
  background-color:  !important;
}

/* Active / open state */
 .hs-dropdown__item.is-open > .hs-dropdown__header {
  background-color:  !important;
}

 .hs-dropdown__item.is-open > .hs-dropdown__header .hs-dropdown__title {
  color:  !important;
}

 .hs-dropdown__item.is-open > .hs-dropdown__header .hs-dropdown__icon {
  color:  !important;
}

/* Icon rotation for chevron / caret */
{% if module.behaviour_tab.icon_style == "chevron" or module.behaviour_tab.icon_style == "caret" %}
 .hs-dropdown__item.is-open .hs-dropdown__icon {
  transform: rotate(180deg);
}
{% endif %}

/* Plus / Minus toggle */
{% if module.behaviour_tab.icon_style == "plus_minus" %}
 .hs-dropdown__item.is-open .hs-dropdown__icon .icon-plus {
  display: none !important;
}
 .hs-dropdown__item.is-open .hs-dropdown__icon .icon-minus {
  display: block !important;
}
{% endif %}

/* Content panel slide */
 .hs-dropdown__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

 .hs-dropdown__item.is-open .hs-dropdown__panel {
  max-height: 2000px;
}

 .hs-dropdown__content p:last-child {
  margin-bottom: 0;
}

 .hs-dropdown__content a {
  color: ;
  text-decoration: underline;
}
