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

<div class="compare-table-background" {% render 'overwrite-theme-style', 
    background_color: section.settings.background_color, 
    padding_top: section.settings.padding_top, 
    padding_bottom: section.settings.padding_bottom %}>
<div class="container">
<div class="compare-table" style="width: {{ section.settings.desktop_width }}%; --compare-table-color-border: {{ section.settings.border_color | color_to_hex }}; --compare-table-color-primary: {{ section.settings.primary_color | color_to_hex }};">

    {%- if section.settings.eyebrow != blank -%}
        {%- capture eyebrow_style -%}
            text-align: {{ section.settings.heading_alignment }};
        {%- endcapture -%}
        <p class="ugc-videos-eyebrow {% 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: eyebrow_style %}>
            {{ section.settings.eyebrow }}
        </p>
    {%- endif -%}

    {%- if section.settings.heading != blank -%}
        {%- capture heading_style -%}
            text-align: {{ section.settings.heading_alignment }};
            margin-bottom: {{ section.settings.headline_margin_bottom }}px;
        {%- endcapture -%}
        <h2 class="ugc-videos-headline {% 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: heading_style %}>
            {{ section.settings.heading }}
        </h2>
    {%- endif -%}

    <div class="compare-table-row-headline">
        <div class="compare-table-row-text"></div>
        <span class="compare-table-row-first">{{ section.settings.other_column }}</span>
        <span class="compare-table-row-second">
            {%- if section.settings.we_image != blank -%}
                {% render 'image', image: section.settings.we_image %}
            {%- else -%}
                {{ section.settings.we_column }}
            {%- endif -%}
        </span>
    </div>
    <div class="compare-table-table">
        {%- for block in section.blocks -%}
            <div class="compare-table-row">
                <div class="compare-table-row-text" {% render 'overwrite-theme-style', text_color: section.settings.row_text_color %}>{{ block.settings.text }}</div>
                <div class="compare-table-row-first">{%- if block.settings.is_better -%}{% render 'icon-close', color: section.settings.icon_color %}{%- else -%}{% render 'icon-checkmark-circle', color: section.settings.icon_color %}{%- endif -%}</div>
                <div class="compare-table-row-second">{%- if block.settings.is_better -%}{% render 'icon-checkmark-circle', color: section.settings.icon_color %}{%- else -%}{% render 'icon-close', color: section.settings.icon_color %}{%- endif -%}</div>
            </div>
        {%- endfor -%}
    </div>
    <div class="compare-table-row-last">
        <div class="compare-table-row-text"></div>
        <div class="compare-table-row-first"></div>
        <div class="compare-table-row-second"></div>
    </div>

</div>
</div>

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

