<div class="container-only-desktop container-desktop-vertical-margin" {% render 'overwrite-theme-style', desktop_settings: section.settings %}>
<div class="container-only-mobile collapsible-content" {% render 'overwrite-theme-style', settings: section.settings %}>

    {%- if section.settings.eyebrow != blank -%}
        {%- capture style -%}
            {%- if section.settings.heading_alignment != 'left' -%}
                text-align: {{ section.settings.heading_alignment }};
            {%- endif -%}
        {%- endcapture -%}

        <p class="{% if section.settings.active_animations %}animated-element{% endif %}" 
            {% render 'overwrite-theme-style', 
                text_color: section.settings.heading_color, 
                font_size: section.settings.eyebrow_font_size, 
                font_weight: section.settings.eyebrow_font_weight, 
                append_style: style %}>
            {{ section.settings.eyebrow }}
        </p>
    {%- endif -%}

    {%- if section.settings.heading != blank -%}
        {%- capture style -%}
            {%- if section.settings.heading_alignment != 'left' -%}
                text-align: {{ section.settings.heading_alignment }};
            {%- endif -%}

            margin-bottom: {{ section.settings.headline_margin_bottom }}px;
        {%- endcapture -%}

        <h2 class="{% if section.settings.active_animations %}animated-element{% endif %}" 
            {% render 'overwrite-theme-style', 
                text_color: section.settings.heading_color, 
                font_size: section.settings.heading_font_size, 
                font_weight: section.settings.heading_font_weight, 
                line_height: section.settings.heading_line_height, 
                append_style: style %}>
            {{ section.settings.heading }}
        </h2>
    {%- endif -%}

    {%- capture style -%}
        {%- if section.settings.background_color == blank -%}
            padding: 0px;
        {%- else -%}
            {%- assign alpha = section.settings.background_color | color_extract: 'alpha' -%}

            {%- if alpha == 0 -%}
                padding: 0px;
            {%- endif -%}
        {%- endif -%}

        gap: {{ section.settings.gap }}px;
    {%- endcapture -%}
    <div class="collapsible-content-container" {% render 'overwrite-theme-style', background_color: section.settings.background_color, append_style: style %}>

        {%- for block in section.blocks -%}
        <div class="collapsible-content-row no-click-highlight {% if section.settings.show_bottom_border %} collapsible-content-row-border{% endif %}" {% render 'overwrite-theme-style', border_color: section.settings.overwrite_theme_border_color %}>
            <div class="collapsible-content-row-header">
                <h3 class="h4 font-body {% if section.settings.active_animations %}animated-element{% endif %}" {% render 'overwrite-theme-style', text_color: block.settings.heading_color, font_size: block.settings.heading_font_size %}>
                    <span>{{ block.settings.heading }}</span>
                    <span {% render 'overwrite-theme-style', background_color: section.settings.header_button_color, text_color: section.settings.header_button_icon_color %}>+</span>
                </h3>
            </div>
            <div class="collapsible-content-row-content"  {% render 'overwrite-theme-style', text_color: block.settings.text_color, font_size: block.settings.text_font_size %}>
                {{ block.settings.text }}
            </div>
        </div>
        {%- endfor -%}

    </div>
</div>
</div>

