{# Search results #}
{% if cases and cases|length > 0 %}
  <div class="list-group mb-2">
    {% for case in cases %}
      {% include 'atlas/partials/_case_search_item.html' with case=case collection=collection show_select_button=show_select_button %}
    {% endfor %}
  </div>
{% else %}
  <div class="text-muted small mb-2">No cases found.</div>
{% endif %}

{# Recent cases quick-add (rendered below search results) #}
{% if recent_cases and recent_cases|length > 0 %}
  <div>
    <div class="small text-muted mb-1">Recently created</div>
    <div class="list-group">
      {% for case in recent_cases %}
        {% include 'atlas/partials/_case_search_item.html' with case=case collection=collection show_select_button=show_select_button %}
      {% endfor %}
    </div>
  </div>
{% endif %}