{% schema %}
{
    "name": "t:sections.section-compare-table.name",
    "settings": [
        {
            "type": "text",
            "id": "eyebrow",
            "label": "t:sections.section-compare-table.settings.eyebrow"
        },
        {
            "type": "text",
            "id": "heading",
            "label": "t:sections.section-compare-table.settings.heading"
        },
        {
            "type": "text",
            "id": "other_column",
            "label": "t:sections.section-compare-table.settings.other_column"
        },
        {
            "type": "text",
            "id": "we_column",
            "label": "t:sections.section-compare-table.settings.we_column"
        },
        {
            "type": "image_picker",
            "id": "we_image",
            "label": "t:sections.section-compare-table.settings.we_image"
        },
        {
            "type": "header",
            "content": "t:sections.general.settings"
        },
        {
            "type": "select",
            "id": "heading_alignment",
            "default": "left",
            "label": "t:sections.section-compare-table.settings.heading_alignment",
            "options": [
                {
                    "value": "left",
                    "label": "t:sections.section-compare-table.settings.heading_alignment_left"
                },
                {
                    "value": "center",
                    "label": "t:sections.section-compare-table.settings.heading_alignment_center"
                },
                {
                    "value": "right",
                    "label": "t:sections.section-compare-table.settings.heading_alignment_right"
                }
            ]
        },
        {
            "type": "checkbox",
            "id": "active_animations",
            "label": "t:sections.general.active_animations",
            "default": true
        },
        {
            "type": "range",
            "id": "headline_margin_bottom",
            "label": "t:sections.section-compare-table.settings.headline_margin_bottom",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 20
        },
        {
            "type": "range",
            "id": "desktop_width",
            "label": "t:sections.section-compare-table.settings.desktop_width",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "%",
            "default": 70
        },
        {
            "type": "color",
            "id": "border_color",
            "label": "t:sections.section-compare-table.settings.border_color",
            "default": "#d9d9d9"
        },
        {
            "type": "color",
            "id": "primary_color",
            "label": "t:sections.section-compare-table.settings.primary_color",
            "default": "#f9ca4f"
        },
        {
            "type": "header",
            "content": "t:sections.section-compare-table.settings.header_background"
        },
        {
            "type": "color",
            "id": "background_color",
            "label": "t:sections.section-compare-table.settings.background_color",
            "default": "#cccccc"
        },
        {
            "type": "color",
            "id": "icon_color",
            "label": "t:sections.section-compare-table.settings.icon_color",
            "default": "#000000"
        },
        {
            "type": "range",
            "id": "padding_top",
            "label": "t:sections.section-compare-table.settings.padding_top",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 50
        },
        {
            "type": "range",
            "id": "padding_bottom",
            "label": "t:sections.section-compare-table.settings.padding_bottom",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 50
        },
        {
            "type": "header",
            "content": "t:sections.general.mobile_margin"
        },
        {
            "type": "range",
            "id": "overwrite_theme_margin_top",
            "label": "t:sections.section-compare-table.settings.overwrite_theme_margin_top",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 30
        },
        {
            "type": "range",
            "id": "overwrite_theme_margin_bottom",
            "label": "t:sections.section-compare-table.settings.overwrite_theme_margin_bottom",
            "min": 0,
            "max": 100,
            "step": 1,
            "unit": "px",
            "default": 30
        },
        {
            "type": "header",
            "content": "t:sections.section-compare-table.settings.desktop_margin"
        },
        {
            "type": "range",
            "id": "desktop_margin_top",
            "label": "t:sections.section-compare-table.settings.desktop_margin_top",
            "min": -200,
            "max": 200,
            "step": 5,
            "unit": "px",
            "default": 50
        },
        {
            "type": "range",
            "id": "desktop_margin_bottom",
            "label": "t:sections.section-compare-table.settings.desktop_margin_bottom",
            "min": -200,
            "max": 200,
            "step": 5,
            "unit": "px",
            "default": 50
        },
        {
            "type": "header",
            "content": "t:sections.general.theme-settings.content",
            "info": "t:sections.general.theme-settings.info"
        },
        {
            "type": "color",
            "id": "row_text_color",
            "label": "t:sections.section-compare-table.settings.row_text_color",
            "info": "t:sections.section-compare-table.settings.row_text_color_info"
        },
        {
            "type": "color",
            "id": "heading_color",
            "label": "t:sections.section-compare-table.settings.heading_color",
            "info": "t:sections.section-compare-table.settings.heading_color_info"
        },
        {
            "type": "range",
            "id": "eyebrow_font_size",
            "label": "t:sections.section-compare-table.settings.eyebrow_font_size",
            "min": 0,
            "max": 50,
            "step": 1,
            "unit": "px",
            "default": 0,
            "info": "t:sections.section-compare-table.settings.eyebrow_font_size_info"
        },
        {
            "type": "select",
            "id": "eyebrow_font_weight",
            "default": "0",
            "label": "t:sections.section-compare-table.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-compare-table.settings.heading_font_size",
            "min": 0,
            "max": 50,
            "step": 1,
            "unit": "px",
            "default": 0,
            "info": "t:sections.section-compare-table.settings.heading_font_size_info"
        },
        {
            "type": "range",
            "id": "heading_line_height",
            "label": "t:sections.section-compare-table.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-compare-table.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"
                }
            ]
        }
    ],
    "blocks": [
        {
            "type": "row",
            "name": "t:sections.section-compare-table.blocks.row.name",
            "settings": [
                {
                    "type": "richtext",
                    "id": "text",
                    "label": "t:sections.section-compare-table.blocks.row.settings.text"
                },
                {
                    "type": "checkbox",
                    "id": "is_better",
                    "label": "t:sections.section-compare-table.blocks.row.settings.is_better",
                    "default": true
                }
            ]
        }
    ],
    "presets": [
        {
            "name": "t:sections.section-compare-table.name"
        }
    ]
}
{% endschema %}