/** Shopify CDN: Minification failed

Line 16:0 Unexpected "{"
Line 16:1 Expected identifier but found "%"
Line 17:33 Unexpected "<"
Line 18:1 Expected identifier but found "%"
Line 20:0 Unexpected "<"
Line 22:3 Expected identifier but found "%"
Line 23:4 Unexpected "<"
Line 24:7 Unexpected "{"
Line 24:16 Expected ":"
Line 25:4 Unexpected "<"
... and 29 more hidden warnings

**/
{% comment %}
  Accordion Section using native <details>/<summary> and CSS Transitions
{% endcomment %}

<div class="accordion-container color-{{ section.settings.color_scheme }} gradient" id="Accordion-{{ section.id }}">

  {%- if section.settings.heading != blank -%}
    <h2 class="accordion-main-heading inline-richtext h2">
      {{ section.settings.heading }}
    </h2>
  {%- endif -%}

  <div class="accordion-items">
    {%- for block in section.blocks -%}
      {% comment %} Output details/summary structure directly {% endcomment %}
      <details class="accordion-item" {{ block.shopify_attributes }}>
        <summary class="accordion-heading">
          <span class="accordion-title h4">
            {{ block.settings.heading | default: "Accordion Heading" }}
          </span>
          {% render 'icon-caret' %}
        </summary>
        <div class="accordion-content rte">
          <div class="accordion-content-padding">
            {{ block.settings.content }}
          </div>
        </div>
      </details>
    {%- endfor -%}
  </div>

</div>

{% comment %} --- NO JavaScript needed for basic toggle & CSS animation --- {% endcomment %}

{% schema %}
  {
    "name": "CSS Accordion",
    "tag": "section",
    "class": "section",
    "settings": [
      {
        "type": "inline_richtext",
        "id": "heading",
        "label": "Section Heading",
        "default": "Frequently Asked Questions"
      },
      {
        "type": "color_scheme",
        "id": "color_scheme",
        "label": "Color scheme",
        "default": "scheme-1" /* Adjust default if needed */
      }
    ],
    "blocks": [
      {
        "type": "accordion_block",
        "name": "Accordion Item",
        "settings": [
          {
            "type": "text",
            "id": "heading",
            "label": "Item Heading",
            "default": "Question Title"
          },
          {
            "type": "richtext",
            "id": "content",
            "label": "Item Content",
            "default": "<p>Use this text to share information about your brand with your customers.</p>"
          }
        ]
      }
    ],
    "presets": [
      {
        "name": "CSS Accordion",
        "category": "Custom"
      }
    ],
    "max_blocks": 10
  }
{% endschema %}