/* ==========================================================================
   WPFF FAQ — Frontend styles
   ========================================================================== */
::details-content {
  transition:
    height 0.5s ease,
    content-visibility 0.5s ease allow-discrete;
  overflow: clip;
}

/* Browser supports interpolate-size */
@supports (interpolate-size: allow-keywords) {
  details {
    interpolate-size: allow-keywords;
  }

  ::details-content {
    height: 0;
  }

  [open]::details-content {
    height: auto;
  }
}

.wpff-faq {
  padding: 0.5rem 0;
}

.wpff-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Item wrapper */
details.wpff-faq__item {
  background: #fff;
  border: 1.5px solid #d8d8d4;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.25s;
}

details.wpff-faq__item:hover {
  border-color: #999;
}
details.wpff-faq__item[open] {
  border-color: #1a1a1a;
}

/* Summary row */
details.wpff-faq__item .wpff-faq__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

details.wpff-faq__item .wpff-faq__summary::-webkit-details-marker {
  display: none;
}

/* toggle icon */
.wpff-faq__icon {
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1a1a1a;
}

details.wpff-faq__item[open] .wpff-faq__icon {
  transform: rotate(90deg);
}

/* Answer body */
.wpff-faq__body {
  padding: 0.85rem 1.25rem 1.1rem 3.4rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #555;
  border-top: 1px solid #d8d8d4;
}

/* Inline content resets inside answer */
.wpff-faq__body p:first-child {
  margin-top: 0;
}
.wpff-faq__body p:last-child {
  margin-bottom: 0;
}

.wpff-faq__body ul,
.wpff-faq__body ol {
  margin-left: 1.25rem;
  padding-left: 0;
}
