{% sw_extends '@Storefront/storefront/element/cms-element-faq.html.twig' %}
{% block element_faq_margin_top %}
<div class="boxed-layout my-4 faq-container tab-content w-full sm:inline-block lg:mt-0 {% if groups | length > 1 %}xl:col-span-9{% else %}xl:col-span-6 xl:col-start-4{% endif %}">
{% endblock %}
{% block element_faq_ul_style %}
<ul class="faq-select nav nav-tabs mb-4 flex md:flex-col flex-nowrap grid-gap-4 overflow-x-scroll flex-shrink-0 lg:w-[300px] lg:block lg:overflow-visible">
{% for group in groups %}
{% set name = 'FAQ_' ~ loop.index %}
<li class="custom-select-ul-child font-montserrat uppercase active:no-underline text-[#0A0A0B] tracking-wider font-bold flex items-center grid-gap-4 text-base leading-8 text-black">
<a class="tab-trigger border-b whitespace-nowrap active:no-underline text-sm lg:text-base py-2 text-black w-full flex grid-gap-4 justify-between items-center lg:whitespace-normal {% if loop.first %} active{% endif %}"
href="#{{ name }}_tab"
id="{{ name }}-tab"
data-toggle="tab"
role="tab"
aria-control="{{ name }}_tab"
aria-selected="true">
{{ group.name }}
</a>
{% if not loop.last %}
<span class="hidden">•</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}
{% block element_faq_style %}
<div class=" border-b border-[#C4C5CB] py-2"
x-data="{ id: {{ key }}, get expanded() { return this.active === this.id }, set expanded(value) { this.active = value ? this.id : null } }">
<div class="faq-question question-btn text-base font-bold text-grey-900 cursor-pointer leading-8 w-full flex justify-between"
x-on:click="expanded = !expanded" :aria-expanded="expanded">
{{ qa.question }}
<span
aria-hidden="true"
class="block w-6 h-6 transition-all duration-300 mt-1"
x-bind:style="expanded = expanded ? 'transform: rotate(180deg);' : ''">
{% sw_icon 'chevron-down' style{ 'pack': 'theme-icons', 'class': 'stroke full-size w-8' } %}
</span>
</div>
<div class="faq-answer wysiwyg"
x-show="expanded" x-collapse.duration.500ms>
<div class="text-grey-900 text-base leading-6 font-normal">
{{ qa.answer|raw }}
</div>
</div>
</div>
{% endblock %}