{% extends "base.html" %}
{% block title %}{{ t.q_page_title }} - {{ config.APP_NAME }}{% endblock %}

{% block head %}
<style>
  .q-wizard { max-width: 560px; margin: 2rem auto; }
  .q-progress { margin-bottom: 1.5rem; }
  .q-progress__meta {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 6px;
  }
  .q-progress__label { font-size: 12px; font-weight: 600; color: #334155; }
  .q-progress__count { font-size: 11px; color: #94A3B8; }
  .q-progress__track {
    height: 4px; border-radius: 2px; background: #E2E8F0; overflow: hidden;
  }
  .q-progress__fill {
    height: 100%; border-radius: 2px; background: #1D4ED8;
    transition: width 0.3s ease;
  }
  .q-step-title { font-size: 1.25rem; font-weight: 800; color: #0F172A; margin: 0 0 4px; }
  .q-step-sub { font-size: 13px; color: #64748B; margin: 0 0 1.5rem; }
  .q-field-group { margin-bottom: 1.25rem; }
  .q-label {
    display: block; font-size: 12px; font-weight: 600;
    color: #334155; margin-bottom: 4px;
  }
  .q-label .required { color: #EF4444; }
  .q-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem; }
  .q-pills label { cursor: pointer; }
  .q-pills input[type="radio"],
  .q-pills input[type="checkbox"] { display: none; }
  .q-pill {
    display: inline-block; padding: 7px 14px; border-radius: 999px;
    border: 1px solid #E2E8F0; font-size: 12px; font-weight: 600;
    color: #94A3B8; transition: all 0.15s; background: transparent;
  }
  .q-pill:hover { background: #F1F5F9; color: #64748B; }
  input:checked + .q-pill { background: #1D4ED8; border-color: #1D4ED8; color: white; }
  .q-input {
    width: 100%; background: #F1F5F9; border: 1px solid #CBD5E1;
    border-radius: 10px; padding: 8px 12px; font-size: 13px;
    font-family: 'Inter', sans-serif; color: #0F172A; outline: none;
    box-sizing: border-box;
  }
  .q-input:focus { border-color: rgba(29,78,216,0.5); }
  .q-input--error { border-color: #EF4444; }
  .q-error-hint { font-size: 11px; color: #EF4444; margin-top: 4px; }
  textarea.q-input { resize: vertical; }
  select.q-input { appearance: auto; }
  .q-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; }
  .q-btn-back {
    padding: 8px 20px; font-size: 12px; font-weight: 600;
    border: 1px solid #CBD5E1; background: transparent; color: #64748B;
    border-radius: 10px; cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.15s;
  }
  .q-btn-back:hover { background: #F1F5F9; color: #475569; }
  .q-btn-next, .q-btn-submit {
    padding: 10px 24px; font-size: 13px; font-weight: 700;
    border: none; background: #1D4ED8; color: white; border-radius: 10px;
    cursor: pointer; font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 10px rgba(29,78,216,0.25); transition: all 0.15s;
  }
  .q-btn-next:hover, .q-btn-submit:hover { background: #1E40AF; }
  .q-prefill-card {
    background: #EFF6FF; border: 1.5px solid #BFDBFE;
    border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 1.5rem;
    font-size: 12px;
  }
  .q-prefill-card dt { color: #94A3B8; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
  .q-prefill-card dd { color: #0F172A; font-weight: 600; margin: 0 0 6px; }
  .q-privacy-box {
    background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 14px;
    padding: 12px 14px; margin-bottom: 1rem; font-size: 12px;
    color: #1E40AF; display: flex; gap: 8px; align-items: flex-start;
  }
  .q-privacy-box svg { flex-shrink: 0; margin-top: 1px; }
  .q-consent { margin-bottom: 1.25rem; }
  .q-consent label {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: 12px; color: #475569; cursor: pointer;
  }
  .q-consent input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
  .q-consent a { color: #1D4ED8; }
  .q-checkbox-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #475569; cursor: pointer;
  }
  .q-checkbox-label input[type="checkbox"] { margin: 0; flex-shrink: 0; }
  .q-card {
    background: white; border-radius: 16px; padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  }
  @media (max-width: 640px) {
    .q-card { padding: 24px 16px; }
  }
</style>
{% endblock %}

{% block content %}
<main style="background: linear-gradient(180deg, #F1F5F9, #F8FAFC); min-height: 80vh;">
  <div class="container-page py-12">
    <div class="q-wizard">
      <div class="q-progress" id="q-progress">
        <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>
      <div class="q-card">
        <div id="quote-step">
          {% include "partials/quote_step_" ~ step ~ ".html" %}
        </div>
      </div>
    </div>
  </div>
</main>
{% endblock %}
