turbo_chat 0.1.0

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.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +21 -0
  3. data/README.md +741 -0
  4. data/app/assets/config/chat_gem_manifest.js +6 -0
  5. data/app/assets/javascripts/chat_gem/application.js +4 -0
  6. data/app/assets/javascripts/chat_gem/lifecycle_events.js +93 -0
  7. data/app/assets/javascripts/chat_gem/messages.js +442 -0
  8. data/app/assets/javascripts/chat_gem/realtime.js +398 -0
  9. data/app/assets/javascripts/chat_gem/shared.js +488 -0
  10. data/app/assets/stylesheets/chat_gem/application.css +741 -0
  11. data/app/controllers/chat_gem/application_controller.rb +41 -0
  12. data/app/controllers/chat_gem/chat_memberships_controller.rb +81 -0
  13. data/app/controllers/chat_gem/chat_messages_controller.rb +144 -0
  14. data/app/controllers/chat_gem/chats_controller/event_payload_support.rb +58 -0
  15. data/app/controllers/chat_gem/chats_controller/invitation_support.rb +31 -0
  16. data/app/controllers/chat_gem/chats_controller.rb +125 -0
  17. data/app/helpers/chat_gem/application_helper/config_support.rb +41 -0
  18. data/app/helpers/chat_gem/application_helper/mention_support/entry_builder.rb +55 -0
  19. data/app/helpers/chat_gem/application_helper/mention_support/permission_support.rb +28 -0
  20. data/app/helpers/chat_gem/application_helper/mention_support/token_builder.rb +49 -0
  21. data/app/helpers/chat_gem/application_helper/mention_support.rb +80 -0
  22. data/app/helpers/chat_gem/application_helper/message_rendering.rb +165 -0
  23. data/app/helpers/chat_gem/application_helper/participant_support.rb +81 -0
  24. data/app/helpers/chat_gem/application_helper.rb +12 -0
  25. data/app/models/chat_gem/application_record.rb +5 -0
  26. data/app/models/chat_gem/chat.rb +127 -0
  27. data/app/models/chat_gem/chat_membership.rb +136 -0
  28. data/app/models/chat_gem/chat_message/blocked_words_moderation.rb +120 -0
  29. data/app/models/chat_gem/chat_message/body_length_validation.rb +20 -0
  30. data/app/models/chat_gem/chat_message/broadcasting.rb +61 -0
  31. data/app/models/chat_gem/chat_message/formatting.rb +81 -0
  32. data/app/models/chat_gem/chat_message/mention_validation.rb +85 -0
  33. data/app/models/chat_gem/chat_message/signals.rb +61 -0
  34. data/app/models/chat_gem/chat_message.rb +40 -0
  35. data/app/views/chat_gem/chat_messages/_chat_message.html.erb +1 -0
  36. data/app/views/chat_gem/chat_messages/_form.html.erb +22 -0
  37. data/app/views/chat_gem/chat_messages/_message.html.erb +83 -0
  38. data/app/views/chat_gem/chat_messages/_signal.html.erb +3 -0
  39. data/app/views/chat_gem/chat_messages/_signals.html.erb +24 -0
  40. data/app/views/chat_gem/chat_messages/index.html.erb +1 -0
  41. data/app/views/chat_gem/chats/index.html.erb +51 -0
  42. data/app/views/chat_gem/chats/new.html.erb +13 -0
  43. data/app/views/chat_gem/chats/show.html.erb +95 -0
  44. data/app/views/layouts/chat_gem/application.html.erb +20 -0
  45. data/config/routes.rb +16 -0
  46. data/db/migrate/20260215000000_create_chat_gem_chats.rb +8 -0
  47. data/db/migrate/20260215000001_create_chat_gem_chat_memberships.rb +19 -0
  48. data/db/migrate/20260215000002_create_chat_gem_chat_messages.rb +14 -0
  49. data/db/migrate/20260218000011_add_closed_at_to_chat_gem_chats.rb +6 -0
  50. data/db/migrate/20260218000012_add_custom_role_key_to_chat_memberships.rb +6 -0
  51. data/db/migrate/20260218000013_add_invitation_accepted_to_chat_gem_chat_memberships.rb +5 -0
  52. data/lib/chat_gem/configuration.rb +242 -0
  53. data/lib/chat_gem/engine.rb +29 -0
  54. data/lib/chat_gem/model_extensions/chat_participant.rb +45 -0
  55. data/lib/chat_gem/moderation.rb +194 -0
  56. data/lib/chat_gem/permission.rb +193 -0
  57. data/lib/chat_gem/signals.rb +26 -0
  58. data/lib/chat_gem/version.rb +3 -0
  59. data/lib/chat_gem.rb +24 -0
  60. data/lib/generators/chat_gem/install/install_generator.rb +18 -0
  61. data/lib/generators/chat_gem/install/templates/chat_gem.rb +36 -0
  62. data/lib/generators/turbo_chat/install/install_generator.rb +18 -0
  63. data/lib/generators/turbo_chat/install/templates/turbo_chat.rb +36 -0
  64. data/lib/tasks/chat_gem_tasks.rake +1 -0
  65. data/lib/tasks/turbo_chat_tasks.rake +10 -0
  66. data/lib/turbo_chat/version.rb +5 -0
  67. data/lib/turbo_chat.rb +24 -0
  68. data/turbo_chat.gemspec +31 -0
  69. metadata +155 -0
