<div class="modal fade" id="followUpModal" tabindex="-1" aria-labelledby="followUpModalLabel" aria-hidden="true" style="z-index: 10000;">
    <div class="modal-dialog modal-lg modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Ask a Follow-up Question</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <div class="modal-body">
                <div class="alert alert-info">
                    <i class="fas fa-info-circle"></i>
                    <strong>What you can do with follow-up:</strong>
                    <ul class="mb-0 mt-2">
                        <li>Ask deeper questions about the research findings</li>
                        <li>Request different formatting (e.g., "provide this data in a table")</li>
                        <li>Explore specific aspects in more detail</li>
                        <li>Get clarification on complex topics</li>
                    </ul>
                    <small class="d-block mt-2">Your follow-up will build on the previous research context and sources.</small>
                </div>

                <div id="parentContext" class="mb-3 p-3 bg-light rounded" style="display: none;">
                    <h6>Previous Research:</h6>
                    <p id="parentSummary" class="text-muted"></p>
                    <small><span id="parentSources"></span> sources available for reuse</small>
                </div>

                <div class="mb-3">
                    <label for="followUpQuestion" class="form-label">Your Follow-up Question:</label>
                    <textarea
                        id="followUpQuestion"
                        class="form-control"
                        rows="3"
                        placeholder="Examples: 'Can you explain the timeline in more detail?' or 'Format the key findings as a comparison table' or 'What are the long-term implications?'"
                        required
                    ></textarea>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-primary" onclick="followUpResearch.submitFollowUp()">
                    <i class="fas fa-search"></i> Start Follow-up Research
                </button>
            </div>
        </div>
    </div>
</div>
