#e2invest-chat-root {
--e2-primary: #0f52ba;
--e2-header-text: #ffffff;
--e2-bg: #f8fafc;
--e2-card-bg: #ffffff;
--e2-text: #1e293b;
--e2-text-muted: #64748b;
--e2-border: #e2e8f0;
--e2-bot-bubble-bg: #f1f5f9;
--e2-bot-bubble-text: #0f172a;
--e2-user-bubble-bg: var(--e2-primary);
--e2-user-bubble-text: #ffffff;
--e2-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
--e2-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
position: fixed;
bottom: 24px;
z-index: 999999;
font-family: var(--e2-font-family);
line-height: 1.5;
box-sizing: border-box;
}
#e2invest-chat-root * {
box-sizing: border-box;
}
#e2invest-chat-root.e2-pos-right {
right: 24px;
}
#e2invest-chat-root.e2-pos-left {
left: 24px;
} .e2-chat-bubble {
width: 60px;
height: 60px;
border-radius: 50%;
background-color: var(--e2-primary);
color: #ffffff;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
position: relative;
outline: none;
padding: 0;
}
.e2-chat-bubble:hover {
transform: scale(1.08);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}
.e2-chat-bubble:active {
transform: scale(0.96);
}
.e2-bubble-icon {
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.2s ease, transform 0.2s ease;
}
.e2-notification-badge {
position: absolute;
top: -2px;
right: -2px;
background-color: #ef4444;
color: #ffffff;
font-size: 11px;
font-weight: 700;
width: 20px;
height: 20px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid #ffffff;
animation: e2-pulse 2s infinite;
}
@keyframes e2-pulse {
0% { transform: scale(1); }
50% { transform: scale(1.15); }
100% { transform: scale(1); }
} .e2-chat-window {
position: absolute;
bottom: 76px;
width: 380px;
max-width: calc(100vw - 32px);
height: 560px;
max-height: calc(100vh - 110px);
background-color: var(--e2-card-bg);
border-radius: 18px;
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid var(--e2-border);
animation: e2-fade-slide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
transform-origin: bottom right;
}
#e2invest-chat-root.e2-pos-left .e2-chat-window {
left: 0;
transform-origin: bottom left;
}
#e2invest-chat-root.e2-pos-right .e2-chat-window {
right: 0;
transform-origin: bottom right;
}
@keyframes e2-fade-slide {
from {
opacity: 0;
transform: translateY(16px) scale(0.96);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
} .e2-chat-header {
background-color: var(--e2-primary);
color: var(--e2-header-text);
padding: 14px 16px;
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}
.e2-header-info {
display: flex;
align-items: center;
gap: 12px;
}
.e2-avatar {
width: 38px;
height: 38px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
flex-shrink: 0;
}
.e2-header-title {
font-size: 15px;
font-weight: 600;
line-height: 1.2;
}
.e2-header-status {
font-size: 12px;
opacity: 0.9;
display: flex;
align-items: center;
gap: 6px;
margin-top: 2px;
}
.e2-status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background-color: #22c55e;
box-shadow: 0 0 6px #22c55e;
}
.e2-header-actions {
display: flex;
align-items: center;
gap: 4px;
}
.e2-header-btn {
background: transparent;
border: none;
color: var(--e2-header-text);
opacity: 0.85;
cursor: pointer;
padding: 6px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s, opacity 0.2s;
}
.e2-header-btn:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.15);
} .e2-messages-container {
flex: 1;
overflow-y: auto;
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
background-color: var(--e2-bg);
scroll-behavior: smooth;
}
.e2-messages-container::-webkit-scrollbar {
width: 5px;
}
.e2-messages-container::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
} .e2-message {
display: flex;
flex-direction: column;
max-width: 85%;
animation: e2-msg-in 0.2s ease-out;
}
@keyframes e2-msg-in {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
.e2-msg-bot {
align-self: flex-start;
}
.e2-msg-user {
align-self: flex-end;
}
.e2-bubble {
padding: 10px 14px;
border-radius: 14px;
font-size: 14px;
word-break: break-word;
line-height: 1.45;
}
.e2-msg-bot .e2-bubble {
background-color: var(--e2-bot-bubble-bg);
color: var(--e2-bot-bubble-text);
border-bottom-left-radius: 3px;
border: 1px solid #e2e8f0;
}
.e2-msg-user .e2-bubble {
background-color: var(--e2-user-bubble-bg);
color: var(--e2-user-bubble-text);
border-bottom-right-radius: 3px;
}
.e2-bubble p {
margin: 0 0 6px 0;
}
.e2-bubble p:last-child {
margin-bottom: 0;
}
.e2-bubble ul, .e2-bubble ol {
margin: 4px 0 6px 18px;
padding: 0;
}
.e2-bubble a {
color: var(--e2-primary);
text-decoration: underline;
font-weight: 500;
}
.e2-msg-user .e2-bubble a {
color: #ffffff;
}
.e2-time {
font-size: 10px;
color: var(--e2-text-muted);
margin-top: 3px;
padding: 0 4px;
}
.e2-msg-user .e2-time {
align-self: flex-end;
} .e2-typing-indicator {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 10px 14px;
background-color: var(--e2-bot-bubble-bg);
border-radius: 14px;
border-bottom-left-radius: 3px;
border: 1px solid #e2e8f0;
align-self: flex-start;
}
.e2-typing-indicator span {
width: 6px;
height: 6px;
background-color: #94a3b8;
border-radius: 50%;
animation: e2-bounce 1.4s infinite ease-in-out;
}
.e2-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.e2-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes e2-bounce {
0%, 80%, 100% { transform: scale(0); }
40% { transform: scale(1); }
} .e2-quick-prompts {
display: flex;
gap: 8px;
padding: 8px 12px;
overflow-x: auto;
background-color: var(--e2-card-bg);
border-top: 1px solid var(--e2-border);
flex-shrink: 0;
}
.e2-quick-prompts::-webkit-scrollbar {
height: 3px;
}
.e2-quick-prompts::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}
.e2-prompt-chip {
background: #f1f5f9;
color: #334155;
border: 1px solid #cbd5e1;
padding: 6px 12px;
border-radius: 16px;
font-size: 12px;
cursor: pointer;
white-space: nowrap;
transition: background 0.2s, border-color 0.2s, color 0.2s;
outline: none;
}
.e2-prompt-chip:hover {
background: var(--e2-primary);
color: #ffffff;
border-color: var(--e2-primary);
} .e2-chat-input-area {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
background-color: var(--e2-card-bg);
border-top: 1px solid var(--e2-border);
flex-shrink: 0;
}
.e2-chat-input-area textarea {
flex: 1;
border: 1px solid var(--e2-border);
border-radius: 20px;
padding: 9px 14px;
font-size: 14px;
font-family: inherit;
resize: none;
max-height: 80px;
outline: none;
line-height: 1.3;
background-color: #f8fafc;
color: var(--e2-text);
transition: border-color 0.2s, box-shadow 0.2s;
}
.e2-chat-input-area textarea:focus {
border-color: var(--e2-primary);
background-color: #ffffff;
box-shadow: 0 0 0 2px rgba(15, 82, 186, 0.15);
}
.e2-btn-send {
width: 38px;
height: 38px;
border-radius: 50%;
background-color: var(--e2-primary);
color: #ffffff;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: transform 0.2s, opacity 0.2s;
}
.e2-btn-send:hover {
transform: scale(1.05);
}
.e2-btn-send:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
} @media (max-width: 480px) {
#e2invest-chat-root {
bottom: 16px;
}
#e2invest-chat-root.e2-pos-right {
right: 16px;
}
#e2invest-chat-root.e2-pos-left {
left: 16px;
}
.e2-chat-window {
position: fixed;
top: 0;
bottom: 0;
left: 0 !important;
right: 0 !important;
width: 100vw;
height: 100vh;
max-width: 100vw;
max-height: 100vh;
border-radius: 0;
border: none;
}
}