<button id="supportChatLauncher" class="support-chat-launcher" type="button" aria-expanded="false" aria-controls="supportChatPopup"><svg width="20" height="20" viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M21 11.5a8.5 8.5 0 0 1-8.5 8.5H5l-4 3V11.5a10 10 0 0 1 20 0Z"/></svg> Chat with us</button>
<section id="supportChatPopup" class="support-chat-popup" role="dialog" aria-labelledby="supportChatTitle" hidden><header class="support-chat-header"><div><strong id="supportChatTitle">Rockview Support</strong><small>AI assistant · Here to help</small></div><div><button id="assistantClear" type="button" aria-label="Clear conversation" title="Clear conversation"><svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7"><path d="M3 6h18M9 6V3h6v3M6 6l1 15h10l1-15M10 10v7m4-7v7"/></svg></button><button id="supportChatMinimise" type="button" aria-label="Minimise chat" title="Minimise chat">−</button></div></header><div id="assistantChat" class="support-chat-inner" data-mode="public" data-api="<?=htmlspecialchars(app_path(),ENT_QUOTES)?>/shared/api/assistant.php"><div id="assistantMessages" class="assistant-messages" role="log" aria-live="polite" aria-label="Support chat messages"></div><div id="assistantPrompts" class="assistant-prompts"><button type="button" data-chat-prompt="I have a general enquiry about Rockview University. How should I proceed?">General enquiries</button><button type="button" data-chat-prompt="I need help signing in to the student learning system.">Login support</button></div><p id="assistantStatus" class="assistant-status" role="status"></p><form id="assistantForm" class="assistant-composer"><label class="visually-hidden" for="assistantInput">Your message</label><textarea id="assistantInput" rows="1" maxlength="4000" placeholder="Type a message" required></textarea><button type="submit" id="assistantSend" aria-label="Send message">➤</button></form><p class="assistant-disclosure">AI support · Messages are sent to OpenRouter. Do not share passwords.</p></div></section>
