{% extends "base.html" %}

{% block title %}Search — Ingestible{% endblock %}

{% block content %}
<div class="max-w-3xl mx-auto">
  <h1 class="text-2xl font-bold mb-6">Corpus Search</h1>
  <p class="text-gray-600 text-sm mb-4">Search across all ingested documents.</p>

  <form hx-post="/search-results" hx-target="#corpus-results" hx-indicator="#htmx-indicator" class="mb-6">
    <div class="flex gap-3">
      <input
        type="text"
        name="query"
        placeholder="Enter your search query..."
        class="flex-1 border border-gray-300 rounded-lg px-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-400"
        required
      >
      <button type="submit" class="bg-indigo-600 text-white px-5 py-2 rounded-lg text-sm hover:bg-indigo-700 transition">
        Search
      </button>
    </div>
  </form>

  <div id="corpus-results"></div>
</div>
{% endblock %}
