/* ==========================================================================
   FAQ Page
   Category-grouped accordions built on native <details>/<summary>.
   Accent colors come from the section settings via --faq-accent / --faq-accent-soft.
   ========================================================================== */

.faq-page {
  background-color: rgb(var(--color-background));
}

.faq-page__container {
  max-width: var(--faq-content-width, 800px);
  margin-inline: auto;
  padding-inline: 20px;
}

/* --------------------------------------------------------------------------
   Intro
   Type scale descends with heading level across the whole page: the hero-banner
   <h1> sits above this section, then h2 40 > h3 26 > h4 18.
   -------------------------------------------------------------------------- */

.faq-page__intro {
  text-align: var(--faq-intro-align, center);
  margin-block-end: 48px;
}

.faq-page__heading {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.2;
}

.faq-page__intro-text {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(var(--color-text), 0.65);
}

@media (max-width: 959px) {
  .faq-page__intro {
    margin-block-end: 32px;
  }

  .faq-page__heading {
    font-size: 28px;
  }

  .faq-page__intro-text {
    font-size: 16px;
  }
}

/* --------------------------------------------------------------------------
   Category
   -------------------------------------------------------------------------- */

.faq-page__group + .faq-page__group {
  margin-block-start: 40px;
}

.faq-page__group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding-block-end: 8px;
  font-size: 26px;
  line-height: 1.3;
  border-block-end: 2px solid var(--faq-accent, #ff6b9d);
}

/* "Show underline below title" off — keep the spacing, drop the rule. */
.faq-page__group-title--flush {
  padding-block-end: 0;
  border-block-end: none;
}

.faq-page__group-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--faq-group-icon-color, var(--faq-accent, #ff6b9d));
}

.faq-page__group-icon--emoji {
  font-size: 1em;
}

.faq-page__group-icon--svg {
  width: 1.05em;
  height: 1.05em;
}

/* The icon components ship their own width/height attributes, so override both
   here — some of them (e.g. icons/box) don't accept a pass-through class. */
.faq-page__group-icon--svg svg {
  width: 100%;
  height: 100%;
}

.faq-page__group-label {
  min-width: 0;
}

.faq-page__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 959px) {
  .faq-page__group + .faq-page__group {
    margin-block-start: 32px;
  }

  .faq-page__group-title {
    font-size: 20px;
  }
}

/* --------------------------------------------------------------------------
   Accordion item
   -------------------------------------------------------------------------- */

.faq-page__item {
  overflow: hidden;
  background-color: rgb(var(--color-background));
  border: 1px solid rgba(var(--color-text), 0.1);
  border-radius: var(--faq-item-radius, 10px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-page__item>summary {
  width: 100%;
}

.faq-page__item[open],
.faq-page__item:hover {
  border-color: var(--faq-accent, #ff6b9d);
}

.faq-page__item[open] {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

/* "Separated by lines" — no boxes, just a hairline between questions. */

.faq-page[data-item-style="divider"] .faq-page__list {
  gap: 0;
}

.faq-page[data-item-style="divider"] .faq-page__item {
  border: none;
  border-block-end: 1px solid rgba(var(--color-text), 0.1);
  border-radius: 0;
  box-shadow: none;
}

.faq-page[data-item-style="divider"] .faq-page__item:last-child {
  border-block-end: none;
}

.faq-page[data-item-style="divider"] .faq-page__question {
  padding-inline: 0;
}

.faq-page[data-item-style="divider"] .faq-page__question:hover {
  background-color: transparent;
  color: var(--faq-accent, #ff6b9d);
}

.faq-page[data-item-style="divider"] .faq-page__answer {
  padding-inline: 0;
}

.faq-page__question {
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.2s ease;
}

.faq-page__question::-webkit-details-marker {
  display: none;
}

.faq-page__question::marker {
  content: "";
}

.faq-page__question:hover {
  background-color: var(--faq-accent-soft, #fef0f5);
}

.faq-page__question:focus-visible {
  outline: 2px solid var(--faq-accent, #ff6b9d);
  outline-offset: -2px;
}

.faq-page__question-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

/* Lets a long question wrap instead of squeezing the marker. */
.faq-page__question-label {
  min-width: 0;
}

@media (max-width: 959px) {
  .faq-page__question {
    padding: 14px 16px;
  }

  .faq-page__question-text {
    font-size: 16px;
  }
}

/* Toggle marker. All three variants are drawn in CSS so they can animate and so
   they inherit the accent color without another icon request. */

.faq-page__marker {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.faq-page[data-marker-style="none"] .faq-page__marker {
  display: none;
}

/* Plus that rotates into a minus. */

.faq-page[data-marker-style="plus"] .faq-page__marker::before,
.faq-page[data-marker-style="plus"] .faq-page__marker::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 16px;
  height: 2px;
  background-color: var(--faq-accent, #ff6b9d);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.faq-page[data-marker-style="plus"] .faq-page__marker::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-page[data-marker-style="plus"] .faq-page__item[open] .faq-page__marker::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

/* Chevron that flips up when the answer opens. */

.faq-page[data-marker-style="chevron"] .faq-page__marker::before {
  content: "";
  position: absolute;
  inset-block-start: 40%;
  inset-inline-start: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--faq-accent, #ff6b9d);
  border-bottom: 2px solid var(--faq-accent, #ff6b9d);
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq-page[data-marker-style="chevron"] .faq-page__item[open] .faq-page__marker::before {
  transform: translate(-50%, -50%) rotate(-135deg);
}

/* --------------------------------------------------------------------------
   Answer
   .faq-page__answer-wrap is the element faq-page.js animates, so its height must
   be free to be driven from script — keep padding on the inner element only.
   -------------------------------------------------------------------------- */

.faq-page__answer-wrap {
  overflow: hidden;
}

.faq-page__answer {
  padding: 0 20px 18px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(var(--color-text), 0.75);
}

.faq-page__answer p {
  margin: 0;
}

.faq-page__answer p + p,
.faq-page__answer ul,
.faq-page__answer ol {
  margin-block-start: 10px;
}

.faq-page__answer strong {
  color: rgb(var(--color-text));
}

.faq-page__answer a {
  color: var(--faq-accent, #ff6b9d);
  font-weight: 600;
  text-decoration: none;
}

.faq-page__answer a:hover {
  text-decoration: underline;
}

@media (max-width: 959px) {
  .faq-page__answer {
    padding: 0 16px 16px;
    font-size: 15px;
  }
}

/* --------------------------------------------------------------------------
   "Still have questions?" card
   -------------------------------------------------------------------------- */

.faq-page__contact {
  margin-block-start: 48px;
  padding: 32px 24px;
  text-align: center;
  background-color: var(--faq-accent-soft, #fef0f5);
  border-radius: 14px;
}

.faq-page__contact-heading {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.3;
}

.faq-page__contact-text {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(var(--color-text), 0.75);
}

.faq-page__contact-text p {
  margin: 0;
}

.faq-page__contact-text a {
  color: var(--faq-accent, #ff6b9d);
  font-weight: 600;
  text-decoration: none;
}

.faq-page__contact-text a:hover {
  text-decoration: underline;
}

.faq-page__contact-note {
  margin: 15px 0 0;
  font-size: 18px;
}

@media (max-width: 959px) {
  .faq-page__contact {
    margin-block-start: 32px;
    padding: 24px 18px;
  }

  .faq-page__contact-heading {
    font-size: 20px;
  }

  .faq-page__contact-note {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-page__item,
  .faq-page__question,
  .faq-page__marker::before,
  .faq-page__marker::after {
    transition: none;
  }
}
