const openChatButton = document.getElementById('openChatContainer');
const osichatWidget = document.getElementById('osichatWidget');
const closeChatButton = document.getElementById('closeChatContainer');
const conversation = document.getElementById('conversation');

function scrollToBottom() {
    conversation.scrollTop = conversation.scrollHeight;
}

openChatButton.addEventListener('click', function () {
    osichatWidget.classList.remove('hidden');
    openChatButton.classList.add('hidden');
    closeChatButton.classList.remove('hidden');
    scrollToBottom();
});

function closeChat() {
    osichatWidget.classList.add('hidden');
    openChatButton.classList.remove('hidden');
    closeChatButton.classList.add('hidden');
}


closeChatButton.addEventListener('click', closeChat);



