.bde-accordion,
.bde-loop-accordion {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bde-accordion__content-wrapper {
  outline: 0 !important;
}

.bde-accordion__button {
  border: none;
  margin: 0;
  padding: 0;
  color: inherit;
  width: 100%;
  overflow: visible;
  background: transparent;
  -webkit-appearance: none;
  padding: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition: all var(--bde-transition-duration, 300ms) ease;
}

.bde-accordion__title {
  font-size: 18px;
  font-weight: 600;
  width: 100%;
  color: var(--bde-headings-color, #111827);
  transition: all var(--bde-transition-duration, 300ms) ease;
}

.bde-accordion__panel-content {
  padding: 16px;
}

.bde-accordion__icon {
  display: flex;
  width: 24px;
  height: 24px;
  background-color: var(--grey-400, #9ca3af);
  transition: all var(--bde-transition-duration, 300ms) ease;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: 0 0;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  -webkit-mask-size: 100% 100%;
}

.bde-accordion__icon--default {
  mask-image: var(--bde-accordion-icon-default);
  -webkit-mask-image: var(--bde-accordion-icon-default);
}

.bde-accordion__icon--active {
  mask-image: var(--bde-accordion-icon-active);
  -webkit-mask-image: var(--bde-accordion-icon-active);
}

.bde-accordion__icon--active,
.bde-accordion__button[aria-expanded="true"] .bde-accordion__icon--default {
  display: none;
}

.bde-accordion__button[aria-expanded="true"] .bde-accordion__icon--active {
  display: flex;
}

.bde-accordion__button[aria-expanded="true"] .bde-accordion__icon--default {
  transform: rotateZ(90deg);
}

.bde-accordion__button.has-both-icons[aria-expanded="true"] .bde-accordion__icon--active {
  display: flex;
}

/* Styles: Bordered */
.bde-accordion--bordered {
  --bde-accordion-border-color: var(--grey-200, #e5e7eb);
  --bde-accordion-border-width: 2px;
  --bde-accordion-border-radius: 8px;
  border: var(--bde-accordion-border-width) solid var(--bde-accordion-border-color);
  border-radius: var(--bde-accordion-border-radius);
}

.bde-accordion--bordered .bde-accordion__button,
.bde-accordion--bordered .bde-accordion__panel-content {
  border-bottom: var(--bde-accordion-border-width) solid var(--bde-accordion-border-color);
}

.bde-accordion--bordered .bde-accordion__button:hover {
  background-color: var(--grey-100, #f3f4f6);
}

.bde-accordion--bordered
.bde-accordion__content-wrapper:last-child
.bde-accordion__button {
  border-bottom: 0;
  border-radius: 0 0 var(--bde-accordion-border-radius) var(--bde-accordion-border-radius);
}

.bde-accordion--bordered
.bde-accordion__content-wrapper:last-child
.bde-accordion__panel-content {
  border-bottom: 0;
}

.bde-accordion--bordered
.bde-accordion__content-wrapper:first-child
.bde-accordion__button {
  border-radius: var(--bde-accordion-border-radius) var(--bde-accordion-border-radius) 0 0;
}

/* Styles: Bordered bottom */
.bde-accordion--bordered-bottom {
  --bde-accordion-border-color: var(--grey-200, #e5e7eb);
  --bde-accordion-border-width: 2px;
  --bde-accordion-border-radius: 8px;
}

.bde-accordion--bordered-bottom .bde-accordion__button,
.bde-accordion--bordered-bottom .bde-accordion__panel-content {
  padding: 16px 0;
}

.bde-accordion--bordered-bottom .bde-accordion__content-wrapper {
  border-bottom: var(--bde-accordion-border-width) solid var(--bde-accordion-border-color);
}

/* Styles: Pills */
.bde-accordion--pills {
  gap: 16px;
}

.bde-accordion--pills .bde-accordion__button {
  border-radius: 999px;
  background-color: var(--grey-100, #f3f4f6);
  padding: 16px 24px;
}

.bde-accordion--pills .bde-accordion__panel-content {
  margin-top: 16px;
}

/* Content */
.bde-accordion__content-wrapper .bde-accordion__panel-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  align-items: flex-start;
}

.bde-accordion__content-wrapper .bde-accordion__title-tag {
  margin: 0;
}

/* Transitions */
.bde-accordion__content-wrapper.is-collapsing .bde-accordion__panel {
  height: 0;
  overflow: hidden;
  transition: height var(--bde-transition-duration, 300ms) ease;
}

.bde-accordion__content-wrapper:not(.is-active, .is-collapsing) .bde-accordion__panel {
  display: none;
}

/* Icon */

.bde-accordion__icon--default,
.bde-accordion__button[aria-expanded="true"] .bde-accordion__icon--active {
  display: flex;
}

.bde-accordion__icon--active,
.bde-accordion__button[aria-expanded="true"] .bde-accordion__icon--default {
  display: none;
}