PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 3.5.3
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v3.5.3
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
supportcandy / asset / css / ai-chatbot / chatbot.css

chatbot.css in SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent 3.5.3, at asset/css/ai-chatbot/chatbot.css

622 lines 11.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 *,
2 *::before,
3 *::after {
4 box-sizing: border-box;
5 }
6
7 :host {
8 font-family: Arial, sans-serif;
9 }
10
11 /* Launcher */
12 .wpsc-chatbot-launcher {
13 position: fixed;
14 bottom: var(--wpsc-chatbot-offset-bottom, 20px);
15 right: var(--wpsc-chatbot-offset-right, 20px);
16 width: 56px;
17 height: 56px;
18 min-width: 56px;
19 min-height: 56px;
20 max-width: 56px;
21 max-height: 56px;
22 aspect-ratio: 1 / 1;
23 flex-shrink: 0;
24 border-radius: 50%;
25 padding: 0;
26 margin: 0;
27 border: none;
28 box-sizing: border-box;
29 display: flex;
30 align-items: center;
31 justify-content: center;
32 background: var(--wpsc-chatbot-launcher-bg, #2271b1);
33 color: var(--wpsc-chatbot-launcher-icon, #ffffff);
34 font-size: 22px;
35 line-height: 1;
36 cursor: pointer;
37 box-shadow: 0 4px 12px rgba(0,0,0,.2);
38 z-index: 9999;
39 will-change: transform;
40 }
41
42 /* Widget */
43 .wpsc-chatbot {
44 position: fixed;
45 bottom: var(--wpsc-chatbot-offset-bottom, 20px);
46 right: var(--wpsc-chatbot-offset-right, 20px);
47 width: min(400px, calc(100vw - 40px));
48 height: min(700px, calc(100vh - 120px));
49 display: flex;
50 flex-direction: column;
51 background: #fff;
52 border: 1px solid #ddd;
53 border-radius: 12px;
54 overflow: hidden;
55 box-shadow: 0 8px 24px rgba(0,0,0,.15);
56 z-index: 9999;
57 padding-bottom: env(safe-area-inset-bottom);
58 transform-origin: bottom right;
59 transform: scale(.8) translateY(20px);
60 opacity: 0;
61 visibility: hidden;
62 pointer-events: none;
63 }
64
65 .wpsc-chatbot.wpsc-chatbot--active {
66 transform: scale(1) translateY(0);
67 opacity: 1;
68 visibility: visible;
69 pointer-events: auto;
70 }
71
72 .wpsc-chatbot.active {
73 transform: scale(1) translateY(0);
74 opacity: 1;
75 visibility: visible;
76 pointer-events: auto;
77 }
78
79 .wpsc-chatbot-launcher {
80 opacity: 1;
81 transition: opacity .2s ease;
82 }
83
84 .wpsc-chatbot-launcher--hidden {
85 opacity: 0;
86 pointer-events: none;
87 }
88
89 /* Header Layout */
90 .wpsc-chatbot__header {
91 display: flex;
92 align-items: center;
93 justify-content: space-between;
94 gap: 12px;
95 flex-shrink: 0;
96 padding: 10px 16px;
97 background: var(--wpsc-chatbot-header-bg, #ffffff);
98 color: var(--wpsc-chatbot-header-fg, #111827);
99 border-bottom: 1px solid var(--wpsc-chatbot-header-border, #eeeeee);
100 }
101
102 .wpsc-chatbot__header-title {
103 flex: 1;
104 display: flex;
105 align-items: center;
106 gap: 5px;
107 min-width: 0;
108 font-size: 16px;
109 font-weight: 500;
110 overflow: hidden;
111 text-overflow: ellipsis;
112 white-space: nowrap;
113 }
114
115 /* Header Actions */
116 .wpsc-chatbot__header-actions {
117 display: flex;
118 align-items: center;
119 flex-shrink: 0;
120 gap: 4px;
121 }
122
123 .wpsc-chatbot__header-btn {
124 display: flex;
125 align-items: center;
126 justify-content: center;
127 width: 25px;
128 height: 25px;
129 padding: 0;
130 border: 0;
131 border-radius: 6px;
132 background: transparent;
133 color: var(--wpsc-chatbot-header-btn-fg, var(--wpsc-chatbot-header-fg, #111827));
134 cursor: pointer;
135 font-size: 18px;
136 line-height: 1;
137 transition: background-color .2s ease, color .2s ease;
138 }
139
140 .wpsc-chatbot__header-btn:hover {
141 background: var(--wpsc-chatbot-header-btn-hover, rgba(0, 0, 0, 0.08));
142 color: var(--wpsc-chatbot-header-btn-hover-fg, var(--wpsc-chatbot-header-fg, #111827));
143 }
144
145 .wpsc-chatbot__header-btn:focus-visible {
146 outline: 2px solid var(--wpsc-chatbot-header-btn-focus, #2271b1);
147 outline-offset: 2px;
148 }
149
150 .wpsc-chatbot__header-btn svg {
151 color: currentColor;
152 width: 15px;
153 height: 15px;
154 display: block;
155 }
156
157 .wpsc-chatbot__header-title svg {
158 color: currentColor;
159 fill: currentColor;
160 }
161
162 /* Minimize $ Maximize */
163 .wpsc-chatbot {
164 transition:
165 transform .50s ease,
166 opacity .50s ease,
167 visibility .50s ease,
168 height .30s ease;
169 }
170
171 .wpsc-chatbot__footer {
172 flex-shrink: 0;
173 background: #fff;
174 }
175
176 .wpsc-chatbot__body,
177 .wpsc-chatbot__footer {
178 transition:
179 opacity .25s ease,
180 transform .25s ease;
181 }
182
183 .wpsc-chatbot__compress,
184 .wpsc-chatbot--expanded .wpsc-chatbot__expand,
185 .wpsc-chatbot--expanded .wpsc-chatbot__minimize {
186 display: none;
187 }
188
189 .wpsc-chatbot--expanded .wpsc-chatbot__body,
190 .wpsc-chatbot--expanded .wpsc-chatbot__footer {
191 padding-left: 25vw;
192 padding-right: 25vw;
193 }
194
195 .wpsc-chatbot--expanded .wpsc-chatbot__compress {
196 display: inline-flex;
197 }
198
199 /* Fullscreen */
200 .wpsc-chatbot--fullscreen {
201 position: fixed;
202 top: 0;
203 right: 0;
204 bottom: 0;
205 left: 0;
206 width: 100vw;
207 height: 100dvh;
208 max-width: none;
209 max-height: none;
210 border-radius: 0;
211 z-index: 999999;
212 }
213
214 .wpsc-chatbot--fullscreen .wpsc-chatbot__header-title svg {
215 width: 35px;
216 height: 35px;
217 display: block;
218 fill: currentColor;
219 }
220
221 .wpsc-chatbot--fullscreen .wpsc-chatbot__header-btn svg {
222 color: var(--wpsc-chatbot-header-fg, #666);
223 fill: currentColor;
224 width: 20px;
225 height: 20px;
226 display: block;
227 }
228
229 .wpsc-chatbot--fullscreen .wpsc-chatbot__header-btn {
230 width: 35px;
231 height: 35px;
232 }
233
234 /* Body */
235 .wpsc-chatbot__body {
236 background: #f5f5f5;
237 flex: 1;
238 min-height: 0;
239 display: flex;
240 flex-direction: column;
241 padding: 15px;
242 overflow-y: auto;
243 overflow-x: hidden;
244 word-break: break-word;
245 overflow-wrap: break-word;
246 opacity: 1;
247 transform: translateY(0);
248 scroll-behavior: smooth;
249 }
250
251 /* System Message */
252 .wpsc-chatbot__system__message {
253 display: block;
254 align-self: flex-start;
255 font-size: 13px;
256 margin: 5px 0;
257 padding: 8px 12px;
258 background: #fff;
259 border-radius: 1rem;
260 box-shadow: 0 .25rem 6px rgba(0, 0, 0, .25);
261 max-width: 80%;
262 word-break: break-word;
263 overflow-wrap: anywhere;
264 border-bottom-left-radius: 1px;
265 }
266
267 /* User Message */
268 .wpsc-chatbot__user__message {
269 display: block;
270 align-self: flex-end;
271 font-size: 13px;
272 margin: 5px 0;
273 padding: 8px 12px;
274 background: #2271b1;
275 color: #fff;
276 border-radius: 1rem;
277 box-shadow: 0 .25rem 6px rgba(0, 0, 0, .25);
278 max-width: 80%;
279 word-break: break-word;
280 overflow-wrap: anywhere;
281 border-bottom-right-radius: 1px;
282 }
283
284 .wpsc-chatbot__message-meta {
285 display: flex;
286 gap: 6px;
287 margin-top: 3px;
288 font-size: 10px;
289 }
290
291 .wpsc-chatbot__message-content p {
292 margin: 0;
293 }
294
295 .wpsc-chatbot__system__message .wpsc-chatbot__message-meta {
296 justify-content: flex-start;
297 color: #666;
298 }
299
300 .wpsc-chatbot__user__message .wpsc-chatbot__message-meta {
301 justify-content: flex-end;
302 color: #ffffff;
303 }
304
305 /* Footer */
306 /* Input */
307 .wpsc-chatbot__input {
308 flex: 1;
309 width: 100%;
310 height: 44px;
311 min-height: 44px;
312 max-height: 120px;
313 padding: 12px 14px;
314 border: 1px solid #e5e7eb;
315 border-radius: 6px;
316 background: #fff;
317 color: #1f2937;
318 font: inherit;
319 font-size: 14px;
320 line-height: 1.4;
321 resize: none;
322 overflow-y: hidden;
323 box-sizing: border-box;
324 box-shadow:
325 0 1px 2px rgba(0,0,0,.04),
326 0 1px 3px rgba(0,0,0,.08);
327 transition:
328 border-color .2s ease,
329 box-shadow .2s ease,
330 background-color .2s ease;
331 }
332
333 .wpsc-chatbot__input-group {
334 flex-shrink: 0;
335 padding: 10px;
336 display: flex;
337 gap: 10px;
338 border-top: 1px solid #eee;
339 opacity: 1;
340 transform: translateY(0);
341 }
342
343 .wpsc-chatbot__input:hover {
344 border-color: #d1d5db;
345 }
346
347 .wpsc-chatbot__input:focus {
348 outline: none;
349 border-color: #2271b1;
350 box-shadow:
351 0 0 0 3px rgba(34,113,177,.15),
352 0 2px 8px rgba(0,0,0,.08);
353 }
354
355 .wpsc-chatbot__input::placeholder {
356 color: #9ca3af;
357 }
358
359 .wpsc-chatbot__powered-by {
360 display: flex;
361 align-items: center;
362 justify-content: center;
363 margin: 0px 0px 10px 0px;
364 font-size: 10px;
365 color: #9ca3af;
366 }
367
368 .wpsc-chatbot__powered-by a {
369 display: flex;
370 align-items: center;
371 justify-content: center;
372 height: auto;
373 padding-left: 5px;
374 }
375
376 .wpsc-chatbot__powered-by svg {
377 width: 75px;
378 }
379
380 .wpsc-chatbot__input-conversation-end {
381 display: flex;
382 align-items: center;
383 justify-content: center;
384 padding-top: 10px;
385 font-size: 10px;
386 color: #9ca3af;
387 }
388
389 /* Send Button */
390 .wpsc-chatbot__send {
391 display: none;
392 align-self: center;
393 width: 40px;
394 height: 40px;
395 min-width: 40px;
396 min-height: 40px;
397 max-width: 40px;
398 max-height: 40px;
399 aspect-ratio: 1 / 1;
400 flex-shrink: 0;
401 box-sizing: border-box;
402 align-items: center;
403 justify-content: center;
404 color: var(--wpsc-chatbot-header-fg, #ffffff);
405 background-color: var(--wpsc-chatbot-header-bg, #5bb122);
406 padding: 0;
407 margin: 0;
408 border: none;
409 cursor: pointer;
410 border-color: var(--wpsc-chatbot-header-bg, #2271b1);
411 border-radius: 50%;
412 }
413
414 @media (hover: hover) {
415 .wpsc-chatbot__send:hover {
416 color: var(--wpsc-chatbot-header-fg, #ffffff);
417 border-color: color-mix(in srgb, var(--wpsc-chatbot-header-bg, #2271b1) 85%, black);
418 background-color: color-mix(in srgb, var(--wpsc-chatbot-header-bg, #2271b1) 85%, black);
419 box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpsc-chatbot-header-bg, #2271b1) 25%, transparent);
420 }
421 }
422
423 .wpsc-chatbot__header-title svg,
424 .wpsc-chatbot__send svg {
425 width: 25px;
426 height: 25px;
427 display: block;
428 flex-shrink: 0;
429 pointer-events: none;
430 fill: currentColor;
431 }
432
433 .wpsc-chatbot-launcher svg {
434 width: 30px;
435 height: 30px;
436 flex-shrink: 0;
437 display: block;
438 fill: currentColor;
439 pointer-events: none;
440 }
441
442 /* Typing Indicator */
443 .wpsc-chatbot__typing {
444 display: inline-flex;
445 width: auto;
446 align-items: center;
447 gap: 4px;
448 padding: 10px 14px;
449 background: #f5f5f5;
450 border-radius: 18px;
451 max-width: 60px;
452 }
453
454 .wpsc-chatbot__typing span {
455 width: 5px;
456 height: 5px;
457 border-radius: 50%;
458 background: #7a7a7a;
459 animation: wpsc-chatbot-typing 1.2s infinite ease-in-out;
460 }
461
462 .wpsc-chatbot__typing span:nth-child(1) {
463 animation-delay: 0s;
464 }
465
466 .wpsc-chatbot__typing span:nth-child(2) {
467 animation-delay: 0.2s;
468 }
469
470 .wpsc-chatbot__typing span:nth-child(3) {
471 animation-delay: 0.4s;
472 }
473
474 @keyframes wpsc-chatbot-typing {
475 0%,
476 60%,
477 100% {
478 transform: translateY(0);
479 opacity: .5;
480 }
481
482 30% {
483 transform: translateY(-5px);
484 opacity: 1;
485 }
486 }
487
488 .wpsc-chatbot--disabled .wpsc-chatbot__body,
489 .wpsc-chatbot--disabled .wpsc-chatbot__footer,
490 .wpsc-chatbot--disabled .wpsc-chatbot__header {
491 opacity: .4;
492 user-select: none;
493 }
494
495 .wpsc-chatbot--disabled .wpsc-chatbot__body,
496 .wpsc-chatbot--disabled .wpsc-chatbot__footer {
497 pointer-events: none;
498 }
499
500 /* WebKit Browsers (Chrome, Edge, Safari) */
501 .wpsc-chatbot__input::-webkit-scrollbar,
502 .wpsc-chatbot__body::-webkit-scrollbar {
503 width: 8px;
504 }
505
506 .wpsc-chatbot__input::-webkit-scrollbar-track,
507 .wpsc-chatbot__body::-webkit-scrollbar-track {
508 background: transparent;
509 }
510
511 .wpsc-chatbot__input::-webkit-scrollbar-thumb,
512 .wpsc-chatbot__body::-webkit-scrollbar-thumb {
513 background: #d9d9d9;
514 border-radius: 999px;
515 }
516
517 .wpsc-chatbot__input::-webkit-scrollbar-thumb:hover,
518 .wpsc-chatbot__body::-webkit-scrollbar-thumb:hover {
519 background: #c5c5c5;
520 }
521
522 /* Firefox */
523 .wpsc-chatbot__input,
524 .wpsc-chatbot__body {
525 scrollbar-width: thin;
526 scrollbar-color: #d9d9d9 transparent;
527 }
528
529 /* Responsive */
530 @media (max-width: 768px) {
531
532 .wpsc-chatbot__expand,
533 .wpsc-chatbot__compress {
534 display: none;
535 }
536
537 .wpsc-chatbot__send {
538 display: flex;
539 }
540
541 .wpsc-chatbot__system__message,
542 .wpsc-chatbot__user__message {
543 font-size: 16px;
544 }
545
546 .wpsc-chatbot {
547 position: fixed;
548 top: 0;
549 right: 0;
550 bottom: 0;
551 left: 0;
552 width: 100vw;
553 height: 100dvh;
554 max-width: none;
555 max-height: none;
556 border-radius: 0;
557 z-index: 9999;
558 /* Height/top are kept in sync with window.visualViewport via JS while the on-screen
559 keyboard is open/closing, so a transition here would fight that and lag/jitter. */
560 transition: transform .3s ease, opacity .3s ease, visibility .3s ease;
561 }
562
563 /* Prevent iOS Safari from auto-zooming the page when the textarea receives focus -
564 it requires the focused field's font-size to be at least 16px. */
565 .wpsc-chatbot__input {
566 font-size: 16px;
567 }
568
569 .wpsc-chatbot--fullscreen {
570 position: fixed;
571 right: 0;
572 bottom: 0;
573 left: 0;
574 width: 100vw;
575 height: 100dvh;
576 max-width: none;
577 max-height: none;
578 border-radius: 0;
579 z-index: 999999;
580 }
581
582 .wpsc-chatbot--expanded .wpsc-chatbot__body {
583 padding-left: 2vw;
584 padding-right: 2vw;
585 }
586
587 .wpsc-chatbot--expanded .wpsc-chatbot__footer {
588 padding-left: 2vw;
589 padding-right: 2vw;
590 }
591
592 .wpsc-chatbot-launcher {
593 bottom: var(--wpsc-chatbot-offset-bottom, 16px);
594 right: var(--wpsc-chatbot-offset-right, 16px);
595 width: 52px;
596 height: 52px;
597 min-width: 52px;
598 min-height: 52px;
599 max-width: 52px;
600 max-height: 52px;
601 }
602
603 .wpsc-chatbot-launcher svg {
604 width: 26px;
605 height: 26px;
606 }
607
608 .wpsc-chatbot__header {
609 padding: 12px;
610 }
611
612 .wpsc-chatbot__header-btn {
613 width: 36px;
614 height: 36px;
615 font-size: 20px;
616 }
617
618 .wpsc-chatbot__header-btn svg {
619 width: 18px;
620 height: 18px;
621 }
622 }