{% if results %}
  <div class="absolute z-10 w-full mt-1 bg-[#39404b] rounded-md shadow-lg border border-gray-600 max-h-60 overflow-auto">
    {% for season in results %}
      <button type="button"
              class="w-full px-4 py-2 text-left text-sm text-gray-300 hover:bg-[#2a2f35] hover:text-white"
              onclick="document.getElementById('parent-season-input').value = 'Season {{ season.item.season_number }} of {{ season.item.title }}'; document.getElementById('parent-season-id').value = '{{ season.id }}'; document.getElementById('parent-season-results').innerHTML = '';">
        {{ season.item.title }} - Season {{ season.item.season_number }}
      </button>
    {% endfor %}
  </div>
{% elif query %}
  <div class="absolute z-10 w-full mt-1 bg-[#39404b] rounded-md shadow-lg border border-gray-600 p-3">
    <p class="text-sm text-gray-400">No seasons found matching "{{ query }}". Please try a different search term.</p>
  </div>
{% endif %}
