/* FAQ Schema Generator — module-specific styles.
   Everything else comes from the shared fsgt primitives. */

.fsgt-faqg .fsgt-faqg-rows { margin-bottom: 12px; }
.fsgt-faqg .fsgt-faqg-row .fsgt-field { margin-bottom: 4px; min-width: 0; }
.fsgt-faqg .fsgt-faqg-answer { min-height: 76px; }

/* Row controls: reorder + remove stacked beside the fields. */
.fsgt-faqg .fsgt-faqg-controls { display: grid; gap: 6px; align-content: start; }
.fsgt-faqg .fsgt-faqg-up svg { transform: rotate(180deg); }

/* Accordion preview (pure CSS/JS, neutral styling). */
.fsgt-faqg .fsgt-faqg-preview { display: grid; gap: 8px; }
.fsgt-faqg .fsgt-faqg-item {
  background: var(--fsgt-surface);
  border: 1px solid var(--fsgt-border-subtle);
  border-radius: var(--fsgt-radius);
  box-shadow: var(--fsgt-shadow-soft);
  overflow: hidden;
}
.fsgt-faqg .fsgt-faqg-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--fsgt-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--fsgt-text);
  transition: color 120ms var(--fsgt-ease);
}
.fsgt-faqg .fsgt-faqg-q:hover,
.fsgt-faqg .fsgt-faqg-item.open .fsgt-faqg-q { color: var(--fsgt-primary); }
.fsgt-faqg .fsgt-faqg-q:focus-visible { outline: none; box-shadow: var(--fsgt-focus); border-radius: var(--fsgt-radius-sm); }
.fsgt-faqg .fsgt-faqg-q > span:first-child { flex: 1; overflow-wrap: anywhere; }
.fsgt-faqg .fsgt-faqg-chev {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: var(--fsgt-radius-full);
  background: var(--fsgt-primary-soft);
  color: var(--fsgt-primary);
  transition: transform 220ms var(--fsgt-ease);
}
.fsgt-faqg .fsgt-faqg-item.open .fsgt-faqg-chev { transform: rotate(180deg); }

/* Height-agnostic open/close via the grid-rows trick. */
.fsgt-faqg .fsgt-faqg-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--fsgt-ease); }
.fsgt-faqg .fsgt-faqg-item.open .fsgt-faqg-panel { grid-template-rows: 1fr; }
.fsgt-faqg .fsgt-faqg-panel > div { overflow: hidden; }
.fsgt-faqg .fsgt-faqg-a {
  padding: 0 16px 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fsgt-text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fsgt-faqg .fsgt-output pre { min-height: 120px; }

@media (prefers-reduced-motion: reduce) {
  .fsgt-faqg .fsgt-faqg-panel, .fsgt-faqg .fsgt-faqg-chev { transition: none; }
}
