{% extends "base.html" %}

{% block title %}Document Text - Deep Research System{% endblock %}

{% block extra_head %}
<link rel="stylesheet" href="/static/css/document_details.css">
{% endblock %}

{% block content %}
<div class="ldr-text-container">
    <div class="ldr-text-header">
        <h1>{{ title }}</h1>
        <div class="ldr-text-meta">
            {% if extraction_method %}
            <span class="ldr-text-meta-item">
                <strong>Extraction Method:</strong> {{ extraction_method }}
            </span>
            {% endif %}
            {% if word_count %}
            <span class="ldr-text-meta-item">
                <strong>Word Count:</strong> {{ "{:,}".format(word_count | int) }}
            </span>
            {% endif %}
        </div>
    </div>

    <div class="ldr-text-actions">
        <a href="/library/document/{{ document_id }}" class="ldr-btn ldr-btn-secondary">
            <i aria-hidden="true" class="fas fa-arrow-left"></i> Back to Document Details
        </a>
        <a href="/library" class="ldr-btn ldr-btn-secondary">
            <i aria-hidden="true" class="fas fa-home"></i> Back to Library
        </a>
    </div>

    <div class="ldr-text-content">{{ text_content }}</div>
</div>
{% endblock %}