@@ -0,0 +1,741 @@
1
+ :root {
2
+ --chat-text: #12263f;
3
+ --chat-muted: #5f738a;
4
+ --chat-border: #c9d5e3;
5
+ --chat-border-strong: #b9c8d9;
6
+ --chat-surface: #ffffff;
7
+ --chat-surface-soft: #f6f9fd;
8
+ --chat-primary: #1f6edc;
9
+ --chat-primary-dark: #1452ac;
10
+ --chat-primary-soft: #e7f1ff;
11
+ --chat-mention-highlight-color: #b42318;
12
+ --chat-mention-mark-background: #b4231838;
13
+ --chat-danger: #b42318;
14
+ --chat-danger-soft: #fff1f3;
15
+ --chat-success: #1f7a40;
16
+ --chat-success-soft: #ecfdf3;
17
+ --chat-shadow: 0 20px 48px rgba(16, 36, 58, 0.12);
18
+ }
19
+
20
+ body {
21
+ margin: 0;
22
+ min-height: 100vh;
23
+ color: var(--chat-text);
24
+ background:
25
+ radial-gradient(960px circle at 0% 0%, #e6f1ff 0%, rgba(230, 241, 255, 0) 52%),
26
+ radial-gradient(920px circle at 100% 0%, #fff3e8 0%, rgba(255, 243, 232, 0) 48%),
27
+ linear-gradient(180deg, #f9fbff 0%, #f2f5fa 100%);
28
+ font-family: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
29
+ }
30
+
31
+ .chat-shell {
32
+ width: min(1080px, calc(100% - 28px));
33
+ margin: 24px auto 36px;
34
+ padding: clamp(16px, 2.5vw, 28px);
35
+ border: 1px solid rgba(201, 213, 227, 0.85);
36
+ border-radius: 24px;
37
+ background: rgba(255, 255, 255, 0.82);
38
+ box-shadow: var(--chat-shadow);
39
+ backdrop-filter: blur(4px);
40
+ }
41
+
42
+ .chat-shell--closed {
43
+ border-color: rgba(191, 203, 217, 0.9);
44
+ }
45
+
46
+ .chat-header {
47
+ display: flex;
48
+ justify-content: space-between;
49
+ align-items: flex-start;
50
+ gap: 18px;
51
+ margin-bottom: 16px;
52
+ }
53
+
54
+ .chat-header-copy {
55
+ display: flex;
56
+ flex-direction: column;
57
+ gap: 8px;
58
+ }
59
+
60
+ .chat-header-kicker {
61
+ margin: 0;
62
+ font-size: 11px;
63
+ letter-spacing: 0.08em;
64
+ text-transform: uppercase;
65
+ font-weight: 700;
66
+ color: var(--chat-muted);
67
+ }
68
+
69
+ .chat-header-title-row {
70
+ display: inline-flex;
71
+ align-items: center;
72
+ gap: 12px;
73
+ flex-wrap: wrap;
74
+ }
75
+
76
+ .chat-header h1 {
77
+ margin: 0;
78
+ font-size: clamp(30px, 3vw, 44px);
79
+ line-height: 1.04;
80
+ letter-spacing: -0.02em;
81
+ }
82
+
83
+ .chat-status {
84
+ display: inline-flex;
85
+ align-items: center;
86
+ border-radius: 999px;
87
+ font-size: 12px;
88
+ font-weight: 700;
89
+ letter-spacing: 0.04em;
90
+ text-transform: uppercase;
91
+ padding: 5px 11px;
92
+ }
93
+
94
+ .chat-status--open {
95
+ color: #0f6632;
96
+ background: #e8f7ef;
97
+ border: 1px solid #a6dfbb;
98
+ }
99
+
100
+ .chat-status--closed {
101
+ color: #995f00;
102
+ background: #fff4dd;
103
+ border: 1px solid #f0cf90;
104
+ }
105
+
106
+ .chat-header-actions {
107
+ display: inline-flex;
108
+ align-items: center;
109
+ justify-content: flex-end;
110
+ gap: 8px;
111
+ flex-wrap: wrap;
112
+ }
113
+
114
+ .chat-inline-form {
115
+ margin: 0;
116
+ }
117
+
118
+ .chat-invite {
119
+ margin: 0 0 14px;
120
+ padding: 10px 12px;
121
+ border-radius: 14px;
122
+ border: 1px dashed var(--chat-border-strong);
123
+ background: rgba(247, 251, 255, 0.72);
124
+ }
125
+
126
+ .chat-hint {
127
+ margin: 0;
128
+ color: var(--chat-muted);
129
+ font-size: 14px;
130
+ }
131
+
132
+ .chat-window {
133
+ --chat-window-padding: 14px;
134
+ --chat-signal-offset: 0px;
135
+ position: relative;
136
+ overflow: hidden;
137
+ border: 1px solid var(--chat-border);
138
+ border-radius: 18px;
139
+ padding: var(--chat-window-padding);
140
+ background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
141
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 24px rgba(23, 46, 77, 0.08);
142
+ }
143
+
144
+ .chat-window::before {
145
+ content: "";
146
+ position: absolute;
147
+ top: 0;
148
+ left: 0;
149
+ right: 0;
150
+ height: 58px;
151
+ pointer-events: none;
152
+ background: linear-gradient(180deg, rgba(251, 253, 255, 0.96) 0%, rgba(251, 253, 255, 0) 100%);
153
+ z-index: 1;
154
+ }
155
+
156
+ .chat-messages {
157
+ position: relative;
158
+ z-index: 2;
159
+ }
160
+
161
+ .chat-messages {
162
+ display: flex;
163
+ flex-direction: column;
164
+ gap: 12px;
165
+ min-height: 220px;
166
+ max-height: min(58vh, 540px);
167
+ overflow-y: auto;
168
+ padding: 6px 2px calc(4px + var(--chat-signal-offset));
169
+ box-sizing: border-box;
170
+ transition: padding-bottom 180ms ease;
171
+ }
172
+
173
+ .chat-bubble {
174
+ max-width: min(78%, 680px);
175
+ background: var(--chat-bubble-bg, #ffffff);
176
+ border-radius: 16px 16px 16px 8px;
177
+ padding: 12px 14px 10px;
178
+ border: 1px solid var(--chat-bubble-border, #d4deea);
179
+ box-shadow: 0 8px 18px rgba(18, 38, 63, 0.08);
180
+ }
181
+
182
+ .chat-bubble--own {
183
+ margin-left: auto;
184
+ background: var(--chat-bubble-bg, #e4f1ff);
185
+ border-color: var(--chat-bubble-border, #9bc9ff);
186
+ border-radius: 16px 16px 8px 16px;
187
+ }
188
+
189
+ .chat-meta {
190
+ display: flex;
191
+ align-items: center;
192
+ gap: 8px;
193
+ flex-wrap: wrap;
194
+ font-size: 12px;
195
+ color: var(--chat-muted);
196
+ margin-bottom: 6px;
197
+ }
198
+
199
+ .chat-meta__author {
200
+ color: #1b324f;
201
+ font-weight: 700;
202
+ letter-spacing: 0.01em;
203
+ }
204
+
205
+ .chat-meta__role {
206
+ display: inline-flex;
207
+ align-items: center;
208
+ border: 1px solid #a8bad0;
209
+ border-radius: 999px;
210
+ padding: 1px 7px;
211
+ font-size: 10px;
212
+ letter-spacing: 0.05em;
213
+ text-transform: uppercase;
214
+ background: #f4f8fd;
215
+ }
216
+
217
+ .chat-meta__timestamp {
218
+ margin-left: auto;
219
+ font-variant-numeric: tabular-nums;
220
+ white-space: nowrap;
221
+ }
222
+
223
+ .chat-meta__edited {
224
+ display: inline-flex;
225
+ align-items: center;
226
+ padding: 1px 6px;
227
+ border-radius: 999px;
228
+ border: 1px solid #d6e0ec;
229
+ background: #f4f8fd;
230
+ color: #60758d;
231
+ font-size: 11px;
232
+ text-transform: lowercase;
233
+ }
234
+
235
+ .chat-body {
236
+ margin: 0;
237
+ font-size: 16px;
238
+ line-height: 1.45;
239
+ color: #12263f;
240
+ word-break: break-word;
241
+ }
242
+
243
+ .chat-body p {
244
+ margin: 0 0 8px;
245
+ }
246
+
247
+ .chat-body p:last-child {
248
+ margin-bottom: 0;
249
+ }
250
+
251
+ .chat-mention {
252
+ color: var(--chat-primary);
253
+ font-weight: 700;
254
+ }
255
+
256
+ .chat-mention--targeted {
257
+ background: var(--chat-mention-mark-background);
258
+ border-radius: 4px;
259
+ padding: 0 3px;
260
+ box-decoration-break: clone;
261
+ -webkit-box-decoration-break: clone;
262
+ }
263
+
264
+ .chat-message-actions {
265
+ margin-top: 8px;
266
+ display: flex;
267
+ justify-content: flex-end;
268
+ opacity: 0;
269
+ transform: translateY(2px);
270
+ transition: opacity 150ms ease, transform 150ms ease;
271
+ pointer-events: none;
272
+ }
273
+
274
+ .chat-bubble:hover .chat-message-actions,
275
+ .chat-bubble:focus-within .chat-message-actions,
276
+ .chat-bubble--editing .chat-message-actions {
277
+ opacity: 1;
278
+ transform: translateY(0);
279
+ pointer-events: auto;
280
+ }
281
+
282
+ .chat-message-action {
283
+ font-size: 11px;
284
+ line-height: 1.2;
285
+ border: 1px solid #c9d6e6;
286
+ background: #f5f9ff;
287
+ border-radius: 999px;
288
+ padding: 3px 9px;
289
+ margin: 0;
290
+ color: var(--chat-primary-dark);
291
+ text-decoration: none;
292
+ cursor: pointer;
293
+ }
294
+
295
+ .chat-message-action:hover {
296
+ background: #e6f0ff;
297
+ }
298
+
299
+ .chat-message-edit {
300
+ margin-top: 10px;
301
+ padding-top: 10px;
302
+ border-top: 1px dashed #c5d3e3;
303
+ }
304
+
305
+ .chat-inline-edit-form {
306
+ display: flex;
307
+ flex-direction: column;
308
+ gap: 8px;
309
+ }
310
+
311
+ .chat-inline-edit-field {
312
+ position: relative;
313
+ }
314
+
315
+ .chat-inline-edit-form textarea {
316
+ width: 100%;
317
+ min-height: 96px;
318
+ resize: vertical;
319
+ }
320
+
321
+ .chat-inline-edit-actions {
322
+ display: flex;
323
+ justify-content: flex-end;
324
+ gap: 8px;
325
+ }
326
+
327
+ .chat-inline-edit-error {
328
+ margin: 0 0 8px;
329
+ color: var(--chat-danger);
330
+ font-size: 12px;
331
+ }
332
+
333
+ .chat-signal-entry {
334
+ font-size: 12px;
335
+ color: var(--chat-muted);
336
+ }
337
+
338
+ .chat-signals {
339
+ position: absolute;
340
+ left: var(--chat-window-padding);
341
+ right: var(--chat-window-padding);
342
+ bottom: var(--chat-window-padding);
343
+ z-index: 3;
344
+ max-height: 0;
345
+ opacity: 0;
346
+ overflow: hidden;
347
+ pointer-events: none;
348
+ transform: translateY(6px);
349
+ transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
350
+ }
351
+
352
+ .chat-signals--active {
353
+ max-height: 120px;
354
+ opacity: 1;
355
+ transform: translateY(0);
356
+ }
357
+
358
+ .chat-typing-indicator {
359
+ display: inline-flex;
360
+ align-items: center;
361
+ gap: 9px;
362
+ font-size: 12px;
363
+ color: var(--chat-muted);
364
+ background: #edf3fb;
365
+ border: 1px solid #d2deed;
366
+ border-radius: 999px;
367
+ padding: 6px 12px;
368
+ overflow: hidden;
369
+ max-height: 34px;
370
+ opacity: 1;
371
+ transform: translateY(0);
372
+ transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease, padding 180ms ease;
373
+ }
374
+
375
+ .chat-typing-indicator--leaving {
376
+ max-height: 0;
377
+ opacity: 0;
378
+ padding: 0;
379
+ transform: translateY(-4px);
380
+ }
381
+
382
+ .chat-dots {
383
+ display: inline-flex;
384
+ gap: 3px;
385
+ }
386
+
387
+ .chat-dots i {
388
+ width: 6px;
389
+ height: 6px;
390
+ border-radius: 999px;
391
+ background: var(--chat-muted);
392
+ animation: chat-bounce 1.1s infinite ease-in-out;
393
+ }
394
+
395
+ .chat-dots i:nth-child(2) {
396
+ animation-delay: 0.15s;
397
+ }
398
+
399
+ .chat-dots i:nth-child(3) {
400
+ animation-delay: 0.3s;
401
+ }
402
+
403
+ @keyframes chat-bounce {
404
+ 0%,
405
+ 80%,
406
+ 100% {
407
+ transform: translateY(0);
408
+ opacity: 0.45;
409
+ }
410
+ 40% {
411
+ transform: translateY(-4px);
412
+ opacity: 1;
413
+ }
414
+ }
415
+
416
+ .chat-composer {
417
+ margin-top: 14px;
418
+ position: relative;
419
+ }
420
+
421
+ .chat-form {
422
+ display: flex;
423
+ gap: 9px;
424
+ }
425
+
426
+ .chat-form textarea,
427
+ .chat-form select,
428
+ .chat-field input,
429
+ .chat-inline-edit-form textarea {
430
+ width: 100%;
431
+ border: 1px solid var(--chat-border);
432
+ border-radius: 12px;
433
+ padding: 10px 12px;
434
+ font: inherit;
435
+ color: var(--chat-text);
436
+ background: #ffffff;
437
+ box-sizing: border-box;
438
+ }
439
+
440
+ .chat-form textarea:focus,
441
+ .chat-form select:focus,
442
+ .chat-field input:focus,
443
+ .chat-inline-edit-form textarea:focus {
444
+ border-color: #87b6f7;
445
+ outline: none;
446
+ box-shadow: 0 0 0 3px rgba(31, 110, 220, 0.16);
447
+ }
448
+
449
+ .chat-composer .chat-form {
450
+ align-items: flex-end;
451
+ }
452
+
453
+ .chat-composer .chat-form textarea {
454
+ min-height: 68px;
455
+ max-height: 180px;
456
+ resize: vertical;
457
+ }
458
+
459
+ .chat-form--invite {
460
+ align-items: center;
461
+ }
462
+
463
+ .chat-form--hidden {
464
+ display: none;
465
+ }
466
+
467
+ .chat-mentions-menu {
468
+ position: absolute;
469
+ left: 0;
470
+ right: 0;
471
+ bottom: calc(100% + 8px);
472
+ z-index: 6;
473
+ border: 1px solid var(--chat-border);
474
+ border-radius: 12px;
475
+ background: #ffffff;
476
+ box-shadow: 0 12px 26px rgba(31, 35, 40, 0.15);
477
+ overflow: hidden;
478
+ }
479
+
480
+ .chat-mentions-menu--inline-edit {
481
+ z-index: 5;
482
+ }
483
+
484
+ .chat-mentions-item {
485
+ width: 100%;
486
+ text-align: left;
487
+ border: none;
488
+ background: #ffffff;
489
+ color: #233a55;
490
+ cursor: pointer;
491
+ display: flex;
492
+ align-items: center;
493
+ gap: 10px;
494
+ padding: 9px 11px;
495
+ }
496
+
497
+ .chat-mentions-item:hover,
498
+ .chat-mentions-item--active {
499
+ background: #edf4ff;
500
+ }
501
+
502
+ .chat-mentions-item__token {
503
+ font-family: "IBM Plex Mono", "Fira Mono", "Menlo", monospace;
504
+ font-weight: 700;
505
+ color: var(--chat-primary-dark);
506
+ }
507
+
508
+ .chat-mentions-item__label {
509
+ color: var(--chat-muted);
510
+ font-size: 12px;
511
+ }
512
+
513
+ .chat-btn {
514
+ appearance: none;
515
+ border: 1px solid transparent;
516
+ border-radius: 12px;
517
+ padding: 9px 16px;
518
+ background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-primary-dark) 100%);
519
+ color: #ffffff;
520
+ font: inherit;
521
+ font-weight: 700;
522
+ line-height: 1.2;
523
+ text-decoration: none;
524
+ cursor: pointer;
525
+ display: inline-flex;
526
+ align-items: center;
527
+ justify-content: center;
528
+ transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
529
+ box-shadow: 0 8px 16px rgba(20, 82, 172, 0.3);
530
+ }
531
+
532
+ .chat-btn:hover {
533
+ transform: translateY(-1px);
534
+ box-shadow: 0 10px 18px rgba(20, 82, 172, 0.34);
535
+ }
536
+
537
+ .chat-btn:active {
538
+ transform: translateY(0);
539
+ }
540
+
541
+ .chat-btn:focus-visible {
542
+ outline: none;
543
+ box-shadow: 0 0 0 3px rgba(31, 110, 220, 0.23), 0 8px 16px rgba(20, 82, 172, 0.3);
544
+ }
545
+
546
+ .chat-btn:disabled {
547
+ opacity: 0.56;
548
+ cursor: not-allowed;
549
+ transform: none;
550
+ }
551
+
552
+ .chat-btn--small {
553
+ border-radius: 10px;
554
+ padding: 7px 11px;
555
+ font-size: 13px;
556
+ }
557
+
558
+ .chat-btn--ghost {
559
+ background: #ffffff;
560
+ border-color: var(--chat-border);
561
+ color: var(--chat-text);
562
+ box-shadow: none;
563
+ }
564
+
565
+ .chat-btn--ghost:hover {
566
+ background: #f5f8fc;
567
+ border-color: #b7c8dd;
568
+ box-shadow: none;
569
+ }
570
+
571
+ .chat-btn--danger {
572
+ background: var(--chat-danger-soft);
573
+ border-color: #f0bcc3;
574
+ color: var(--chat-danger);
575
+ box-shadow: none;
576
+ }
577
+
578
+ .chat-btn--danger:hover {
579
+ background: #ffe6ea;
580
+ border-color: #e7a4ad;
581
+ color: #9f1d12;
582
+ box-shadow: none;
583
+ }
584
+
585
+ .chat-btn--success {
586
+ background: var(--chat-success-soft);
587
+ border-color: #a8dfbc;
588
+ color: var(--chat-success);
589
+ box-shadow: none;
590
+ }
591
+
592
+ .chat-btn--success:hover {
593
+ background: #ddf9e7;
594
+ border-color: #8fd2a8;
595
+ color: #1a6535;
596
+ box-shadow: none;
597
+ }
598
+
599
+ .chat-btn--send {
600
+ min-width: 92px;
601
+ }
602
+
603
+ .chat-banner {
604
+ margin: 14px 0 0;
605
+ padding: 11px 12px;
606
+ border-radius: 12px;
607
+ font-size: 14px;
608
+ }
609
+
610
+ .chat-banner--muted {
611
+ color: #7b5a00;
612
+ border: 1px solid #efd08f;
613
+ background: #fff8e6;
614
+ }
615
+
616
+ .chat-list {
617
+ list-style: none;
618
+ margin: 0;
619
+ padding: 0;
620
+ }
621
+
622
+ .chat-invitations {
623
+ margin: 0 0 16px;
624
+ }
625
+
626
+ .chat-invitations h2,
627
+ .chat-joined h2 {
628
+ margin: 0 0 9px;
629
+ font-size: 16px;
630
+ }
631
+
632
+ .chat-list-item--invitation {
633
+ display: flex;
634
+ align-items: center;
635
+ justify-content: space-between;
636
+ gap: 10px;
637
+ padding: 11px 13px;
638
+ border: 1px solid var(--chat-border);
639
+ border-radius: 12px;
640
+ margin-bottom: 8px;
641
+ background: #ffffff;
642
+ }
643
+
644
+ .chat-list-title {
645
+ font-weight: 700;
646
+ }
647
+
648
+ .chat-list-actions {
649
+ display: inline-flex;
650
+ align-items: center;
651
+ gap: 8px;
652
+ flex-wrap: wrap;
653
+ }
654
+
655
+ .chat-list-link {
656
+ display: block;
657
+ padding: 11px 13px;
658
+ border: 1px solid var(--chat-border);
659
+ border-radius: 12px;
660
+ margin-bottom: 8px;
661
+ text-decoration: none;
662
+ color: var(--chat-text);
663
+ background: #ffffff;
664
+ transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
665
+ }
666
+
667
+ .chat-list-link:hover {
668
+ border-color: #a8bfdc;
669
+ box-shadow: 0 8px 18px rgba(22, 55, 95, 0.08);
670
+ transform: translateY(-1px);
671
+ }
672
+
673
+ @media (max-width: 900px) {
674
+ .chat-shell {
675
+ width: min(1080px, calc(100% - 16px));
676
+ margin: 12px auto 22px;
677
+ border-radius: 18px;
678
+ }
679
+
680
+ .chat-header {
681
+ flex-direction: column;
682
+ }
683
+
684
+ .chat-header-actions {
685
+ width: 100%;
686
+ justify-content: flex-start;
687
+ }
688
+
689
+ .chat-messages {
690
+ min-height: 190px;
691
+ }
692
+
693
+ .chat-bubble {
694
+ max-width: 90%;
695
+ }
696
+ }
697
+
698
+ @media (max-width: 640px) {
699
+ .chat-shell {
700
+ padding: 14px;
701
+ }
702
+
703
+ .chat-window {
704
+ --chat-window-padding: 11px;
705
+ padding: var(--chat-window-padding);
706
+ }
707
+
708
+ .chat-bubble {
709
+ max-width: 100%;
710
+ }
711
+
712
+ .chat-meta__timestamp {
713
+ margin-left: 0;
714
+ width: 100%;
715
+ }
716
+
717
+ .chat-composer .chat-form {
718
+ flex-direction: column;
719
+ align-items: stretch;
720
+ }
721
+
722
+ .chat-btn--send {
723
+ width: 100%;
724
+ }
725
+
726
+ .chat-form--invite {
727
+ flex-wrap: wrap;
728
+ }
729
+
730
+ .chat-list-item--invitation {
731
+ flex-wrap: wrap;
732
+ }
733
+
734
+ .chat-inline-edit-actions {
735
+ justify-content: stretch;
736
+ }
737
+
738
+ .chat-inline-edit-actions .chat-btn {
739
+ flex: 1 1 0;
740
+ }
741
+ }