/* ============================================================
   Widget · FAQ
   ============================================================
   Native `<details>`/`<summary>` accordion. No JS needed —
   browser handles open/close. Chevron is a CSS pseudo-element
   that rotates on `[open]`.

   The clickable summary area is the entire question row (its
   `cursor: pointer` covers the full padding) so editors don't
   need to worry about hit-target size.
   ============================================================ */

.bdc-faq {
  background: var(--bdc-surface);
  border: 1px solid var(--bdc-line);
  border-radius: var(--bdc-r-lg);
  overflow: hidden;
  margin: 16px 0 28px;
  box-shadow: var(--bdc-shadow-card);
  font-family: var(--bdc-sans);
}

.bdc-faq__item {
  border-bottom: 1px solid var(--bdc-line-soft);
}
.bdc-faq__item:last-child {
  border-bottom: 0;
}

.bdc-faq__question {
  list-style: none;
  padding: 16px 50px 16px 18px;
  font-family: var(--bdc-serif);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--bdc-ink);
  cursor: pointer;
  position: relative;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.bdc-faq__question::-webkit-details-marker { display: none; }

/* Chevron — pure CSS, rotates 180° on open. */
.bdc-faq__question::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--bdc-ink-3);
  border-bottom: 2px solid var(--bdc-ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.bdc-faq__item[open] .bdc-faq__question::after {
  transform: translateY(-30%) rotate(-135deg);
}
.bdc-faq__item[open] .bdc-faq__question {
  background: var(--bdc-bg);
}

.bdc-faq__answer {
  padding: 0 18px 18px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--bdc-ink-2);
}
.bdc-faq__answer p {
  margin: 0 0 10px;
}
.bdc-faq__answer p:last-child {
  margin: 0;
}
.bdc-faq__answer strong {
  color: var(--bdc-ink);
  font-weight: 600;
}
.bdc-faq__answer a {
  color: var(--bdc-sage);
  text-decoration: underline;
  text-decoration-color: var(--bdc-sage-tint);
}
.bdc-faq__answer a:hover {
  text-decoration-color: var(--bdc-sage);
}

/* ───── Desktop scaling ───── */

@media (min-width: 768px) {
  .bdc-faq {
    margin: 22px 0 36px;
  }
  .bdc-faq__question {
    padding: 20px 58px 20px 24px;
    font-size: 18.5px;
  }
  .bdc-faq__question::after {
    right: 26px;
    width: 11px;
    height: 11px;
  }
  .bdc-faq__answer {
    padding: 0 24px 22px;
    font-size: 16.5px;
    line-height: 1.6;
  }
  .bdc-faq__answer p {
    margin: 0 0 12px;
  }
}

@media (min-width: 1200px) {
  .bdc-faq__question { font-size: 19px; }
  .bdc-faq__answer   { font-size: 17px; }
}

/* ───── Specificity safety ─────
   `<summary>`, `<p>`, `<a>` all heavy theme targets. Re-declare
   under `.bdc-v3` so theme `body p { color }` / `body a { color }`
   don't override the answer copy. */

.bdc-v3 .bdc-faq__question { color: var(--bdc-ink); }
.bdc-v3 .bdc-faq__answer,
.bdc-v3 .bdc-faq__answer p { color: var(--bdc-ink-2); }
.bdc-v3 .bdc-faq__answer strong { color: var(--bdc-ink); }
.bdc-v3 .bdc-faq__answer a {
  color: var(--bdc-sage);
  text-decoration: underline;
  text-decoration-color: var(--bdc-sage-tint);
}
.bdc-v3 .bdc-faq__answer a:hover {
  text-decoration-color: var(--bdc-sage);
}
