<div class="lf-card">
  <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:0.5rem">
    <span class="lf-card__heat lf-card__heat--{{ lead.heat_score or 'cool' }}">{{ (lead.heat_score or 'cool') | upper }}</span>
    <span class="lf-card__unlocks">{{ lead.unlock_count or 0 }} {{ t.sd_card_unlocks }}</span>
  </div>

  <dl class="lf-card__meta">
    <dt>{{ t.sd_card_facility }}</dt>
    <dd>{{ lead.facility_type or '-' }}</dd>
    <dt>{{ t.sd_card_courts }}</dt>
    <dd>{{ lead.court_count or '-' }}</dd>
    <dt>{{ t.sd_card_country }}</dt>
    <dd>{{ lead.country or '-' }}</dd>
    <dt>{{ t.sd_card_timeline }}</dt>
    <dd>{{ lead.timeline or '-' }}</dd>
    <dt>{{ t.sd_card_budget }}</dt>
    <dd>{% if lead.budget_estimate %}~&euro;{{ ((lead.budget_estimate | int / 1000) | round | int) }}K{% else %}-{% endif %}</dd>
    <dt>{{ t.sd_card_context }}</dt>
    <dd>{{ lead.build_context or '-' }}</dd>
  </dl>

  {% if lead.services_needed %}
  <p style="font-size:0.6875rem;color:#64748B;margin:0 0 0.5rem">{{ t.sd_card_services }} {{ lead.services_needed }}</p>
  {% endif %}

  <div class="lf-card__foot">
    <span class="lf-card__cost"><strong>{{ lead.credit_cost or '?' }}</strong> {{ t.sd_card_credits }}</span>
    <form hx-post="{{ url_for('suppliers.unlock_lead', token=lead.token) }}"
          hx-target="#lead-card-{{ lead.id }}" hx-swap="innerHTML">
      <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
      <button type="submit" class="lf-unlock-btn">{{ t.sd_card_unlock_btn }}</button>
    </form>
  </div>
</div>
