|
1 | | -/* Chatbot Widget Styles */ |
2 | | - |
3 | | -.chatbot-widget { |
4 | | - position: fixed; |
5 | | - bottom: 20px; |
6 | | - right: 20px; |
7 | | - z-index: 1000; |
8 | | - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, |
9 | | - Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; |
10 | | - line-height: 1.4; |
| 1 | +/* match styles of llm_bot Chatbot icon */ |
| 2 | +img.open-icon { |
| 3 | + max-height: 20px !important; |
| 4 | + max-width: 20px !important; |
11 | 5 | } |
12 | 6 |
|
13 | | -/* Toggle Button */ |
14 | | -.chatbot-toggle { |
15 | | - background-color: var(--md-primary-fg-color, #2196f3); |
16 | | - color: white; |
| 7 | +.open-icon { |
17 | 8 | border: none; |
18 | | - border-radius: 50%; |
19 | | - width: 60px; |
20 | | - height: 60px; |
21 | | - cursor: pointer; |
22 | | - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); |
23 | | - display: flex; |
24 | | - align-items: center; |
25 | | - justify-content: center; |
26 | | - font-weight: 500; |
27 | | - transition: transform 0.2s, background-color 0.2s; |
28 | | -} |
29 | | - |
30 | | -.chatbot-toggle:hover { |
31 | | - transform: scale(1.05); |
32 | | - background-color: var(--md-primary-fg-color--dark, #1976d2); |
33 | | -} |
34 | | - |
35 | | -/* Container */ |
36 | | -.chatbot-container { |
37 | | - position: absolute; |
38 | | - bottom: 70px; |
39 | | - right: 0; |
40 | | - width: 350px; |
41 | | - height: 500px; |
42 | | - background-color: white; |
43 | | - border-radius: 12px; |
44 | | - box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2); |
45 | | - display: flex; |
46 | | - flex-direction: column; |
47 | | - overflow: hidden; |
48 | | - max-width: calc(100vw - 40px); |
49 | | - max-height: calc(100vh - 100px); |
50 | | -} |
51 | | - |
52 | | -/* Header */ |
53 | | -.chatbot-header { |
54 | | - background-color: var(--md-primary-fg-color, #2196f3); |
55 | | - color: white; |
56 | | - padding: 12px 16px; |
57 | | - display: flex; |
58 | | - justify-content: space-between; |
59 | | - align-items: center; |
60 | | - font-weight: 500; |
61 | | -} |
62 | | - |
63 | | -.chatbot-header button { |
64 | | - background: none; |
65 | | - border: none; |
66 | | - color: white; |
67 | | - font-size: 24px; |
68 | | - cursor: pointer; |
69 | | - padding: 0; |
70 | | - margin: 0; |
71 | | - line-height: 1; |
72 | | -} |
73 | | - |
74 | | -/* Message Area */ |
75 | | -.chatbot-body { |
76 | | - flex: 1; |
77 | | - padding: 16px; |
78 | | - overflow-y: auto; |
79 | | - background-color: #f5f7f9; |
80 | | - display: flex; |
81 | | - flex-direction: column; |
82 | | -} |
83 | | - |
84 | | -/* Messages */ |
85 | | -.chatbot-message { |
86 | | - margin-bottom: 12px; |
87 | | - max-width: 80%; |
88 | | - display: flex; |
89 | | -} |
90 | | - |
91 | | -.chatbot-message.user { |
92 | | - align-self: flex-end; |
93 | | -} |
94 | | - |
95 | | -.chatbot-message.bot { |
96 | | - align-self: flex-start; |
97 | | -} |
98 | | - |
99 | | -.chatbot-message-content { |
100 | | - padding: 10px 14px; |
101 | | - border-radius: 18px; |
102 | | - display: inline-block; |
103 | | - word-break: break-word; |
104 | | -} |
105 | | - |
106 | | -.chatbot-message.user .chatbot-message-content { |
107 | | - background-color: var(--md-primary-fg-color, #2196f3); |
108 | | - color: white; |
109 | | - border-bottom-right-radius: 4px; |
110 | | -} |
111 | | - |
112 | | -.chatbot-message.bot .chatbot-message-content { |
113 | | - background-color: white; |
114 | | - color: #333; |
115 | | - border-bottom-left-radius: 4px; |
116 | | - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); |
117 | | -} |
118 | | - |
119 | | -.chatbot-message.bot.error .chatbot-message-content { |
120 | | - background-color: #ffebee; |
121 | | - color: #d32f2f; |
122 | | -} |
123 | | - |
124 | | -/* Input Area */ |
125 | | -.chatbot-input-container { |
126 | | - display: flex; |
127 | | - padding: 12px; |
128 | | - background-color: white; |
129 | | - border-top: 1px solid #e0e0e0; |
130 | | -} |
131 | | - |
132 | | -#chatbot-input { |
133 | | - flex: 1; |
134 | | - border: 1px solid #e0e0e0; |
135 | | - border-radius: 20px; |
136 | | - padding: 8px 16px; |
137 | | - font-size: 14px; |
138 | | - color: black; |
139 | | - outline: none; |
140 | | - transition: border-color 0.2s; |
141 | | -} |
142 | | - |
143 | | -#chatbot-input:focus { |
144 | | - border-color: var(--md-primary-fg-color, #2196f3); |
145 | | -} |
146 | | - |
147 | | -#chatbot-send { |
148 | | - background-color: var(--md-primary-fg-color, #2196f3); |
149 | | - color: white; |
150 | | - border: none; |
151 | | - border-radius: 20px; |
152 | | - padding: 8px 16px; |
153 | | - margin-left: 8px; |
154 | | - cursor: pointer; |
155 | | - font-weight: 500; |
156 | | - transition: background-color 0.2s; |
157 | | -} |
158 | | - |
159 | | -#chatbot-send:hover { |
160 | | - background-color: var(--md-primary-fg-color--dark, #1976d2); |
161 | | -} |
162 | | - |
163 | | -/* Typing indicator */ |
164 | | -.typing-indicator { |
165 | | - display: flex; |
166 | | - align-items: center; |
167 | | -} |
168 | | - |
169 | | -.typing-indicator span { |
170 | | - height: 7px; |
171 | | - width: 7px; |
172 | | - float: left; |
173 | | - margin: 0 1px; |
174 | | - background-color: #9e9ea1; |
175 | | - display: block; |
176 | | - border-radius: 50%; |
177 | | - opacity: 0.4; |
178 | | - animation: typing 1s infinite; |
179 | | -} |
180 | | - |
181 | | -.typing-indicator span:nth-child(1) { |
182 | | - animation-delay: 0s; |
183 | | -} |
184 | | - |
185 | | -.typing-indicator span:nth-child(2) { |
186 | | - animation-delay: 0.2s; |
187 | | -} |
188 | | - |
189 | | -.typing-indicator span:nth-child(3) { |
190 | | - animation-delay: 0.4s; |
191 | | -} |
192 | | - |
193 | | -@keyframes typing { |
194 | | - 0% { |
195 | | - transform: translateY(0px); |
196 | | - } |
197 | | - 50% { |
198 | | - transform: translateY(-5px); |
199 | | - } |
200 | | - 100% { |
201 | | - transform: translateY(0px); |
202 | | - } |
203 | | -} |
204 | | - |
205 | | -/* Responsive adjustments */ |
206 | | -@media (max-width: 480px) { |
207 | | - .chatbot-container { |
208 | | - width: calc(100vw - 40px); |
209 | | - height: 60vh; |
210 | | - } |
| 9 | + max-width: 22px; |
| 10 | + margin-right: 8px; |
211 | 11 | } |
0 commit comments