/**
 * Styles for Wallex FAQ widget.
 * @since 2.3.0
 */

.wallex-faq {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.wallex-faq *,
.wallex-faq *::before,
.wallex-faq *::after {
  box-sizing: border-box;
}

.wallex-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacingXS, 8px);
}

.wallex-faq__item {
  width: 100%;
  border-bottom: 1px solid var(--color-stroke-2, rgba(0, 0, 0, 0.05));
  border-radius: 0;
  overflow: hidden;
}

.wallex-faq__item.is-open {
  background-color: var(--color-bg-2, #fbfbfc);
  border: 1px solid var(--color-stroke-2, rgba(0, 0, 0, 0.05));
  border-radius: var(--cornerRadiusMNudge, 10px);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.04);
  margin: 6px 0;
}

.wallex-faq__question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  outline: none;
}

.wallex-faq__question-text {
  font-size: var(--body-size, 14px);
  font-weight: 700;
  line-height: var(--body-line-height, 24px);
  color: var(--color-text-1, #252525);
  transition: color 0.2s ease;
}

.wallex-faq__icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--color-text-3, rgba(0, 0, 0, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
}

.wallex-faq__icon-plus,
.wallex-faq__icon-minus {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.wallex-faq__icon-minus {
  opacity: 0;
  transform: rotate(90deg);
}

.wallex-faq__item.is-open .wallex-faq__icon-plus {
  opacity: 0;
  transform: rotate(-90deg);
}

.wallex-faq__item.is-open .wallex-faq__icon-minus {
  opacity: 1;
  transform: rotate(0deg);
  color: var(--color-text-1, #252525);
}

.wallex-faq__answer-wrap {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

.wallex-faq__divider {
  height: 1px;
  background-color: var(--color-stroke-2, rgba(0, 0, 0, 0.05));
  margin: 0 0 var(--spacingM, 16px) 0;
}

.wallex-faq__answer {
  font-size: var(--body-size, 14px);
  line-height: var(--body-line-height, 24px);
  color: var(--color-text-2, rgba(0, 0, 0, 0.6));
  padding: 16px;
  text-align: right;
}

.wallex-faq__answer p {
  margin: 0 0 var(--spacingS, 12px) 0;
}

.wallex-faq__answer p:last-child {
  margin-bottom: 0;
}