{#
NPC Chat History Sidebar
Shows last 5 messages in compact cards with timestamps
#}
<div class="chat-history-sidebar">
    <h4 class="history-header">Recent Messages</h4>

    {% if messages %}
        <div class="history-list">
            {% for msg in messages|reverse %}
            <div class="history-card">
                <div class="history-timestamp">
                    {{ msg.timestamp|format_timestamp }}
                </div>
                <div class="history-player">
                    <strong>You:</strong> {{ msg.player_message|truncate(60) }}
                </div>
                <div class="history-npc">
                    <strong>NPC:</strong> {{ msg.npc_response|truncate(60) }}
                </div>
            </div>
            {% endfor %}
        </div>
    {% else %}
        <div class="history-empty">
            No previous messages
        </div>
    {% endif %}
</div>