{% schema %}
{
    "name": "t:sections.section-faq.name",
    "settings": [
        {
            "type": "text",
            "id": "eyebrow",
            "label": "t:sections.section-faq.settings.eyebrow"
        },
        {
            "type": "text",
            "id": "heading",
            "label": "t:sections.section-faq.settings.heading"
        },
        {
            "type": "header",
            "content": "t:sections.general.settings"
        },
        {
            "type": "select",
            "id": "heading_alignment",
            "default": "left",
            "label": "t:sections.section-faq.settings.heading_alignment",
            "options": [
                {
                    "value": "left",
                    "label": "t:sections.section-faq.settings.heading_alignment_left"
                },
                {
                    "value": "center",
                    "label": "t:sections.section-faq.settings.heading_alignment_center"
                },
                {
                    "value": "right",
                    "label": "t:sections.section-faq.settings.heading_alignment_right"
                }
            ]
        },
        {
            "type": "range",
            "id": "headline_margin_bottom",
            "label": "t:sections.section-faq.settings.headline_margin_bottom",
            "min": 0,
            "max": 50,
            "step": 1,
            "unit": "px",
            "default": 15
        },
        {
            "type": "checkbox",
            "id": "show_bottom_border",
            "default": false,
            "label": "t:sections.section-faq.settings.show_bottom_border"
        },
        {
            "type": "color",
            "id": "header_button_color",
            "label": "t:sections.section-faq.settings.header_button_color",
            "default": "#d9d9d9"
        },
        {
            "type": "color",
            "id": "header_button_icon_color",
            "label": "t:sections.section-faq.settings.header_button_icon_color",
            "default": "#000000"
        },
        {
            "type": "checkbox",
            "id": "active_animations",
            "label": "t:sections.general.active_animations",
            "default": true
        },
        {
            "type": "range",
            "id": "gap",
            "label": "t:sections.section-faq.settings.gap",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 22
        },
        {
            "type": "header",
            "content": "t:sections.general.mobile_margin"
        },
        {
            "type": "range",
            "id": "overwrite_theme_margin_top",
            "label": "t:sections.section-faq.settings.overwrite_theme_margin_top",
            "min": -20,
            "max": 70,
            "step": 1,
            "unit": "px",
            "default": 0
        },
        {
            "type": "range",
            "id": "overwrite_theme_margin_bottom",
            "label": "t:sections.section-faq.settings.overwrite_theme_margin_bottom",
            "min": -20,
            "max": 70,
            "step": 1,
            "unit": "px",
            "default": 0
        },
        {
            "type": "header",
            "content": "t:sections.section-faq.settings.desktop_margin"
        },
        {
            "type": "range",
            "id": "desktop_margin_top",
            "label": "t:sections.section-faq.settings.desktop_margin_top",
            "min": -200,
            "max": 200,
            "step": 5,
            "unit": "px",
            "default": 0
        },
        {
            "type": "range",
            "id": "desktop_margin_bottom",
            "label": "t:sections.section-faq.settings.desktop_margin_bottom",
            "min": -200,
            "max": 200,
            "step": 5,
            "unit": "px",
            "default": 0
        },
        {
            "type": "header",
            "content": "t:sections.general.theme-settings.content",
            "info": "t:sections.general.theme-settings.info"
        },
        {
            "type": "color",
            "id": "background_color",
            "label": "t:sections.section-faq.settings.background_color",
            "info": "t:sections.section-faq.settings.background_color_info"
        },
        {
            "type": "color",
            "id": "overwrite_theme_border_color",
            "label": "t:sections.section-faq.settings.overwrite_theme_border_color",
            "info": "t:sections.section-faq.settings.overwrite_theme_border_color_info"
        },
        {
            "type": "color",
            "id": "heading_color",
            "label": "t:sections.section-faq.settings.heading_color",
            "info": "t:sections.section-faq.settings.heading_color_info"
        },
        {
            "type": "range",
            "id": "eyebrow_font_size",
            "label": "t:sections.section-faq.settings.eyebrow_font_size",
            "min": 0,
            "max": 50,
            "step": 1,
            "unit": "px",
            "default": 0,
            "info": "t:sections.section-faq.settings.eyebrow_font_size_info"
        },
        {
            "type": "select",
            "id": "eyebrow_font_weight",
            "default": "0",
            "label": "t:sections.section-faq.settings.eyebrow_font_weight",
            "info": "t:sections.general.theme-settings.overwrite_theme_font_weight_info",
            "options": [
                {
                    "value": "0",
                    "label": "t:sections.general.theme-settings.overwrite_theme_font_weight_default"
                },
                {
                    "value": "400",
                    "label": "400"
                },
                {
                    "value": "500",
                    "label": "500"
                },
                {
                    "value": "600",
                    "label": "600"
                },
                {
                    "value": "700",
                    "label": "700"
                }
            ]
        },
        {
            "type": "range",
            "id": "heading_font_size",
            "label": "t:sections.section-faq.settings.heading_font_size",
            "min": 0,
            "max": 50,
            "step": 1,
            "unit": "px",
            "default": 0,
            "info": "t:sections.section-faq.settings.heading_font_size_info"
        },
        {
            "type": "range",
            "id": "heading_line_height",
            "label": "t:sections.section-faq.settings.heading_line_height",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 0,
            "info": "t:sections.general.theme-settings.overwrite_theme_line_height_info"
        },
        {
            "type": "select",
            "id": "heading_font_weight",
            "default": "0",
            "label": "t:sections.section-faq.settings.heading_font_weight",
            "info": "t:sections.general.theme-settings.overwrite_theme_font_weight_info",
            "options": [
                {
                    "value": "0",
                    "label": "t:sections.general.theme-settings.overwrite_theme_font_weight_default"
                },
                {
                    "value": "400",
                    "label": "400"
                },
                {
                    "value": "500",
                    "label": "500"
                },
                {
                    "value": "600",
                    "label": "600"
                },
                {
                    "value": "700",
                    "label": "700"
                }
            ]
        },
        {
            "type": "range",
            "id": "overwrite_theme_container_horizontal_margin",
            "label": "t:sections.general.theme-settings.overwrite_theme_container_horizontal_margin",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 0,
            "info": "t:sections.general.theme-settings.overwrite_theme_container_horizontal_margin_info"
        }
    ],
    "blocks": [
        {
            "type": "row",
            "name": "t:sections.section-faq.blocks.row.name",
            "settings": [
                {
                    "type": "richtext",
                    "id": "heading",
                    "label": "t:sections.section-faq.blocks.row.settings.heading"
                },
                {
                    "type": "richtext",
                    "id": "text",
                    "label": "t:sections.section-faq.blocks.row.settings.text"
                },
                {
                    "type": "header",
                    "content": "t:sections.general.theme-settings.content",
                    "info": "t:sections.general.theme-settings.info"
                },
                {
                    "type": "color",
                    "id": "heading_color",
                    "label": "t:sections.section-faq.blocks.row.settings.heading_color",
                    "info": "t:sections.section-faq.blocks.row.settings.heading_color_info"
                },
                {
                    "type": "range",
                    "id": "heading_font_size",
                    "label": "t:sections.section-faq.blocks.row.settings.heading_font_size",
                    "min": 0,
                    "max": 50,
                    "step": 1,
                    "unit": "px",
                    "default": 0,
                    "info": "t:sections.section-faq.blocks.row.settings.heading_font_size_info"
                },
                {
                    "type": "color",
                    "id": "text_color",
                    "label": "t:sections.section-faq.blocks.row.settings.text_color",
                    "info": "t:sections.section-faq.blocks.row.settings.text_color_info"
                },
                {
                    "type": "range",
                    "id": "text_font_size",
                    "label": "t:sections.section-faq.blocks.row.settings.text_font_size",
                    "min": 0,
                    "max": 50,
                    "step": 1,
                    "unit": "px",
                    "default": 0,
                    "info": "t:sections.section-faq.blocks.row.settings.text_font_size_info"
                }
            ]
        }
    ],
    "presets": [
        {
            "name": "t:sections.section-faq.name"
        }
    ]
}
{% endschema %}