UNPKG

insight-aid

Version:

Insight-aid: lightweight floating help + AI chatbot plugin

162 lines (143 loc) 3.26 kB
/* WRAPPER for toggle button (fixed to bottom-right) */ .iab-chat-wrapper { position: fixed; bottom: 20px; right: 20px; z-index: 9999; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } /* CHAT BOX: Absolute above toggle button */ .iab-chat-box { position: absolute; bottom:50px; /* Above toggle button */ right: 0; width: 360px; height: 480px; background: #fff; border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.25); display: none; flex-direction: column; overflow: hidden; transition: all 0.3s ease; } .iab-chat-box.open { display: flex; } .iab-toggle-btn img { width: 28px; height: 28px; } /* HEADER */ .iab-header { background: linear-gradient(90deg, #4a90e2, #007aff); color: #fff; padding: 14px 16px; font-size: 16px; font-weight: bold; position: relative; } .iab-close { position: absolute; top: 12px; right: 16px; cursor: pointer; font-size: 20px; font-weight: normal; opacity: 0.8; } .iab-close:hover { opacity: 1; } /* MESSAGES */ .iab-msgs { flex: 1; padding: 16px; overflow-y: auto; background: #f1f4f8; display: flex; flex-direction: column; gap: 12px; } .iab-msg { padding: 12px 16px; border-radius: 12px; max-width: 80%; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; } .iab-msg.user { align-self: flex-end; background: #d1ecff; color: #003b73; } .iab-msg.bot { align-self: flex-start; background: #ececec; color: #333; } /* INPUT AREA */ .iab-input-box { display: flex; border-top: 1px solid #ddd; padding: 10px; background: #fff; } .iab-input-box input { flex: 1; border: 1px solid #ccc; border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none; transition: border-color 0.2s ease; } .iab-input-box input:focus { border-color: #4a90e2; } .iab-input-box button { margin-left: 10px; background: #4a90e2; color: white; border: none; border-radius: 8px; padding: 10px 16px; cursor: pointer; font-size: 16px; transition: background 0.2s ease; } .iab-input-box button:hover { background: #357ac9; } .iab-toggle-btn { position: fixed; bottom: 10px; right: 20px; padding: 10px 16px; background: #2475cd; border-radius: 100px; /* No longer a circle */ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10001; pointer-events: auto; font-size: 13px; font-weight: bold; color:white; min-width: 140px; height: 40px; overflow: hidden; position: fixed; } /* Add button label via CSS */ .iab-toggle-btn::after { content: " Ask Insight"; display: block; color: inherit; font-weight: inherit; font-size: inherit; }