/**
 * FAQ List block — thin overrides layered on top of the shared FAQ stylesheet (assets/frontend.css).
 *
 * The block reuses the FAQ template's query-loop classes (.wp-block-query.is_faq_query_loop, etc.),
 * so it inherits the template's list styling verbatim — grey row dividers, the accordion button and
 * chevron, row spacing. It then applies a few block-only adjustments the shared file can't cover,
 * each documented inline below:
 *   - section padding ownership (the pattern's group owns it, not the block);
 *   - resets normally supplied by core / the theme's style variants, which aren't loaded when only
 *     this block reuses the classes (post-title margin, post-template list bullets).
 *
 * (The per-tag question font-size — the "Question heading tag" control — is applied as an inline
 * style in render.php so it also works in the editor's ServerSideRender preview; see the note below.)
 *
 * Loaded via the `wdf-faq-list-style` handle, which depends on `wdf-faq-shared-style`
 * (assets/frontend.css), so these rules always win by load order (and by higher specificity).
 */
.wp-block-wdf-faq-list.wp-block-query.is_faq_query_loop {
  padding-block: 0;
}

/* The theme resets the post-title margin in its core/post-title style variant
   (variants/core-post-title/default.css). That variant CSS is only inlined when a REAL
   core/post-title block is on the page, so our plain <h6 class="wp-block-post-title"> is not covered
   and would show the browser's default (large) heading margin. Reset it to match the FAQ template. */
.wp-block-wdf-faq-list .wp-block-post-title {
  margin-top: 0;
  margin-bottom: 0;
}

/* Core's post-template stylesheet resets the <ul> (list-style:none, no padding/margin) on the
   template pages, but that core CSS isn't loaded when only our block reuses the class. Without it the
   <ul> shows default bullets, so reset it here to match the FAQ template. */
.wp-block-wdf-faq-list .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* NOTE: the question font-size (driven by the "Question heading tag" control) is applied as an INLINE
   style on the button in render.php, not here — that is the only way it reliably beats the shared
   rule's `all: unset` on the button AND takes effect in the editor's ServerSideRender preview. */

/* Desktop only: the pattern's title (.wdf-faq-list__title) is a constrained-layout child, so it is
   capped at contentSize (~1000px) and auto-centred, which leaves a large (~100px) side margin on wide
   screens. Lift the cap and give it a 32px side margin so it lines up with the section's edge spacing.
   Mobile/tablet are intentionally left untouched — there the heading already fills the width. */
@media (min-width: 1280px) {
  .wp-block-heading.wdf-faq-list__title {
    max-width: none;
    margin-left: 32px;
    margin-right: 32px;
  }
}
