/* Stockhouse AI — shared floating chat widget styles, used on every page. */
.ai-fab { position: fixed; right: 28px; bottom: 24px; z-index: 80; display: flex; align-items: center; gap: 8px; padding: 13px 18px 13px 14px; border-radius: 999px; border: 0; background: #1960bd; color: #ffffff; font-size: 13.5px; font-weight: 700; box-shadow: 0 12px 28px rgba(25,96,189,0.32); cursor: pointer; font-family: 'Albert Sans', system-ui, sans-serif; }
.ai-fab:hover { background: #124287; }
.ai-chat-panel { position: fixed; right: 28px; bottom: 92px; z-index: 81; width: 380px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 260px); background: #ffffff; border-radius: 18px; box-shadow: 0 24px 64px rgba(21,27,35,0.24); border: 1px solid #eef1f5; display: none; flex-direction: column; overflow: hidden; font-family: 'Albert Sans', system-ui, sans-serif; color: #151b23; }
.ai-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #eef1f5; background: #fafbfd; flex-shrink: 0; }
.ai-chat-head-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ai-chat-head-text .t { font-size: 14px; font-weight: 800; }
.ai-chat-head-text .s { font-size: 11px; font-weight: 500; color: #8da4be; }
.ai-chat-close { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; border: 0; background: transparent; color: #8da4be; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-chat-close:hover { background: #eef1f5; color: #384352; }
.ai-chat-body { flex: 1; overflow-y: auto; padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { display: flex; flex-direction: column; gap: 8px; }
.ai-msg.user { align-items: flex-end; }
.ai-msg.assistant { align-items: flex-start; }
.ai-bubble { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 13px; font-weight: 500; line-height: 1.45; }
.ai-msg.assistant .ai-bubble { background: #f4f7fa; color: #151b23; border-bottom-left-radius: 4px; }
.ai-msg.user .ai-bubble { background: #1960bd; color: #ffffff; border-bottom-right-radius: 4px; }
.ai-chip-row { display: flex; flex-wrap: wrap; gap: 6px; max-width: 92%; }
.ai-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid #cbd6e6; background: #ffffff; color: #1960bd; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.ai-chip:hover { background: #e8f0fc; }
.spend-bar-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.spend-bar-row:first-of-type { margin-top: 10px; }
.spend-bar-name { flex: 0 0 108px; font-size: 11.5px; font-weight: 700; color: #384352; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spend-bar-track { flex: 1; height: 7px; border-radius: 999px; background: #e5eaf1; overflow: hidden; }
.spend-bar-fill { height: 100%; border-radius: 999px; background: #1960bd; }
.spend-bar-val { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: #576a84; white-space: nowrap; }
.ai-chat-foot { padding: 12px 14px; border-top: 1px solid #eef1f5; flex-shrink: 0; }
.ai-input-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; border: 1px solid #cbd6e6; background: #ffffff; }
.ai-input-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; font-weight: 500; color: #151b23; font-family: inherit; }
.ai-mic-btn { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #eef1f5; color: #576a84; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-mic-btn.listening { background: #feecec; color: #dc2626; animation: aiPulse 1s ease-in-out infinite; }
.ai-mic-btn.unsupported { opacity: 0.45; cursor: not-allowed; }
.ai-send-btn { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #1960bd; color: #ffffff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
@keyframes aiPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.35); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }
