/**
 * FAQ accordion (Yoast FAQ block, enhanced by assets/scripts/faq.js).
 *
 * Before the script runs, and without it, every answer is shown as a plain
 * list. :not(#xpt-faq) outranks the Customizer CSS and the theme's button
 * rules.
 *
 * Plain CSS outside the Sass build; loaded by AssetsServiceProvider.
 */

.schema-faq:not(#xpt-faq) {
  --faq-ink: #16201d;
  --faq-text: #3a4744;
  --faq-line: #cfd6d2;
  --faq-green: #00ce7c;
  --faq-green-text: #00744b;
  --faq-ease: cubic-bezier(0.32, 0.72, 0, 1);
  max-width: 1440px;
  margin: 0 auto;
  border-top: 1px solid var(--faq-ink);
}

.schema-faq:not(#xpt-faq) .schema-faq-section {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--faq-line);
}

/* ---- Question ---------------------------------------------------------- */

.schema-faq:not(#xpt-faq) .xpt-faq__question {
  max-width: none;
  margin: 0;
  font-size: inherit;
}

.schema-faq:not(#xpt-faq) .xpt-faq__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 26px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--faq-ink);
  font-family: "TradeGothicLT-BoldCondTwenty", "TradeGothicLT-Bold", "Arial Narrow", sans-serif;
  font-weight: normal;
  font-size: clamp(22px, 1.9vw, 28px);
  line-height: 1.2;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.schema-faq:not(#xpt-faq) .xpt-faq__toggle:hover { color: var(--faq-green-text); }

.schema-faq:not(#xpt-faq) .xpt-faq__toggle:focus-visible {
  outline: 3px solid var(--faq-green);
  outline-offset: 2px;
}

/* Plus that turns into a minus. */
.xpt-faq__icon {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--faq-ink);
  border-radius: 50%;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.xpt-faq__icon::before,
.xpt-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  background: var(--faq-ink);
  transition: transform 0.35s var(--faq-ease);
}

.xpt-faq__icon::after { transform: rotate(90deg); }

.xpt-faq__item.is-open .xpt-faq__icon {
  border-color: var(--faq-green);
  background: var(--faq-green);
}

.xpt-faq__item.is-open .xpt-faq__icon::after { transform: rotate(0deg); }

/* ---- Answer ------------------------------------------------------------ */

.xpt-faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--faq-ease);
}

.xpt-faq__item.is-open .xpt-faq__panel { grid-template-rows: 1fr; }

.xpt-faq__answer {
  min-height: 0;
  overflow: hidden;
}

.xpt-faq__item.is-open .xpt-faq__answer { padding-bottom: 32px; }

.schema-faq:not(#xpt-faq) .xpt-faq__answer p,
.schema-faq:not(#xpt-faq) .schema-faq-answer {
  max-width: 72ch;
  margin: 0 0 12px;
  padding: 0;
  color: var(--faq-text);
  font-size: 18px;
  line-height: 1.65;
}

.schema-faq:not(#xpt-faq) .xpt-faq__answer > :last-child { margin-bottom: 0; }

/* The office map inside an answer ("Where does XPT operate?"). */
.schema-faq:not(#xpt-faq) .xpt-faq__answer .office-map {
  margin: 24px 0 0;
}

@media (max-width: 599px) {
  .schema-faq:not(#xpt-faq) .xpt-faq__toggle { padding: 20px 0; }
  .xpt-faq__icon { width: 34px; height: 34px; }
  .schema-faq:not(#xpt-faq) .xpt-faq__answer p,
  .schema-faq:not(#xpt-faq) .schema-faq-answer { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .xpt-faq__panel,
  .xpt-faq__icon,
  .xpt-faq__icon::before,
  .xpt-faq__icon::after { transition: none; }
}
