/**
 * Shared FAQ accordion — template-parts/sections/faq.php
 *
 * Figma: POS desktop 2:12528 / mobile 2:12695.
 *
 * Self-contained: every value is a local custom property so the section keeps
 * its design on any page, inside or outside a page-specific wrapper. Override
 * a token on the section to reskin it, e.g. `--cw-faq-surface: #fafafa`.
 */

.cw-faq {
  --cw-faq-text: #15172e;
  --cw-faq-secondary: #555963;
  --cw-faq-tertiary: #717683;
  --cw-faq-divider: #e9eaec;
  --cw-faq-surface: #fafafa;
  --cw-faq-cta-bg: #101223;
  --cw-faq-cta-text: #ffffff;
  --cw-faq-font-h: "Plus Jakarta Sans", system-ui, sans-serif;
  --cw-faq-font-b: "Inter", system-ui, sans-serif;
  --cw-faq-gutter: 132px;
  --cw-faq-pad-top: 120px;
  --cw-faq-pad-bottom: 60px;

  padding: var(--cw-faq-pad-top) 0 var(--cw-faq-pad-bottom);
  background: var(--cw-faq-surface);
  font-family: var(--cw-faq-font-b);
  color: var(--cw-faq-text);
}

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


.cw-faq__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--cw-faq-gutter);
}

.cw-faq__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 682px;
  text-align: center;
}

.cw-faq__eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cw-faq-text);
}

.cw-faq__title {
  margin: 0;
  font-family: var(--cw-faq-font-h);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--cw-faq-text);
}

.cw-faq__title--mobile {
  display: none;
}

.cw-faq__intro {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--cw-faq-tertiary);
}

/* The intro may arrive as plain text or as editor markup. */
.cw-faq__intro > p {
  margin: 0;
}

.cw-faq__intro > p + p {
  margin-top: 12px;
}

.cw-faq__list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 776px;
}

.cw-faq__item {
  border: 0;
  border-bottom: 1px dashed var(--cw-faq-divider);
  border-radius: 0;
  background: var(--cw-faq-surface);
  padding: 32px 0;
}

.cw-faq__question {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--cw-faq-font-b);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--cw-faq-text);
}

.cw-faq__question::-webkit-details-marker {
  display: none;
}

.cw-faq__question::after {
  content: "+";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--cw-faq-text);
}

.cw-faq__item.is-open .cw-faq__question::after {
  content: "–";
}

.cw-faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.cw-faq__item.is-open .cw-faq__panel {
  grid-template-rows: 1fr;
}

.cw-faq__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.cw-faq__answer {
  margin: 12px 28px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--cw-faq-secondary);
}

/* Answers may arrive as plain text or as editor markup. */
.cw-faq__answer > p {
  margin: 0;
}

.cw-faq__answer > p + p {
  margin-top: 12px;
}

.cw-faq__answer--mobile {
  display: none;
}

.cw-faq__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--cw-faq-cta-bg);
  font-family: var(--cw-faq-font-h);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--cw-faq-cta-text);
  text-decoration: none;
}

.cw-faq__cta:hover,
.cw-faq__cta:focus {
  background: var(--cw-faq-cta-bg);
  color: var(--cw-faq-cta-text);
  text-decoration: none;
}

@media (max-width: 991px) {
  .cw-faq {
    --cw-faq-gutter: 20px;
    --cw-faq-pad-top: 48px;
    --cw-faq-pad-bottom: 48px;
  }

  .cw-faq__inner {
    gap: 32px;
    align-items: flex-start;
  }

  .cw-faq__head {
    align-items: flex-start;
    gap: 12px;
    max-width: none;
    text-align: left;
  }

  .cw-faq__eyebrow {
    font-size: 12px;
    letter-spacing: normal;
  }

  .cw-faq__title {
    font-size: 24px;
  }

  .cw-faq__title--desktop {
    display: none;
  }

  .cw-faq__title--mobile {
    display: block;
  }

  .cw-faq__intro {
    font-size: 14px;
    line-height: 1.4;
    color: var(--cw-faq-secondary);
  }

  .cw-faq__list {
    max-width: none;
  }

  .cw-faq__item {
    padding: 28px 0;
  }

  .cw-faq__question {
    font-size: 14px;
    gap: 8px;
  }

  .cw-faq__question::after {
    margin-top: 2px;
  }

  .cw-faq__answer {
    margin: 12px 24px 0 0;
    font-size: 14px;
    line-height: 1.4;
  }

  .cw-faq__answer--desktop {
    display: none;
  }

  .cw-faq__answer--mobile {
    display: block;
  }

  .cw-faq__cta {
    align-self: center;
  }
}

/* Tablet (iPad Mini / Air) — match iPad Pro centered FAQ */
@media (min-width: 768px) and (max-width: 991px) {
  .cw-faq {
    --cw-faq-gutter: 40px;
    --cw-faq-pad-top: 64px;
    --cw-faq-pad-bottom: 64px;
  }

  .cw-faq__inner {
    gap: 40px;
    align-items: center;
  }

  .cw-faq__head {
    align-items: center;
    gap: 16px;
    max-width: 682px;
    text-align: center;
  }

  .cw-faq__eyebrow {
    font-size: 13px;
    letter-spacing: 1.2px;
  }

  .cw-faq__title {
    font-size: 32px;
  }

  .cw-faq__title--desktop {
    display: block;
  }

  .cw-faq__title--mobile {
    display: none;
  }

  .cw-faq__intro {
    font-size: 16px;
    line-height: 1.45;
    color: var(--cw-faq-tertiary);
  }

  .cw-faq__list {
    width: 100%;
    max-width: 900px;
  }

  .cw-faq__item {
    padding: 32px 0;
  }

  .cw-faq__question {
    font-size: 16px;
  }

  .cw-faq__answer {
    margin: 16px 28px 0 0;
    font-size: 15px;
    line-height: 1.45;
  }

  .cw-faq__answer--desktop {
    display: block;
  }

  .cw-faq__answer--mobile {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cw-faq__panel {
    transition: none;
  }
}
