<div class="ldr-collapsible-log-panel">
    <div class="ldr-log-panel-header" id="log-panel-toggle">
        <i aria-hidden="true" class="fas fa-chevron-right ldr-toggle-icon"></i>
        <span>Research Logs</span>
        <span class="ldr-log-indicator" id="log-indicator">0</span>
    </div>
    <div class="ldr-log-panel-content collapsed" id="log-panel-content">
        <div class="ldr-log-controls">
            <div class="ldr-log-filter">
                <div class="ldr-filter-buttons">
                    <button class="ldr-small-btn ldr-selected" onclick="window.filterLogsByType('all')">All</button>
                    <button class="ldr-small-btn" onclick="window.filterLogsByType('milestone')">Milestones</button>
                    <button class="ldr-small-btn" onclick="window.filterLogsByType('info')">Info</button>
                    <button class="ldr-small-btn" onclick="window.filterLogsByType('warning')">Warning</button>
                    <button class="ldr-small-btn" onclick="window.filterLogsByType('error')">Errors</button>
                </div>
            </div>
            <div class="ldr-log-download">
                <button class="ldr-small-btn" id="log-download-button">
                    <i aria-hidden="true" class="fas fa-download"></i> Download Logs
                </button>
                <button class="ldr-small-btn ldr-selected"
                        id="log-autoscroll-button"
                        title="Toggle automatic scrolling of logs"
                        aria-label="Toggle automatic scrolling of logs">
                    <i aria-hidden="true" class="fas fa-arrows-alt-v"></i>
                </button>
            </div>
        </div>
        <div class="ldr-console-log" id="console-log-container">
            <!-- Logs will be added here dynamically -->
            <div class="ldr-empty-log-message">No logs yet. Research logs will appear here as they occur.</div>
        </div>
    </div>
</div>

<!-- Template for console log entries -->
<template id="console-log-entry-template">
    <div class="ldr-console-log-entry">
        <span class="ldr-log-timestamp"></span>
        <span class="ldr-log-badge"></span>
        <span class="ldr-log-message"></span>
    </div>
</template>
