<?php
/**
 * Instagent Help mode — chat panel + JS.
 *
 * Trigger button lives in the editor's topbar (.impulse-topbar-right)
 * — see admin/views/instinctor.php. This partial only owns the chat
 * panel that slides in from the right, plus the JS that wires up
 * trigger ↔ panel ↔ AJAX call to /api/relay/ai-help.
 *
 * UI rules: greyscale only, no emojis, Lucide icons, no visible
 * scrollbars (content scrolls; UI is invisible).
 */

if ( ! defined( 'ABSPATH' ) ) exit;
?>
<!-- INSTAGENT-HELP-PARTIAL-RENDERED -->
<?php // Panel styles moved to assets/css/instinctor-admin.css (WordPress.org compliance). ?>

<div id="instagent-help-panel" role="dialog" aria-label="Instagent Help">
    <div id="instagent-help-panel-header">
        <div class="title">Instagent <span>Help</span></div>
        <button type="button" class="close" id="instagent-help-close" aria-label="Close">
            <svg viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                <line x1="18" y1="6" x2="6" y2="18"/>
                <line x1="6" y1="6" x2="18" y2="18"/>
            </svg>
        </button>
    </div>
    <div id="instagent-help-messages"></div>
    <div id="instagent-help-context" style="display:none">
        <span class="label">Context</span>
        <span class="value" id="instagent-help-context-value"></span>
    </div>
    <div id="instagent-help-input-row">
        <textarea id="instagent-help-input" rows="1"
            placeholder="Ask anything about the editor…"
            aria-label="Your question"></textarea>
        <button type="button" id="instagent-help-send">Ask</button>
    </div>
</div>

<?php // Panel behaviour moved to the Instagent-Help IIFE in assets/js/admin.js (WordPress.org compliance). ?>
