@modochats/widget 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2283 +0,0 @@
1
- /* Import Farsi/Persian fonts */
2
- @import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap");
3
-
4
- /* Base styles and variables */
5
- .modo-widget {
6
- /* Dark theme variables (default) */
7
- --primary-color: #667eea;
8
- --primary-hover: #5a67d8;
9
- --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
10
- --secondary-color: #f093fb;
11
- --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
12
- --success-color: #68d391;
13
- --warning-color: #fbb040;
14
- --danger-color: #fc8181;
15
-
16
- /* Dark theme colors */
17
- --gray-50: #1a202c;
18
- --gray-100: #2d3748;
19
- --gray-200: #4a5568;
20
- --gray-300: #718096;
21
- --gray-400: #a0aec0;
22
- --gray-500: #cbd5e0;
23
- --gray-600: #e2e8f0;
24
- --gray-700: #edf2f7;
25
- --gray-800: #f7fafc;
26
- --gray-900: #ffffff;
27
- --white: #1a202c;
28
- --black: #ffffff;
29
- --foreground-color: #ffffff;
30
-
31
- /* Background colors for dark theme */
32
- --bg-primary: #1a202c;
33
- --bg-secondary: #2d3748;
34
- --bg-tertiary: #4a5568;
35
- --bg-chat: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
36
- --bg-message: #4a5568;
37
- --bg-input: #2d3748;
38
- --bg-overlay: rgba(26, 32, 44, 0.95);
39
-
40
- /* Text colors for dark theme */
41
- --text-primary: #f7fafc;
42
- --text-secondary: #e2e8f0;
43
- --text-tertiary: #cbd5e0;
44
- --text-muted: #a0aec0;
45
-
46
- /* Border colors for dark theme */
47
- --border-color: #4a5568;
48
- --border-color-hover: #718096;
49
- --border-color-focus: #667eea;
50
-
51
- --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
52
- --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
53
- --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
54
- --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
55
- --border-radius: 16px;
56
- --border-radius-sm: 8px;
57
- --border-radius-lg: 24px;
58
- --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
59
- --z-index-widget: 9999;
60
- --z-index-overlay: 10001;
61
- }
62
-
63
- /* Light theme variables */
64
- .modo-widget[data-theme="light"] {
65
- /* Light theme colors */
66
- --gray-50: #f9fafb;
67
- --gray-100: #f3f4f6;
68
- --gray-200: #e5e7eb;
69
- --gray-300: #d1d5db;
70
- --gray-400: #9ca3af;
71
- --gray-500: #6b7280;
72
- --gray-600: #4b5563;
73
- --gray-700: #374151;
74
- --gray-800: #1f2937;
75
- --gray-900: #111827;
76
- --white: #ffffff;
77
- --black: #000000;
78
- --foreground-color: #1f2937;
79
-
80
- /* Background colors for light theme */
81
- --bg-primary: #ffffff;
82
- --bg-secondary: #f9fafb;
83
- --bg-tertiary: #f3f4f6;
84
- --bg-chat: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
85
- --bg-message: #f3f4f6;
86
- --bg-input: #ffffff;
87
- --bg-overlay: rgba(255, 255, 255, 0.95);
88
-
89
- /* Text colors for light theme */
90
- --text-primary: #1f2937;
91
- --text-secondary: #374151;
92
- --text-tertiary: #4b5563;
93
- --text-muted: #9ca3af;
94
-
95
- /* Border colors for light theme */
96
- --border-color: #e5e7eb;
97
- --border-color-hover: #d1d5db;
98
- --border-color-focus: #667eea;
99
-
100
- --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
101
- --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
102
- --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
103
- --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
104
- }
105
-
106
- /* Auto theme based on system preference */
107
- @media (prefers-color-scheme: light) {
108
- .modo-widget:not([data-theme]) {
109
- /* Light theme colors */
110
- --gray-50: #f9fafb;
111
- --gray-100: #f3f4f6;
112
- --gray-200: #e5e7eb;
113
- --gray-300: #d1d5db;
114
- --gray-400: #9ca3af;
115
- --gray-500: #6b7280;
116
- --gray-600: #4b5563;
117
- --gray-700: #374151;
118
- --gray-800: #1f2937;
119
- --gray-900: #111827;
120
- --white: #ffffff;
121
- --black: #000000;
122
- --foreground-color: #1f2937;
123
-
124
- /* Background colors for light theme */
125
- --bg-primary: #ffffff;
126
- --bg-secondary: #f9fafb;
127
- --bg-tertiary: #f3f4f6;
128
- --bg-chat: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
129
- --bg-message: #f3f4f6;
130
- --bg-input: #ffffff;
131
- --bg-overlay: rgba(255, 255, 255, 0.95);
132
-
133
- /* Text colors for light theme */
134
- --text-primary: #1f2937;
135
- --text-secondary: #374151;
136
- --text-tertiary: #4b5563;
137
- --text-muted: #9ca3af;
138
-
139
- /* Border colors for light theme */
140
- --border-color: #e5e7eb;
141
- --border-color-hover: #d1d5db;
142
- --border-color-focus: #667eea;
143
-
144
- --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
145
- --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
146
- --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
147
- --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
148
- }
149
- }
150
-
151
- /* Scoped styles for Modo Chat Widget */
152
- .modo-widget * {
153
- box-sizing: border-box;
154
- }
155
-
156
- /* Main widget container */
157
- .modo-widget {
158
- position: fixed;
159
- bottom: 32px;
160
- right: 32px;
161
- z-index: var(--z-index-widget);
162
- font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
163
- direction: rtl;
164
- text-align: right;
165
- }
166
-
167
- /* Fullscreen mode styles */
168
- .modo-widget.mw-fullscreen {
169
- position: fixed;
170
- top: 0;
171
- left: 0;
172
- right: 0;
173
- bottom: 0;
174
- width: 100vw;
175
- height: 100vh;
176
- max-width: 100vw;
177
- max-height: 100vh;
178
- border-radius: 0;
179
- border: none;
180
- z-index: 9999;
181
- }
182
-
183
- /* Desktop fullscreen with max dimensions */
184
- @media (min-width: 768px) {
185
- .modo-widget.mw-fullscreen {
186
- top: 50%;
187
- left: 50%;
188
- transform: translate(-50%, -50%);
189
- width: min(1200px, 90vw);
190
- height: min(800px, 90vh);
191
- max-width: 1200px;
192
- max-height: 800px;
193
- border-radius: var(--border-radius);
194
- border: 1px solid var(--border-color);
195
- box-shadow: var(--shadow-xl);
196
- }
197
- .mw-toggle-tooltip-text::after {
198
- top: 150% !important;
199
- }
200
- }
201
-
202
- .modo-widget[style*="left"] .mw-chat-body {
203
- right: auto !important;
204
- left: 0 !important;
205
- }
206
-
207
- /* .modo-widget[style*="left"] .mw-chat-message-user {
208
- margin-left: 0;
209
- margin-right: auto;
210
- border-bottom-left-radius: 4px;
211
- border-bottom-right-radius: var(--border-radius);
212
- }
213
-
214
- .modo-widget[style*="left"] .mw-chat-message-user::before {
215
- right: auto;
216
- left: -1px;
217
- border-top-right-radius: 16px;
218
- border-top-left-radius: 0;
219
- }
220
-
221
- .modo-widget[style*="left"] .mw-chat-message-supporter {
222
- margin-left: auto;
223
- margin-right: 0;
224
- border-bottom-right-radius: 4px;
225
- border-bottom-left-radius: var(--border-radius);
226
- }
227
-
228
- .modo-widget[style*="left"] .mw-chat-message-supporter::before {
229
- left: auto;
230
- right: -1px;
231
- border-top-left-radius: 16px;
232
- border-top-right-radius: 0;
233
- } */
234
-
235
- /* Chat inner container */
236
- .mw-chat-inner {
237
- position: relative;
238
- display: flex;
239
- flex-direction: column;
240
- }
241
-
242
- /* Fullscreen mode chat inner */
243
- .modo-widget.mw-fullscreen .mw-chat-inner {
244
- width: 100%;
245
- height: 100%;
246
- position: relative;
247
- display: flex;
248
- flex-direction: column;
249
- }
250
-
251
- /* Chat body - initially hidden */
252
- .mw-chat-body {
253
- position: absolute;
254
- bottom: 70px;
255
- right: 0;
256
- opacity: 0;
257
- visibility: hidden;
258
- transform: translateY(20px) scale(0.95);
259
- transition: var(--transition);
260
- z-index: var(--z-index-widget);
261
- }
262
-
263
- /* Fullscreen mode chat body */
264
- .modo-widget.mw-fullscreen .mw-chat-body {
265
- position: absolute;
266
- top: 0;
267
- left: 0;
268
- right: 0;
269
- bottom: 0;
270
- width: 100%;
271
- height: 100%;
272
- opacity: 1;
273
- visibility: visible;
274
- transform: none;
275
- }
276
- .mw-chat-body.mw-hidden {
277
- display: none !important;
278
- }
279
- .mw-chat-body.mw-active {
280
- opacity: 1;
281
- visibility: visible;
282
- transform: translateY(0) scale(1);
283
- }
284
-
285
- /* Hidden class for general use */
286
- .mw-hidden {
287
- opacity: 0 !important;
288
- visibility: hidden !important;
289
- transform: translateY(20px) scale(0.95) !important;
290
- }
291
-
292
- /* When chat body is NOT hidden, make it active */
293
- .mw-chat-body:not(.mw-hidden) {
294
- opacity: 1;
295
- visibility: visible;
296
- transform: translateY(0) scale(1);
297
- }
298
-
299
- /* Main chat container */
300
- .mw-chat-container {
301
- position: relative;
302
- width: 390px;
303
- height: 80svh;
304
- background: var(--bg-primary);
305
- border-radius: var(--border-radius-lg);
306
- box-shadow: var(--shadow-xl);
307
- overflow: hidden;
308
- backdrop-filter: blur(10px);
309
- border: 1px solid var(--border-color);
310
- color: var(--text-primary);
311
- }
312
-
313
- /* Fullscreen mode chat container */
314
- .modo-widget.mw-fullscreen .mw-chat-container {
315
- width: 100%;
316
- height: 100%;
317
- max-height: 100%;
318
- border-radius: 0;
319
- border: none;
320
- box-shadow: none;
321
- }
322
-
323
- /* Desktop fullscreen chat container */
324
- @media (min-width: 768px) {
325
- .modo-widget.mw-fullscreen .mw-chat-container {
326
- border-radius: var(--border-radius);
327
- border: 1px solid var(--border-color);
328
- box-shadow: var(--shadow-sm) !important;
329
- }
330
- }
331
-
332
- /* Chat header */
333
- .mw-chat-header {
334
- background: var(--primary-gradient);
335
- color: var(--foreground-color);
336
- padding: 20px;
337
- display: flex;
338
- justify-content: space-between;
339
- align-items: center;
340
- border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
341
- position: relative;
342
- }
343
-
344
- /* Fullscreen mode header */
345
- .modo-widget.mw-fullscreen .mw-chat-header {
346
- border-radius: 0;
347
- }
348
-
349
- /* Desktop fullscreen header */
350
- @media (min-width: 768px) {
351
- .modo-widget.mw-fullscreen .mw-chat-header {
352
- border-radius: var(--border-radius) var(--border-radius) 0 0;
353
- }
354
- }
355
-
356
- .mw-chat-header::before {
357
- content: "";
358
- position: absolute;
359
- top: 0;
360
- left: 0;
361
- right: 0;
362
- bottom: 0;
363
- background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
364
- pointer-events: none;
365
- }
366
-
367
- .mw-chat-title {
368
- font-size: 18px;
369
- font-weight: 600;
370
- margin: 0;
371
- z-index: 1;
372
- position: relative;
373
- color: var(--foreground-color);
374
- max-width: 80%;
375
- overflow: hidden;
376
- white-space: nowrap;
377
- text-overflow: ellipsis;
378
- }
379
-
380
- /* Connection status indicator */
381
- .mw-connection-status {
382
- width: 8px;
383
- height: 8px;
384
- border-radius: 50%;
385
- position: relative;
386
- transition: var(--transition);
387
- }
388
-
389
- .mw-connection-status.mw-connected {
390
- background: #68d391;
391
- box-shadow: 0 0 6px rgba(104, 211, 145, 0.6);
392
- animation: mw-pulse 2s infinite;
393
- }
394
-
395
- .mw-connection-status.mw-disconnected {
396
- background: #fc8181;
397
- box-shadow: 0 0 6px rgba(252, 129, 129, 0.6);
398
- }
399
-
400
- /* Conversation status icon */
401
- .mw-conversation-status-icon {
402
- display: flex;
403
- align-items: center;
404
- justify-content: center;
405
- width: 24px;
406
- height: 24px;
407
- border-radius: 50%;
408
- background: rgba(255, 255, 255, 0.1);
409
- border: 1px solid rgba(255, 255, 255, 0.2);
410
- transition: var(--transition);
411
- opacity: 1;
412
- visibility: visible;
413
- position: relative;
414
- cursor: pointer;
415
- z-index: 1000;
416
- }
417
- .mw-conversation-status-icon.mw-hidden {
418
- opacity: 0;
419
- visibility: hidden;
420
- transform: scale(0.8);
421
- }
422
-
423
- .mw-conversation-status-icon:hover {
424
- background: rgba(255, 255, 255, 0.2);
425
- transform: scale(1.1);
426
- }
427
-
428
- .mw-ai-chat-icon,
429
- .mw-human-chat-icon {
430
- fill: var(--white);
431
- transition: var(--transition);
432
- }
433
-
434
- .mw-conversation-status-icon.mw-ai-mode .mw-ai-chat-icon {
435
- display: block;
436
- }
437
-
438
- .mw-conversation-status-icon.mw-ai-mode .mw-human-chat-icon {
439
- display: none;
440
- }
441
-
442
- .mw-conversation-status-icon.mw-human-mode .mw-ai-chat-icon {
443
- display: none;
444
- }
445
-
446
- .mw-conversation-status-icon.mw-human-mode .mw-human-chat-icon {
447
- display: block;
448
- }
449
-
450
- /* Tooltip styles */
451
- .mw-tooltip {
452
- position: absolute;
453
- top: 50%;
454
- right: 100%;
455
- transform: translateY(-50%);
456
- margin-right: 8px;
457
- opacity: 0;
458
- visibility: hidden;
459
- transition: var(--transition);
460
- pointer-events: none;
461
- z-index: 10000;
462
- }
463
-
464
- .mw-conversation-status-icon:hover .mw-tooltip {
465
- opacity: 1;
466
- visibility: visible;
467
- transform: translateY(-50%) translateX(-4px);
468
- }
469
- .mw-tooltip-text-ai,
470
- .mw-tooltip-text-human {
471
- background: var(--bg-overlay);
472
- color: var(--text-primary);
473
- padding: 6px 12px;
474
- border-radius: var(--border-radius-sm);
475
- font-size: 12px;
476
- font-weight: 500;
477
- white-space: nowrap;
478
- box-shadow: var(--shadow-lg);
479
- backdrop-filter: blur(10px);
480
- border: 1px solid var(--border-color);
481
- position: relative;
482
- display: none;
483
- }
484
-
485
- .mw-tooltip-text-ai::after,
486
- .mw-tooltip-text-human::after {
487
- content: "";
488
- position: absolute;
489
- top: 50%;
490
- left: 100%;
491
- transform: translateY(-50%);
492
- border: 4px solid transparent;
493
- border-left-color: var(--bg-overlay);
494
- z-index: 100;
495
- }
496
-
497
- .mw-conversation-status-icon.mw-ai-mode .mw-tooltip-text-ai {
498
- display: block;
499
- }
500
-
501
- .mw-conversation-status-icon.mw-human-mode .mw-tooltip-text-human {
502
- display: block;
503
- }
504
-
505
- @keyframes mw-pulse {
506
- 0% {
507
- transform: scale(1);
508
- opacity: 1;
509
- }
510
- 50% {
511
- transform: scale(1.2);
512
- opacity: 0.7;
513
- }
514
- 100% {
515
- transform: scale(1);
516
- opacity: 1;
517
- }
518
- }
519
-
520
- .mw-new-conversation-btn {
521
- background: rgba(255, 255, 255, 0.2);
522
- border: none;
523
- color: var(--foreground-color);
524
- width: 36px;
525
- height: 36px;
526
- border-radius: 50%;
527
- display: flex;
528
- align-items: center;
529
- justify-content: center;
530
- font-size: 20px;
531
- font-weight: bold;
532
- cursor: pointer;
533
- transition: var(--transition);
534
- z-index: 1;
535
- position: relative;
536
- opacity: 1;
537
- visibility: visible;
538
- }
539
-
540
- .mw-new-conversation-btn.mw-hidden {
541
- opacity: 0;
542
- visibility: hidden;
543
- transform: scale(0.8);
544
- }
545
-
546
- .mw-new-conversation-btn:hover {
547
- background: rgba(255, 255, 255, 0.3);
548
- transform: scale(1.1);
549
- }
550
-
551
- .mw-new-conversation-btn.mw-visible {
552
- opacity: 1;
553
- visibility: visible;
554
- }
555
-
556
- /* Messages container */
557
- .mw-chat-messages-con {
558
- display: flex;
559
- flex-direction: column;
560
- height: calc(100% - 170px);
561
- padding: 20px;
562
- overflow-y: auto;
563
- background: var(--bg-chat);
564
- color: var(--text-primary);
565
- transition: height 0.3s ease;
566
- }
567
-
568
- /* Adjust height when reply preview is shown */
569
- .mw-chat-messages-con.mw-reply-active {
570
- height: calc(100% - 245px);
571
- }
572
-
573
- /* Fullscreen mode messages container */
574
- .modo-widget.mw-fullscreen .mw-chat-messages-con {
575
- height: calc(100% - 170px);
576
- }
577
-
578
- .modo-widget.mw-fullscreen .mw-chat-messages-con.mw-reply-active {
579
- height: calc(100% - 240px);
580
- }
581
-
582
- .mw-chat-messages-con::-webkit-scrollbar {
583
- width: 6px;
584
- }
585
-
586
- .mw-chat-messages-con::-webkit-scrollbar-track {
587
- background: var(--bg-secondary);
588
- border-radius: 3px;
589
- }
590
-
591
- .mw-chat-messages-con::-webkit-scrollbar-thumb {
592
- background: var(--border-color);
593
- border-radius: 3px;
594
- }
595
-
596
- .mw-chat-messages-con::-webkit-scrollbar-thumb:hover {
597
- background: var(--border-color-hover);
598
- }
599
-
600
- /* Message wrapper for positioning */
601
- .mw-message-wrapper {
602
- display: flex;
603
- flex-direction: column;
604
- margin-bottom: 12px;
605
- animation: mw-fadeInUp 0.3s ease-out;
606
- }
607
-
608
- /* Message feedback styles */
609
- .mw-message-feedback {
610
- display: inline-flex;
611
- gap: 2px;
612
- margin-top: 1px;
613
- justify-content: flex-start;
614
- opacity: 1;
615
- transition: var(--transition);
616
- margin-right: auto;
617
- }
618
-
619
- .mw-feedback-btn {
620
- background: none;
621
- border: none;
622
- padding: 2px;
623
- border-radius: 3px;
624
- cursor: pointer;
625
- transition: var(--transition);
626
- display: flex;
627
- align-items: center;
628
- justify-content: center;
629
- color: var(--text-muted);
630
- opacity: 0.6;
631
- width: 20px;
632
- height: 20px;
633
- }
634
-
635
- .mw-feedback-btn:hover {
636
- background: var(--bg-tertiary);
637
- opacity: 1;
638
- transform: scale(1.1);
639
- }
640
-
641
- .mw-feedback-btn.mw-feedback-active {
642
- opacity: 1;
643
- }
644
-
645
- .mw-feedback-btn.mw-feedback-disabled {
646
- opacity: 0.4;
647
- cursor: not-allowed;
648
- transform: none;
649
- }
650
-
651
- .mw-feedback-btn.mw-feedback-disabled:hover {
652
- background: none;
653
- transform: none;
654
- }
655
-
656
- .mw-feedback-icon {
657
- stroke: currentColor;
658
- fill: none;
659
- transition: var(--transition);
660
- }
661
-
662
- /* Feedback button specific styles */
663
- .mw-feedback-like.mw-feedback-active path {
664
- color: var(--success-color);
665
- fill: var(--success-color);
666
- stroke: var(--success-color);
667
- }
668
-
669
- .mw-feedback-dislike.mw-feedback-active {
670
- color: var(--danger-color);
671
- }
672
-
673
- .mw-message-wrapper-user {
674
- align-items: flex-end;
675
- }
676
-
677
- .mw-message-wrapper-supporter {
678
- align-items: flex-start;
679
- }
680
-
681
- /* Chat message styles */
682
- .mw-chat-message {
683
- padding: 12px 16px;
684
- border-radius: var(--border-radius);
685
- max-width: 75%;
686
- word-wrap: break-word;
687
- overflow-wrap: break-word;
688
- hyphens: auto;
689
- position: relative;
690
- z-index: 10;
691
- }
692
-
693
- .mw-message-content {
694
- margin: 0;
695
- }
696
-
697
- .mw-message-footer {
698
- display: flex;
699
- align-items: center;
700
- margin-top: 4px;
701
- gap: 4px;
702
- }
703
- .mw-message-wrapper-user .mw-message-footer {
704
- margin-left: auto;
705
- }
706
- .mw-message-wrapper-supporter .mw-message-footer {
707
- margin-right: auto;
708
- }
709
- .mw-message-time {
710
- font-size: 12px;
711
- opacity: 0.6;
712
- margin-top: 2px;
713
- font-weight: 400;
714
- color: var(--text-muted);
715
- }
716
-
717
- .mw-message-wrapper-user .mw-message-time {
718
- align-self: flex-start;
719
- margin-left: 8px;
720
- }
721
-
722
- .mw-message-wrapper-supporter .mw-message-time {
723
- align-self: flex-end;
724
- margin-right: 8px;
725
- }
726
-
727
- .mw-chat-message-user {
728
- background: var(--primary-gradient);
729
- color: var(--foreground-color);
730
- margin-left: auto;
731
- margin-right: 0;
732
- border-bottom-right-radius: 4px;
733
- box-shadow: var(--shadow-sm);
734
- position: relative;
735
- }
736
-
737
- .mw-chat-message-user::before {
738
- content: "";
739
- position: absolute;
740
- bottom: -1px;
741
- right: -1px;
742
- width: 16px;
743
- height: 16px;
744
- background: var(--bg-chat);
745
- border-top-left-radius: 16px;
746
- }
747
-
748
- .mw-chat-message-supporter {
749
- background: var(--bg-message);
750
- color: var(--text-primary);
751
- margin-left: 0;
752
- margin-right: auto;
753
- border-bottom-left-radius: 4px;
754
- border: 1px solid var(--border-color);
755
- position: relative;
756
- transition: var(--transition);
757
- }
758
-
759
- /* Message highlight animation */
760
- .mw-message-wrapper.mw-message-highlight .mw-chat-message {
761
- animation: mw-highlight-pulse 1s ease-out;
762
- }
763
-
764
- @keyframes mw-highlight-pulse {
765
- 0% {
766
- background: var(--primary-color);
767
- }
768
- 100% {
769
- /* background: var(--bg-message); */
770
- /* transform: scale(1); */
771
- }
772
- }
773
-
774
- .mw-chat-message-supporter::before {
775
- content: "";
776
- position: absolute;
777
- bottom: -1px;
778
- left: -1px;
779
- width: 16px;
780
- height: 16px;
781
- background: var(--bg-chat);
782
- border-top-right-radius: 16px;
783
- }
784
-
785
- /* Center system message styles */
786
- .mw-system-message {
787
- display: flex;
788
- justify-content: center;
789
- margin: 6px 0;
790
- animation: mw-fadeInUp 0.3s ease-out;
791
- }
792
-
793
- .mw-system-message-content {
794
- background: var(--bg-tertiary);
795
- color: var(--text-secondary);
796
- padding: 8px 16px;
797
- border-radius: var(--border-radius);
798
- font-size: 11px;
799
- font-weight: 500;
800
- border: 1px solid var(--border-color);
801
- box-shadow: var(--shadow-sm);
802
- max-width: 200px;
803
- text-align: center;
804
- backdrop-filter: blur(5px);
805
- position: relative;
806
- }
807
-
808
- /* Replied-to message preview */
809
- .mw-replied-to-preview {
810
- background: var(--bg-secondary);
811
- border-right: 3px solid var(--primary-color);
812
- border-radius: 6px;
813
- padding: 8px 12px;
814
- margin-bottom: 8px;
815
- margin-right: 4px;
816
- cursor: pointer;
817
- display: flex;
818
- flex-direction: column;
819
- gap: 4px;
820
- max-width: 100%;
821
- font-size: 12px;
822
- transition: all;
823
- }
824
-
825
- .mw-replied-to-preview:hover {
826
- transform: translateX(-2px);
827
- box-shadow: var(--shadow-sm);
828
- }
829
-
830
- .mw-replied-to-preview:active {
831
- transform: translateX(0);
832
- }
833
-
834
- /* User message replied-to preview */
835
- .mw-message-wrapper-user .mw-replied-to-preview {
836
- background: rgba(255, 255, 255, 0.1);
837
- border-right-color: rgba(255, 255, 255, 0.6);
838
- }
839
-
840
- .mw-message-wrapper-user .mw-replied-to-preview:hover {
841
- background: rgba(255, 255, 255, 0.15);
842
- }
843
-
844
- .mw-message-wrapper-user .mw-replied-to-sender {
845
- color: rgba(255, 255, 255, 0.8);
846
- }
847
-
848
- .mw-message-wrapper-user .mw-replied-to-content {
849
- color: rgba(255, 255, 255, 0.7);
850
- }
851
-
852
- .mw-replied-to-header {
853
- display: flex;
854
- align-items: center;
855
- gap: 4px;
856
- }
857
-
858
- .mw-replied-to-sender {
859
- font-weight: 600;
860
- color: var(--primary-color);
861
- font-size: 11px;
862
- text-transform: uppercase;
863
- letter-spacing: 0.5px;
864
- }
865
-
866
- .mw-replied-to-content {
867
- color: var(--text-secondary);
868
- font-size: 11px;
869
- line-height: 1.4;
870
- white-space: nowrap;
871
- overflow: hidden;
872
- text-overflow: ellipsis;
873
- max-width: 100%;
874
- opacity: 0.85;
875
- }
876
-
877
- /* File preview in messages */
878
- .mw-file-preview {
879
- display: flex;
880
- align-items: center;
881
- gap: 12px;
882
- background: var(--bg-secondary);
883
- border: 1px solid var(--border-color);
884
- border-radius: var(--border-radius-sm);
885
- padding: 10px 12px;
886
- margin-bottom: 8px;
887
- margin-right: 4px;
888
- text-decoration: none;
889
- color: inherit;
890
- transition: var(--transition);
891
- cursor: pointer;
892
- }
893
-
894
- .mw-file-preview:hover {
895
- background: var(--bg-tertiary);
896
- border-color: var(--primary-color);
897
- transform: translateX(-2px);
898
- box-shadow: var(--shadow-sm);
899
- }
900
-
901
- .mw-file-preview:active {
902
- transform: translateX(0);
903
- }
904
-
905
- .mw-message-wrapper-user .mw-file-preview {
906
- background: rgba(255, 255, 255, 0.1);
907
- border-color: rgba(255, 255, 255, 0.2);
908
- }
909
-
910
- .mw-message-wrapper-user .mw-file-preview:hover {
911
- background: rgba(255, 255, 255, 0.15);
912
- border-color: rgba(255, 255, 255, 0.4);
913
- }
914
-
915
- .mw-file-preview-icon {
916
- flex-shrink: 0;
917
- width: 32px;
918
- height: 32px;
919
- display: flex;
920
- align-items: center;
921
- justify-content: center;
922
- color: var(--primary-color);
923
- background: var(--bg-tertiary);
924
- border-radius: 6px;
925
- }
926
-
927
- .mw-message-wrapper-user .mw-file-preview-icon {
928
- background: rgba(255, 255, 255, 0.1);
929
- color: rgba(255, 255, 255, 0.9);
930
- }
931
-
932
- .mw-file-preview-icon svg {
933
- width: 20px;
934
- height: 20px;
935
- }
936
-
937
- .mw-file-preview-info {
938
- display: flex;
939
- flex-direction: column;
940
- gap: 2px;
941
- min-width: 0;
942
- flex: 1;
943
- }
944
-
945
- .mw-file-preview-name {
946
- font-size: 13px;
947
- font-weight: 600;
948
- color: var(--text-primary);
949
- white-space: nowrap;
950
- overflow: hidden;
951
- text-overflow: ellipsis;
952
- }
953
-
954
- .mw-message-wrapper-user .mw-file-preview-name {
955
- color: rgba(255, 255, 255, 0.9);
956
- }
957
-
958
- .mw-file-preview-type {
959
- font-size: 11px;
960
- color: var(--text-muted);
961
- text-transform: uppercase;
962
- letter-spacing: 0.5px;
963
- }
964
-
965
- .mw-message-wrapper-user .mw-file-preview-type {
966
- color: rgba(255, 255, 255, 0.7);
967
- }
968
-
969
- .mw-system-message-content::before {
970
- content: "";
971
- position: absolute;
972
- top: 0;
973
- left: 0;
974
- right: 0;
975
- bottom: 0;
976
- background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
977
- border-radius: inherit;
978
- pointer-events: none;
979
- }
980
-
981
- /* Starters container */
982
- .mw-starters-con {
983
- display: flex;
984
- flex-direction: column;
985
- align-items: center;
986
- justify-content: center;
987
- height: calc(100% - 172px);
988
- padding: 32px 20px;
989
- position: absolute;
990
- top: 68px;
991
- left: 0;
992
- width: 100%;
993
- background: var(--bg-chat);
994
- opacity: 1;
995
- visibility: visible;
996
- transition: var(--transition);
997
- color: var(--text-primary);
998
- text-align: center;
999
- }
1000
-
1001
- /* Fullscreen mode starters container */
1002
- .modo-widget.mw-fullscreen .mw-starters-con {
1003
- height: calc(100% - 140px);
1004
- }
1005
-
1006
- .mw-starters-con.mw-hidden {
1007
- opacity: 0;
1008
- visibility: hidden;
1009
- transform: translateY(20px);
1010
- }
1011
-
1012
- /* Starter welcome section */
1013
- .mw-starter-welcome {
1014
- margin-bottom: 24px;
1015
- display: flex;
1016
- flex-direction: column;
1017
- align-items: center;
1018
- gap: 16px;
1019
- }
1020
-
1021
- .mw-starter-logo {
1022
- width: 86px;
1023
- height: 86px;
1024
- border-radius: 50%;
1025
- object-fit: contain;
1026
- box-shadow: var(--shadow-lg);
1027
- border: 3px solid rgba(255, 255, 255, 0.1);
1028
- }
1029
-
1030
- .mw-starter-title {
1031
- font-size: 23px;
1032
- font-weight: 600;
1033
- color: var(--text-primary);
1034
- margin: 0;
1035
- }
1036
-
1037
- .mw-starter-subtitle {
1038
- font-size: 14px;
1039
- color: var(--text-secondary);
1040
- margin: 0;
1041
- }
1042
-
1043
- /* Individual starter items */
1044
- .mw-starter-item {
1045
- width: 100%;
1046
- max-width: 280px;
1047
- margin-bottom: 12px;
1048
- padding: 16px 20px;
1049
- background: var(--bg-message);
1050
- border: 1px solid var(--border-color);
1051
- border-radius: var(--border-radius);
1052
- cursor: pointer;
1053
- transition: var(--transition);
1054
- font-size: 14px;
1055
- font-weight: 500;
1056
- color: var(--text-primary);
1057
- text-align: center;
1058
- box-shadow: var(--shadow-sm);
1059
- position: relative;
1060
- overflow: hidden;
1061
- }
1062
-
1063
- .mw-starter-item::before {
1064
- content: "";
1065
- position: absolute;
1066
- top: 0;
1067
- left: -100%;
1068
- width: 100%;
1069
- height: 100%;
1070
- background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
1071
- transition: left 0.5s;
1072
- }
1073
-
1074
- .mw-starter-item:hover::before {
1075
- left: 100%;
1076
- }
1077
-
1078
- .mw-starter-item:hover {
1079
- background: var(--bg-tertiary);
1080
- border-color: var(--border-color-hover);
1081
- transform: translateY(-2px);
1082
- box-shadow: var(--shadow-md);
1083
- }
1084
-
1085
- .mw-starter-item:active {
1086
- transform: translateY(0);
1087
- box-shadow: var(--shadow-sm);
1088
- }
1089
-
1090
- /* Input area */
1091
- .mw-chat-input-area {
1092
- position: absolute;
1093
- bottom: 48px;
1094
- left: 16px;
1095
- right: 16px;
1096
- display: flex;
1097
- gap: 8px;
1098
- align-items: flex-end;
1099
- }
1100
-
1101
- /* Chat Footer */
1102
- .mw-chat-footer {
1103
- position: absolute;
1104
- bottom: 0;
1105
- left: 0;
1106
- right: 0;
1107
- padding: 8px 16px;
1108
- background: var(--bg-secondary);
1109
- border-top: 1px solid var(--border-color);
1110
- text-align: center;
1111
- font-size: 12px;
1112
- color: var(--text-muted);
1113
- display: flex;
1114
- gap: 4px;
1115
- justify-content: center;
1116
- }
1117
-
1118
- /* Fullscreen mode footer */
1119
- .modo-widget.mw-fullscreen .mw-chat-footer {
1120
- border-radius: 0;
1121
- }
1122
-
1123
- .mw-footer-text {
1124
- color: var(--text-muted);
1125
- }
1126
-
1127
- .mw-footer-link {
1128
- color: #b76bfe;
1129
- text-decoration: none;
1130
- font-weight: 500;
1131
- transition: var(--transition);
1132
- }
1133
-
1134
- .mw-footer-link:hover {
1135
- text-decoration: underline;
1136
- }
1137
-
1138
- /* Reply preview thumbnail */
1139
- .mw-reply-preview {
1140
- position: absolute;
1141
- bottom: 106px;
1142
- left: 16px;
1143
- right: 16px;
1144
- background: var(--bg-secondary);
1145
- border: 2px solid var(--border-color);
1146
- border-radius: var(--border-radius-sm);
1147
- padding: 8px 12px;
1148
- display: flex;
1149
- align-items: center;
1150
- justify-content: space-between;
1151
- transition: var(--transition);
1152
- box-shadow: var(--shadow-sm);
1153
- }
1154
-
1155
- .mw-reply-preview.mw-hidden {
1156
- display: none;
1157
- opacity: 0;
1158
- transform: translateY(10px);
1159
- pointer-events: none;
1160
- }
1161
-
1162
- .mw-reply-preview-content {
1163
- display: flex;
1164
- align-items: center;
1165
- justify-content: space-between;
1166
- width: 100%;
1167
- gap: 8px;
1168
- }
1169
-
1170
- .mw-reply-preview-info {
1171
- display: flex;
1172
- flex-direction: column;
1173
- gap: 4px;
1174
- flex: 1;
1175
- min-width: 0;
1176
- cursor: pointer;
1177
- }
1178
-
1179
- .mw-reply-preview-label {
1180
- font-size: 11px;
1181
- font-weight: 600;
1182
- color: var(--text-muted);
1183
- text-transform: uppercase;
1184
- letter-spacing: 0.5px;
1185
- }
1186
-
1187
- .mw-reply-preview-text {
1188
- font-size: 13px;
1189
- color: var(--text-secondary);
1190
- white-space: nowrap;
1191
- overflow: hidden;
1192
- text-overflow: ellipsis;
1193
- max-width: 100%;
1194
- }
1195
-
1196
- .mw-reply-preview-info:hover {
1197
- opacity: 0.8;
1198
- }
1199
-
1200
- .mw-reply-preview-close {
1201
- flex-shrink: 0;
1202
- width: 28px;
1203
- height: 28px;
1204
- padding: 0;
1205
- margin: 0;
1206
- background: transparent;
1207
- border: none;
1208
- color: var(--text-muted);
1209
- cursor: pointer;
1210
- display: flex;
1211
- align-items: center;
1212
- justify-content: center;
1213
- border-radius: 6px;
1214
- transition: var(--transition);
1215
- }
1216
-
1217
- .mw-reply-preview-close:hover {
1218
- background: var(--bg-tertiary);
1219
- color: var(--text-primary);
1220
- }
1221
-
1222
- .mw-reply-preview-close:active {
1223
- background: var(--border-color);
1224
- }
1225
-
1226
- /* File upload button */
1227
- .mw-file-upload-btn {
1228
- min-width: 44px;
1229
- height: 44px;
1230
- padding: 0;
1231
- margin: 0;
1232
- background: var(--bg-secondary);
1233
- color: var(--text-primary);
1234
- border: 2px solid var(--border-color);
1235
- border-radius: var(--border-radius);
1236
- cursor: pointer;
1237
- transition: var(--transition);
1238
- position: relative;
1239
- overflow: hidden;
1240
- display: flex;
1241
- align-items: center;
1242
- justify-content: center;
1243
- font-size: 12px;
1244
- font-weight: 600;
1245
- }
1246
-
1247
- .mw-file-upload-btn:hover {
1248
- border-color: var(--primary-color);
1249
- background: var(--bg-tertiary);
1250
- box-shadow: var(--shadow-md);
1251
- }
1252
-
1253
- .mw-file-upload-btn:active {
1254
- transform: translateY(0);
1255
- }
1256
-
1257
- .mw-file-upload-btn.mw-file-uploaded {
1258
- background: var(--primary-color);
1259
- border-color: var(--primary-color);
1260
- color: var(--white);
1261
- }
1262
-
1263
- .mw-file-upload-btn.mw-file-uploaded:hover {
1264
- background: var(--primary-hover);
1265
- border-color: var(--primary-hover);
1266
- }
1267
-
1268
- .mw-file-upload-icon,
1269
- .mw-file-remove-icon {
1270
- width: 20px;
1271
- height: 20px;
1272
- fill: currentColor;
1273
- transition: var(--transition);
1274
- }
1275
-
1276
- .mw-file-remove-icon.mw-hidden {
1277
- display: none;
1278
- }
1279
-
1280
- .mw-file-upload-icon.mw-hidden {
1281
- display: none;
1282
- }
1283
-
1284
- .mw-file-name {
1285
- position: absolute;
1286
- font-size: 10px;
1287
- white-space: nowrap;
1288
- padding: 0 4px;
1289
- max-width: 38px;
1290
- overflow: hidden;
1291
- text-overflow: ellipsis;
1292
- text-transform: uppercase;
1293
- letter-spacing: 0.5px;
1294
- }
1295
-
1296
- .mw-file-name.mw-hidden {
1297
- display: none;
1298
- }
1299
-
1300
- .mw-chat-input {
1301
- padding: 10px 16px;
1302
- border: 2px solid var(--border-color);
1303
- border-radius: var(--border-radius);
1304
- font-size: 14px;
1305
- font-family: inherit;
1306
- direction: rtl;
1307
- text-align: right;
1308
- background: var(--bg-input);
1309
- color: var(--text-primary);
1310
- transition: var(--transition);
1311
- box-shadow: var(--shadow-sm);
1312
- height: 44px;
1313
- flex: 1;
1314
- width: calc(100% - 40px - 40px);
1315
- }
1316
-
1317
- .mw-chat-input:focus {
1318
- outline: none;
1319
- border-color: var(--primary-color);
1320
- box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
1321
- }
1322
-
1323
- .mw-chat-input::placeholder {
1324
- color: var(--text-muted);
1325
- font-weight: 400;
1326
- }
1327
-
1328
- /* Send button */
1329
- .mw-send-message-btn {
1330
- min-width: 44px;
1331
- height: 44px;
1332
- padding: 0;
1333
- margin: 0;
1334
- background: var(--primary-gradient);
1335
- color: var(--white);
1336
- border: none;
1337
- border-radius: var(--border-radius);
1338
- cursor: pointer;
1339
- transition: var(--transition);
1340
- position: relative;
1341
- overflow: hidden;
1342
- box-shadow: var(--shadow-md);
1343
- display: flex;
1344
- align-items: center;
1345
- justify-content: center;
1346
- }
1347
-
1348
- .mw-send-message-btn::before {
1349
- content: "";
1350
- position: absolute;
1351
- top: 0;
1352
- left: -100%;
1353
- width: 100%;
1354
- height: 100%;
1355
- background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
1356
- transition: left 0.5s;
1357
- }
1358
-
1359
- .mw-send-message-btn:hover::before {
1360
- left: 100%;
1361
- }
1362
-
1363
- .mw-send-message-btn:hover {
1364
- box-shadow: var(--shadow-lg);
1365
- }
1366
-
1367
- .mw-send-message-btn:active {
1368
- transform: translateY(0);
1369
- }
1370
-
1371
- /* Send button icon and states */
1372
- .mw-send-icon {
1373
- width: 20px;
1374
- height: 20px;
1375
- fill: currentColor;
1376
- transition: var(--transition);
1377
- transform: rotate(-180deg);
1378
- }
1379
-
1380
- .mw-btn-text {
1381
- display: none; /* Hide text since we're using icon */
1382
- }
1383
-
1384
- .mw-btn-loading {
1385
- display: none;
1386
- width: 20px;
1387
- height: 20px;
1388
- }
1389
-
1390
- .mw-send-message-btn[data-is-loading="true"] .mw-send-icon {
1391
- display: none;
1392
- }
1393
-
1394
- .mw-send-message-btn[data-is-loading="true"] .mw-btn-loading {
1395
- display: flex;
1396
- align-items: center;
1397
- justify-content: center;
1398
- }
1399
-
1400
- /* Loading spinner */
1401
- .mw-loading-spinner {
1402
- width: 20px;
1403
- height: 20px;
1404
- animation: mw-spin 1s linear infinite;
1405
- }
1406
-
1407
- .mw-spinner-circle {
1408
- opacity: 0.25;
1409
- }
1410
-
1411
- .mw-spinner-path {
1412
- opacity: 0.75;
1413
- }
1414
-
1415
- @keyframes mw-spin {
1416
- from {
1417
- transform: rotate(0deg);
1418
- }
1419
- to {
1420
- transform: rotate(360deg);
1421
- }
1422
- }
1423
-
1424
- /* Form overlay */
1425
- .mw-form-overlay {
1426
- position: absolute;
1427
- top: 0;
1428
- left: 0;
1429
- right: 0;
1430
- bottom: 0;
1431
- background: var(--bg-overlay);
1432
- backdrop-filter: blur(10px);
1433
- border-radius: var(--border-radius-lg);
1434
- z-index: var(--z-index-overlay);
1435
- opacity: 0;
1436
- visibility: hidden;
1437
- transform: scale(0.95);
1438
- transition: var(--transition);
1439
- }
1440
-
1441
- .mw-form-overlay.mw-active {
1442
- opacity: 1;
1443
- visibility: visible;
1444
- transform: scale(1);
1445
- }
1446
-
1447
- .mw-form-overlay.mw-hidden {
1448
- opacity: 0 !important;
1449
- visibility: hidden !important;
1450
- transform: scale(0.95) !important;
1451
- }
1452
-
1453
- .mw-form-content {
1454
- padding: 24px;
1455
- height: 100%;
1456
- display: flex;
1457
- flex-direction: column;
1458
- background: var(--bg-primary);
1459
- border-radius: var(--border-radius-lg);
1460
- }
1461
-
1462
- .mw-form-title {
1463
- font-size: 20px;
1464
- font-weight: 600;
1465
- margin: 0 0 16px 0;
1466
- color: var(--text-primary);
1467
- }
1468
-
1469
- .mw-form-subtitle {
1470
- font-size: 14px;
1471
- font-weight: 400;
1472
- margin: 0 0 24px 0;
1473
- color: var(--text-secondary);
1474
- line-height: 1.5;
1475
- text-align: center;
1476
- }
1477
-
1478
- .mw-form-input-area {
1479
- flex: 1;
1480
- display: flex;
1481
- align-items: center;
1482
- }
1483
-
1484
- .mw-phone-input {
1485
- width: 100%;
1486
- padding: 16px 20px;
1487
- border: 2px solid var(--border-color);
1488
- border-radius: var(--border-radius);
1489
- font-size: 16px;
1490
- font-family: inherit;
1491
- direction: rtl;
1492
- text-align: right;
1493
- background: var(--bg-input);
1494
- color: var(--text-primary);
1495
- transition: var(--transition);
1496
- }
1497
-
1498
- .mw-phone-input:focus {
1499
- outline: none;
1500
- border-color: var(--primary-color);
1501
- box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
1502
- }
1503
-
1504
- /* Form buttons */
1505
- .mw-form-buttons {
1506
- display: flex;
1507
- gap: 12px;
1508
- margin-top: 24px;
1509
- }
1510
-
1511
- .mw-form-submit-btn,
1512
- .mw-form-cancel-btn {
1513
- flex: 1;
1514
- padding: 14px 24px;
1515
- border: none;
1516
- border-radius: var(--border-radius);
1517
- font-size: 16px;
1518
- font-weight: 600;
1519
- font-family: inherit;
1520
- cursor: pointer;
1521
- transition: var(--transition);
1522
- box-shadow: var(--shadow-sm);
1523
- }
1524
-
1525
- .mw-form-submit-btn {
1526
- background: var(--primary-gradient);
1527
- color: var(--foreground-color);
1528
- }
1529
-
1530
- .mw-form-submit-btn:hover {
1531
- transform: translateY(-2px);
1532
- box-shadow: var(--shadow-md);
1533
- }
1534
-
1535
- .mw-form-cancel-btn {
1536
- background: var(--bg-tertiary);
1537
- color: var(--text-primary);
1538
- border: 1px solid var(--border-color);
1539
- }
1540
-
1541
- .mw-form-cancel-btn:hover {
1542
- background: var(--border-color);
1543
- transform: translateY(-2px);
1544
- box-shadow: var(--shadow-md);
1545
- }
1546
-
1547
- /* Toggle chat button */
1548
- .mw-toggle-chat-btn {
1549
- background: var(--primary-gradient);
1550
- color: var(--foreground-color);
1551
- border: none;
1552
- padding: 10px;
1553
- border-radius: 50%;
1554
- font-size: 16px;
1555
- font-weight: 600;
1556
- font-family: inherit;
1557
- cursor: pointer;
1558
- transition: var(--transition);
1559
- box-shadow: var(--shadow-lg);
1560
- position: relative;
1561
- overflow: hidden;
1562
- width: 64px;
1563
- height: 64px;
1564
- display: flex;
1565
- align-items: center;
1566
- justify-content: center;
1567
- gap: 12px;
1568
- overflow: visible;
1569
- }
1570
-
1571
- /* Hide toggle button in fullscreen mode */
1572
- .modo-widget.mw-fullscreen .mw-toggle-chat-btn {
1573
- display: none !important;
1574
- }
1575
-
1576
- .mw-toggle-chat-btn:hover {
1577
- transform: translateY(-4px);
1578
- box-shadow: var(--shadow-xl);
1579
- }
1580
-
1581
- .mw-chat-toggle-image {
1582
- width: 40px;
1583
- height: 40px;
1584
- border-radius: 50%;
1585
- border: 2px solid rgba(255, 255, 255, 0.3);
1586
- transition: var(--transition);
1587
- background: rgba(255, 255, 255, 0.1);
1588
- object-fit: contain;
1589
- }
1590
-
1591
- .mw-chat-toggle-image:hover {
1592
- border-color: rgba(255, 255, 255, 0.5);
1593
- transform: scale(1.05);
1594
- }
1595
-
1596
- .mw-chat-toggle-close {
1597
- width: 24px;
1598
- height: 24px;
1599
- fill: currentColor;
1600
- transition: var(--transition);
1601
- display: none;
1602
- }
1603
-
1604
- /* Toggle button states */
1605
- .mw-toggle-chat-btn.mw-chat-open .mw-chat-toggle-image {
1606
- display: none;
1607
- }
1608
-
1609
- .mw-toggle-chat-btn.mw-chat-open .mw-chat-toggle-close {
1610
- display: block;
1611
- }
1612
-
1613
- /* Badge styles */
1614
- .mw-badge {
1615
- position: absolute;
1616
- top: -4px;
1617
- right: -4px;
1618
- background: var(--danger-color);
1619
- color: var(--white);
1620
- border-radius: 50%;
1621
- min-width: 20px;
1622
- height: 20px;
1623
- display: flex;
1624
- align-items: center;
1625
- justify-content: center;
1626
- font-size: 11px;
1627
- font-weight: 600;
1628
- border: 2px solid var(--bg-primary);
1629
- box-shadow: var(--shadow-sm);
1630
- z-index: 10;
1631
- animation: mw-badge-pulse 2s infinite;
1632
- }
1633
-
1634
- .mw-badge.mw-hidden {
1635
- display: none !important;
1636
- }
1637
-
1638
- .mw-badge-text {
1639
- line-height: 1;
1640
- padding: 0 2px;
1641
- }
1642
-
1643
- /* Badge pulse animation */
1644
- @keyframes mw-badge-pulse {
1645
- 0% {
1646
- transform: scale(1);
1647
- }
1648
- 50% {
1649
- transform: scale(1.1);
1650
- }
1651
- 100% {
1652
- transform: scale(1);
1653
- }
1654
- }
1655
-
1656
- /* Toggle button tooltip */
1657
- .mw-toggle-tooltip {
1658
- position: absolute;
1659
- bottom: 110%;
1660
- right: 0%;
1661
- margin-bottom: 8px;
1662
- opacity: 0;
1663
- visibility: hidden;
1664
- transition: var(--transition);
1665
- /* pointer-events: none; */
1666
- z-index: 1000;
1667
- opacity: 1;
1668
- visibility: visible;
1669
- }
1670
- .mw-toggle-tooltip .mw-tooltip-inner {
1671
- display: flex;
1672
- align-items: center;
1673
- gap: 8px;
1674
- background: var(--bg-overlay);
1675
- color: var(--text-primary);
1676
- padding: 8px 12px;
1677
- border-radius: var(--border-radius-sm);
1678
- border: 1px solid var(--border-color);
1679
- }
1680
- .mw-toggle-tooltip.mw-hidden {
1681
- display: none !important;
1682
- }
1683
-
1684
- .mw-toggle-tooltip-close {
1685
- background: transparent;
1686
- border: none;
1687
- color: var(--text-muted);
1688
- width: 18px;
1689
- height: 18px;
1690
- cursor: pointer;
1691
- display: flex;
1692
- align-items: center;
1693
- justify-content: center;
1694
- border-radius: 3px;
1695
- transition: var(--transition);
1696
- padding: 0;
1697
- flex-shrink: 0;
1698
- }
1699
-
1700
- .mw-toggle-tooltip-close:hover {
1701
- background: var(--border-color);
1702
- color: var(--text-primary);
1703
- }
1704
-
1705
- .mw-toggle-tooltip-close:active {
1706
- transform: scale(0.95);
1707
- }
1708
-
1709
- .mw-toggle-tooltip-text {
1710
- font-size: 12px;
1711
- font-weight: 500;
1712
- white-space: nowrap;
1713
- backdrop-filter: blur(10px);
1714
- position: relative;
1715
- }
1716
-
1717
- .mw-toggle-tooltip-text::after {
1718
- content: "";
1719
- position: absolute;
1720
- top: 130%;
1721
- right: -5%;
1722
- border: 4px solid transparent;
1723
- border-top-color: var(--bg-overlay);
1724
- z-index: 100;
1725
- }
1726
-
1727
- /* Badge states */
1728
- .mw-badge.mw-badge-success {
1729
- background: var(--success-color);
1730
- }
1731
-
1732
- .mw-badge.mw-badge-warning {
1733
- background: var(--warning-color);
1734
- }
1735
-
1736
- .mw-badge.mw-badge-primary {
1737
- background: var(--primary-color);
1738
- }
1739
-
1740
- /* Badge with plus sign for more than 99 */
1741
- .mw-badge.mw-badge-plus .mw-badge-text::after {
1742
- content: "+";
1743
- font-size: 8px;
1744
- margin-left: 1px;
1745
- }
1746
-
1747
- /* Tooltip positions */
1748
- .mw-toggle-tooltip.mw-tooltip-top {
1749
- bottom: 100%;
1750
- top: auto;
1751
- }
1752
-
1753
- .mw-toggle-tooltip.mw-tooltip-bottom {
1754
- top: 100%;
1755
- bottom: auto;
1756
- margin-top: 8px;
1757
- margin-bottom: 0;
1758
- }
1759
-
1760
- .mw-toggle-tooltip.mw-tooltip-left {
1761
- right: 100%;
1762
- left: auto;
1763
- top: 50%;
1764
- bottom: auto;
1765
- transform: translateY(-50%);
1766
- margin-right: 8px;
1767
- margin-bottom: 0;
1768
- }
1769
-
1770
- .mw-toggle-tooltip.mw-tooltip-right {
1771
- left: 100%;
1772
- right: auto;
1773
- top: 50%;
1774
- bottom: auto;
1775
- transform: translateY(-50%);
1776
- margin-left: 8px;
1777
- margin-bottom: 0;
1778
- }
1779
-
1780
- /* Tooltip arrow adjustments for different positions */
1781
- .mw-toggle-tooltip.mw-tooltip-bottom .mw-toggle-tooltip-text::after {
1782
- top: auto;
1783
- bottom: 100%;
1784
- border-top-color: transparent;
1785
- border-bottom-color: var(--bg-overlay);
1786
- }
1787
-
1788
- .mw-toggle-tooltip.mw-tooltip-left .mw-toggle-tooltip-text::after {
1789
- top: 50%;
1790
- left: 100%;
1791
- right: auto;
1792
- bottom: auto;
1793
- transform: translateY(-50%);
1794
- border-top-color: transparent;
1795
- border-left-color: var(--bg-overlay);
1796
- }
1797
-
1798
- .mw-toggle-tooltip.mw-tooltip-right .mw-toggle-tooltip-text::after {
1799
- top: 50%;
1800
- right: 100%;
1801
- left: auto;
1802
- bottom: auto;
1803
- transform: translateY(-50%);
1804
- border-top-color: transparent;
1805
- border-right-color: var(--bg-overlay);
1806
- }
1807
-
1808
- .mw-chat-toggle-text {
1809
- font-size: 16px;
1810
- font-weight: 600;
1811
- display: none; /* Hide text since button is now circular */
1812
- }
1813
-
1814
- /* Hide text on smaller screens, show only image */
1815
- @media (max-width: 480px) {
1816
- .mw-toggle-chat-btn {
1817
- width: 56px;
1818
- height: 56px;
1819
- padding: 10px;
1820
- border-radius: 50%;
1821
- }
1822
-
1823
- .mw-chat-toggle-text {
1824
- display: none;
1825
- }
1826
-
1827
- .mw-chat-toggle-image {
1828
- width: 40px;
1829
- height: 40px;
1830
- }
1831
-
1832
- .mw-chat-toggle-close {
1833
- width: 22px;
1834
- height: 22px;
1835
- }
1836
- }
1837
-
1838
- /* Responsive design */
1839
- @media (max-width: 768px) {
1840
- .modo-widget {
1841
- bottom: 16px;
1842
- right: 16px;
1843
- }
1844
-
1845
- .modo-widget[style*="left"] {
1846
- right: auto;
1847
- left: 16px;
1848
- }
1849
-
1850
- .mw-chat-container {
1851
- width: 350px;
1852
- height: 90vh;
1853
- max-height: 700px;
1854
- }
1855
-
1856
- .mw-chat-body {
1857
- right: 0;
1858
- bottom: 70px;
1859
- }
1860
-
1861
- .modo-widget[style*="left"] .mw-chat-body {
1862
- right: auto;
1863
- left: 0;
1864
- }
1865
-
1866
- .mw-toggle-chat-btn {
1867
- text-align: center;
1868
- }
1869
- }
1870
-
1871
- @media (max-width: 480px) {
1872
- .mw-chat-container {
1873
- height: 80vh;
1874
- border-radius: var(--border-radius);
1875
- }
1876
-
1877
- .mw-chat-header {
1878
- padding: 16px;
1879
- border-radius: var(--border-radius) var(--border-radius) 0 0;
1880
- }
1881
-
1882
- .mw-chat-title {
1883
- font-size: 18px;
1884
- }
1885
-
1886
- .mw-chat-messages-con,
1887
- .mw-starters-con {
1888
- padding: 16px;
1889
- }
1890
-
1891
- .mw-starter-welcome {
1892
- margin-bottom: 24px;
1893
- }
1894
-
1895
- .mw-starter-logo {
1896
- width: 76px;
1897
- height: 76px;
1898
- }
1899
-
1900
- .mw-starter-title {
1901
- font-size: 20px;
1902
- }
1903
-
1904
- .mw-starter-item {
1905
- max-width: 100%;
1906
- padding: 14px 16px;
1907
- font-size: 13px;
1908
- }
1909
-
1910
- .mw-chat-input-area {
1911
- bottom: 44px;
1912
- left: 12px;
1913
- right: 12px;
1914
- gap: 6px;
1915
- }
1916
-
1917
- .mw-chat-footer {
1918
- padding: 6px 12px;
1919
- font-size: 11px;
1920
- }
1921
-
1922
- .mw-chat-input {
1923
- height: 40px;
1924
- padding: 8px 14px;
1925
- font-size: 15px;
1926
- }
1927
-
1928
- .mw-send-message-btn {
1929
- width: 40px;
1930
- height: 40px;
1931
- }
1932
-
1933
- .mw-send-icon {
1934
- width: 18px;
1935
- height: 18px;
1936
- }
1937
-
1938
- .mw-btn-loading {
1939
- width: 18px;
1940
- height: 18px;
1941
- }
1942
-
1943
- /* Badge responsive styles */
1944
- .mw-badge {
1945
- min-width: 18px;
1946
- height: 18px;
1947
- font-size: 10px;
1948
- top: -3px;
1949
- right: -3px;
1950
- }
1951
-
1952
- /* Tooltip responsive styles */
1953
- .mw-toggle-tooltip-text {
1954
- font-size: 11px;
1955
- padding: 6px 10px;
1956
- }
1957
-
1958
- /* Feedback responsive styles */
1959
- .mw-feedback-btn {
1960
- padding: 1px;
1961
- width: 18px;
1962
- height: 18px;
1963
- }
1964
-
1965
- .mw-feedback-icon {
1966
- width: 10px;
1967
- height: 10px;
1968
- }
1969
- }
1970
-
1971
- /* RTL specific adjustments */
1972
- [dir="rtl"] .mw-chat-inner {
1973
- align-items: flex-start;
1974
- }
1975
-
1976
- @media (max-width: 768px) and (orientation: landscape) {
1977
- .mw-chat-container {
1978
- height: 90vh;
1979
- }
1980
- }
1981
-
1982
- /* Animation classes */
1983
- @keyframes mw-fadeInUp {
1984
- from {
1985
- opacity: 0;
1986
- transform: translateY(30px);
1987
- }
1988
- to {
1989
- opacity: 1;
1990
- transform: translateY(0);
1991
- }
1992
- }
1993
-
1994
- @keyframes mw-slideInRight {
1995
- from {
1996
- opacity: 0;
1997
- transform: translateX(30px);
1998
- }
1999
- to {
2000
- opacity: 1;
2001
- transform: translateX(0);
2002
- }
2003
- }
2004
-
2005
- .mw-fade-in-up {
2006
- animation: mw-fadeInUp 0.4s ease-out;
2007
- }
2008
-
2009
- .mw-slide-in-right {
2010
- animation: mw-slideInRight 0.4s ease-out;
2011
- }
2012
-
2013
- /* Custom scrollbar for better UX */
2014
- .modo-widget * {
2015
- scrollbar-width: thin;
2016
- scrollbar-color: var(--gray-300) var(--gray-100);
2017
- }
2018
-
2019
- /* Focus styles for accessibility */
2020
- .modo-widget button:focus-visible,
2021
- .modo-widget input:focus-visible {
2022
- outline: 2px solid var(--primary-color);
2023
- outline-offset: 2px;
2024
- }
2025
-
2026
- /* High contrast mode support */
2027
- @media (prefers-contrast: high) {
2028
- .modo-widget {
2029
- --border-color: var(--text-primary);
2030
- --border-color-hover: var(--text-primary);
2031
- --primary-color: #0066cc;
2032
- }
2033
- }
2034
-
2035
- /* Theme toggle button */
2036
- .mw-theme-toggle-btn {
2037
- background: rgba(255, 255, 255, 0.1);
2038
- border: 1px solid rgba(255, 255, 255, 0.2);
2039
- color: var(--foreground-color);
2040
- width: 32px;
2041
- height: 32px;
2042
- border-radius: 50%;
2043
- display: flex;
2044
- align-items: center;
2045
- justify-content: center;
2046
- font-size: 16px;
2047
- cursor: pointer;
2048
- transition: var(--transition);
2049
- z-index: 1;
2050
- position: relative;
2051
- margin-left: 8px;
2052
- }
2053
-
2054
- .mw-theme-toggle-btn:hover {
2055
- background: rgba(255, 255, 255, 0.2);
2056
- transform: scale(1.1);
2057
- }
2058
-
2059
- /* Smooth transitions for theme switching */
2060
- .modo-widget * {
2061
- transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
2062
- }
2063
-
2064
- /* Reduced motion support */
2065
- @media (prefers-reduced-motion: reduce) {
2066
- .modo-widget * {
2067
- animation-duration: 0.01ms !important;
2068
- animation-iteration-count: 1 !important;
2069
- transition-duration: 0.01ms !important;
2070
- }
2071
- }
2072
-
2073
- /* Voice Agent Styles */
2074
- .mw-voice-call-btn {
2075
- background: rgba(255, 255, 255, 0.2);
2076
- border: none;
2077
- color: var(--white);
2078
- width: 34px;
2079
- height: 34px;
2080
- border-radius: 50%;
2081
- display: flex;
2082
- align-items: center;
2083
- justify-content: center;
2084
- font-size: 16px;
2085
- cursor: pointer;
2086
- transition: var(--transition);
2087
- z-index: 1;
2088
- position: relative;
2089
- opacity: 1;
2090
- visibility: visible;
2091
- }
2092
- .mw-voice-call-btn.mw-hidden {
2093
- display: none !important;
2094
- }
2095
-
2096
- .mw-voice-call-btn:hover {
2097
- background: rgba(255, 255, 255, 0.3);
2098
- transform: scale(1.1);
2099
- }
2100
-
2101
- /* Voice call button tooltip */
2102
- .mw-voice-call-tooltip {
2103
- position: absolute;
2104
- top: 165%;
2105
- left: -15%;
2106
- margin-right: 8px;
2107
- opacity: 1;
2108
- visibility: visible;
2109
- transform: translateY(-50%) translateX(-4px);
2110
- transition: var(--transition);
2111
- pointer-events: none;
2112
- z-index: 10000;
2113
- }
2114
- .mw-voice-call-tooltip-text {
2115
- background: var(--bg-overlay);
2116
- color: var(--text-primary);
2117
- padding: 6px 12px;
2118
- border-radius: var(--border-radius-sm);
2119
- font-size: 12px;
2120
- white-space: nowrap;
2121
- box-shadow: var(--shadow-lg);
2122
- backdrop-filter: blur(10px);
2123
- position: relative;
2124
- font-family: "Vazirmatn";
2125
- }
2126
-
2127
- .mw-voice-call-tooltip-text::after {
2128
- content: "";
2129
- position: absolute;
2130
- top: -15%;
2131
- right: 75%;
2132
- transform: translateY(-50%);
2133
- border: 4px solid transparent;
2134
- border-bottom-color: var(--bg-overlay);
2135
- z-index: 100;
2136
- }
2137
-
2138
- .mw-voice-call-btn:active {
2139
- transform: scale(0.95);
2140
- }
2141
-
2142
- .mw-voice-agent-overlay {
2143
- position: absolute;
2144
- top: 0;
2145
- left: 0;
2146
- right: 0;
2147
- bottom: 0;
2148
- background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
2149
- z-index: var(--z-index-overlay);
2150
- display: flex;
2151
- align-items: center;
2152
- justify-content: center;
2153
- border-radius: var(--border-radius-lg);
2154
- opacity: 0;
2155
- visibility: hidden;
2156
- transition: var(--transition);
2157
- }
2158
-
2159
- .mw-voice-agent-overlay.mw-active {
2160
- opacity: 1;
2161
- visibility: visible;
2162
- }
2163
-
2164
- .mw-voice-agent-overlay.mw-hidden {
2165
- opacity: 0 !important;
2166
- visibility: hidden !important;
2167
- pointer-events: none;
2168
- }
2169
-
2170
- .mw-voice-agent-content {
2171
- position: relative;
2172
- width: 100%;
2173
- height: 100%;
2174
- display: flex;
2175
- flex-direction: column;
2176
- align-items: center;
2177
- justify-content: center;
2178
- padding: 20px;
2179
- }
2180
-
2181
- .mw-voice-close-btn {
2182
- position: absolute;
2183
- top: 20px;
2184
- right: 20px;
2185
- background: rgba(255, 255, 255, 0.1);
2186
- border: 1px solid rgba(255, 255, 255, 0.2);
2187
- color: var(--white);
2188
- width: 40px;
2189
- height: 40px;
2190
- border-radius: 50%;
2191
- display: flex;
2192
- align-items: center;
2193
- justify-content: center;
2194
- cursor: pointer;
2195
- transition: var(--transition);
2196
- z-index: 10;
2197
- }
2198
-
2199
- .mw-voice-close-btn:hover {
2200
- background: rgba(255, 255, 255, 0.2);
2201
- transform: scale(1.1);
2202
- }
2203
-
2204
- .mw-voice-agent-center {
2205
- display: flex;
2206
- flex-direction: column;
2207
- align-items: center;
2208
- gap: 24px;
2209
- flex: 1;
2210
- justify-content: center;
2211
- animation: mw-fadeInUp 0.6s ease-out;
2212
- }
2213
-
2214
- .mw-voice-agent-logo {
2215
- width: 120px;
2216
- height: 120px;
2217
- border-radius: 50%;
2218
- object-fit: cover;
2219
- box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
2220
- border: 3px solid rgba(255, 255, 255, 0.2);
2221
- animation: mw-voice-pulse 2s ease-in-out infinite;
2222
- }
2223
-
2224
- @keyframes mw-voice-pulse {
2225
- 0%,
2226
- 100% {
2227
- transform: scale(1);
2228
- box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
2229
- }
2230
- 50% {
2231
- transform: scale(1.05);
2232
- box-shadow: 0 0 50px rgba(102, 126, 234, 0.5);
2233
- }
2234
- }
2235
-
2236
- .mw-voice-agent-title {
2237
- font-size: 28px;
2238
- font-weight: 700;
2239
- color: var(--white);
2240
- margin: 0;
2241
- text-align: center;
2242
- }
2243
-
2244
- .mw-voice-agent-status {
2245
- font-size: 16px;
2246
- color: var(--text-secondary);
2247
- margin: 0;
2248
- text-align: center;
2249
- animation: mw-pulse 1.5s ease-in-out infinite;
2250
- }
2251
-
2252
- .mw-voice-agent-controls {
2253
- position: absolute;
2254
- bottom: 40px;
2255
- display: flex;
2256
- gap: 20px;
2257
- align-items: center;
2258
- justify-content: center;
2259
- }
2260
-
2261
- .mw-voice-disconnect-btn {
2262
- width: 60px;
2263
- height: 60px;
2264
- border-radius: 50%;
2265
- background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
2266
- border: none;
2267
- color: var(--white);
2268
- cursor: pointer;
2269
- display: flex;
2270
- align-items: center;
2271
- justify-content: center;
2272
- transition: var(--transition);
2273
- box-shadow: var(--shadow-lg);
2274
- }
2275
-
2276
- .mw-voice-disconnect-btn:hover {
2277
- transform: scale(1.1);
2278
- box-shadow: 0 0 20px rgba(252, 129, 129, 0.4);
2279
- }
2280
-
2281
- .mw-voice-disconnect-btn:active {
2282
- transform: scale(0.95);
2283
- }