{#
Job Polling Partial
Shows loading state while waiting for AI response, auto-polls for completion
#}
{% if player_action %}
<div class="player-action-echo">
    <span class="player-action-label">Your action:</span>
    <span class="player-action-text">{{ player_action }}</span>
</div>
{% endif %}

<div class="loading-state"
     hx-get="{{ url_for('game.poll_job', session_id=session_id, job_id=job_id) }}"
     hx-trigger="load delay:1s"
     hx-swap="innerHTML"
     hx-target="#narrative-content">
    <div class="loading-spinner-large"></div>
    <p class="loading-text">
        {% if status == 'queued' %}
        Awaiting the Dungeon Master...
        {% elif status == 'processing' %}
        The Dungeon Master considers your action...
        {% else %}
        Processing...
        {% endif %}
    </p>
</div>
