/* Structural baseline for hs/faq. Visual styling lives in theme. */

.hs-faq {
  margin: 2rem 0;
}

.hs-faq__header {
  margin-bottom: 2rem;
  text-align: center;
}

.hs-faq__title {
  margin: 0 0 1rem;
}

.hs-faq__intro {
  margin: 0 auto;
  max-width: 600px;
}

.hs-faq__container {
  max-width: 100%;
  overflow: hidden;
}

.hs-faq .hs-faq__item__question {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  position: relative;
}

.hs-faq .hs-faq__item__number {
  min-width: 2rem;
  padding: 0.25rem 0.5rem;
}

.hs-faq .hs-faq__item__question-text {
  flex: 1;
  margin: 0;
}

.hs-faq .hs-faq__item__toggle {
  margin-left: auto;
}

.hs-faq .hs-faq__item__toggle svg {
  filter: none;
}

.hs-faq .hs-faq__item__answer {
  max-height: 0;
  overflow: hidden;
  padding: 0;
}

.hs-faq--expanded .hs-faq .hs-faq__item__answer {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.hs-faq .hs-faq__item__answer-content {
  padding: 1.5rem;
}

.hs-faq .hs-faq__item__answer-content p {
  margin: 0 0 1rem;
}

.hs-faq .hs-faq__item__answer-content p:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .hs-faq .hs-faq__item {
    align-items: start;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    position: relative;
  }

  .hs-faq .hs-faq__item__question {
    border-bottom: none;
    border-right: none;
    grid-column: 1;
    padding-right: 1.5rem;
    position: relative;
  }

  .hs-faq .hs-faq__item__toggle {
    cursor: pointer;
    margin-left: 0;
    pointer-events: auto;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
  }

  .hs-faq .hs-faq__item__answer {
    border-left: none;
    border-top: none;
    cursor: pointer;
    grid-column: 2;
  }

  .hs-faq .hs-faq__item__answer-content {
    padding: 1.5rem 4.5rem 1.5rem 1.5rem;
  }

  .hs-faq--expanded .hs-faq__item__question {
    cursor: default;
  }

  .hs-faq--expanded .hs-faq__item__answer {
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .hs-faq--expanded .hs-faq__item__toggle {
    display: none;
  }

  .hs-faq--accordion .hs-faq__item__question {
    cursor: pointer;
  }

  .hs-faq--accordion .hs-faq__item__answer {
    max-height: 0;
    overflow: hidden;
    padding: 0;
  }

  .hs-faq--accordion .hs-faq__item.is-expanded__answer {
    max-height: none;
    overflow: visible;
    padding: 0;
  }
}

@media (max-width: 767px) {
  .hs-faq .hs-faq__item__question {
    padding: 1rem;
  }

  .hs-faq .hs-faq__item__answer-content {
    padding: 1rem 3rem 1rem 1rem;
  }
}

.block-editor .hs-faq .hs-faq__item {
  background: #fff !important;
  border: 2px dashed #ccc;
  margin-bottom: 1rem;
}

.block-editor .hs-faq .hs-faq__item:hover {
  background: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}

.block-editor .hs-faq .hs-faq__item.is-dragging {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transform: rotate(2deg);
}

.block-editor .hs-faq .hs-faq__item .components-card__header {
  background: #f0f0f1;
  border-bottom: 1px solid #ddd;
}

.block-editor .hs-faq .hs-faq__item .components-card__body {
  padding: 16px;
}

.block-editor .hs-faq .hs-faq__item__answer:hover,
.block-editor .hs-faq .hs-faq__item__question:hover {
  background: transparent !important;
}

.js .hs-faq .hs-faq__item__answer {
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.hs-faq__item.is-expanded .hs-faq__item__toggle {
  transform: rotate(180deg);
}

.hs-faq__item.is-expanded .hs-faq__item__answer {
  max-height: 1000px;
  overflow: visible;
  padding: 0;
}

.hs-faq__item.is-expanded .hs-faq__item__answer-content {
  padding: 1.5rem 4.5rem 1.5rem 1.5rem;
}

@media (max-width: 767px) {
  .hs-faq__item.is-expanded .hs-faq__item__answer-content {
    padding: 1rem 3rem 1rem 1rem;
  }
}
