{# Step 7: About You #}
<form hx-post="{{ url_for('leads.quote_step', step=7) }}"
      hx-target="#quote-step" hx-swap="innerHTML">
  <input type="hidden" name="_accumulated" value='{{ data | tojson }}'>
  <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">

  <h2 class="q-step-title">{{ t.q7_heading }}</h2>
  <p class="q-step-sub">{{ t.q7_subheading }}</p>

  <div class="q-field-group">
    <span class="q-label">{{ t.q7_role_label }} <span class="required">*</span></span>
    {% if 'stakeholder_type' in errors %}<p class="q-error-hint">{{ t.q7_error_role }}</p>{% endif %}
    <div class="q-pills">
      {% for val, label in [('entrepreneur', t.q7_role_entrepreneur), ('tennis_club', t.q7_role_tennis), ('municipality', t.q7_role_municipality), ('developer', t.q7_role_developer), ('operator', t.q7_role_operator), ('architect', t.q7_role_architect)] %}
      <label><input type="radio" name="stakeholder_type" value="{{ val }}" {{ 'checked' if data.get('stakeholder_type') == val }}><span class="q-pill">{{ label }}</span></label>
      {% endfor %}
    </div>
  </div>

  <div class="q-field-group">
    <span class="q-label">{{ t.q7_contact_label }}</span>
    <div class="q-pills">
      {% for val, label in [('first_time', t.q7_contact_first), ('researching', t.q7_contact_researching), ('received_quotes', t.q7_contact_received)] %}
      <label><input type="radio" name="previous_supplier_contact" value="{{ val }}" {{ 'checked' if data.get('previous_supplier_contact') == val }}><span class="q-pill">{{ label }}</span></label>
      {% endfor %}
    </div>
  </div>

  <div class="q-nav">
    <button type="button" class="q-btn-back"
            hx-get="{{ url_for('leads.quote_step', step=6, _accumulated=data | tojson) }}"
            hx-target="#quote-step" hx-swap="innerHTML">{{ t.q_btn_back }}</button>
    <button type="submit" class="q-btn-next">{{ t.q_btn_next }}</button>
  </div>
</form>

<div id="q-progress" hx-swap-oob="innerHTML">
  <div class="q-progress__meta">
    <span class="q-progress__label">{{ steps[step - 1].title }}</span>
    <span class="q-progress__count">{{ t.q_step_counter | tformat(step=step, total=steps|length) }}</span>
  </div>
  <div class="q-progress__track">
    <div class="q-progress__fill" style="width: {{ (step / steps|length * 100) | round }}%"></div>
  </div>
</div>
