makethisbetter 1.0.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 (168) hide show
  1. package/LICENSE +62 -0
  2. package/README.md +113 -0
  3. package/dist/annotate/draw.d.ts +21 -0
  4. package/dist/annotate/draw.d.ts.map +1 -0
  5. package/dist/annotate/draw.test.d.ts +2 -0
  6. package/dist/annotate/draw.test.d.ts.map +1 -0
  7. package/dist/annotate/highlighter.d.ts +11 -0
  8. package/dist/annotate/highlighter.d.ts.map +1 -0
  9. package/dist/annotate/highlighter.test.d.ts +2 -0
  10. package/dist/annotate/highlighter.test.d.ts.map +1 -0
  11. package/dist/annotate/overlay.d.ts +17 -0
  12. package/dist/annotate/overlay.d.ts.map +1 -0
  13. package/dist/annotate/overlay.test.d.ts +2 -0
  14. package/dist/annotate/overlay.test.d.ts.map +1 -0
  15. package/dist/annotate/pin.d.ts +10 -0
  16. package/dist/annotate/pin.d.ts.map +1 -0
  17. package/dist/annotate/pin.test.d.ts +2 -0
  18. package/dist/annotate/pin.test.d.ts.map +1 -0
  19. package/dist/annotate/session.d.ts +20 -0
  20. package/dist/annotate/session.d.ts.map +1 -0
  21. package/dist/annotate/session.test.d.ts +2 -0
  22. package/dist/annotate/session.test.d.ts.map +1 -0
  23. package/dist/annotate/toolbar.d.ts +17 -0
  24. package/dist/annotate/toolbar.d.ts.map +1 -0
  25. package/dist/annotate/toolbar.test.d.ts +2 -0
  26. package/dist/annotate/toolbar.test.d.ts.map +1 -0
  27. package/dist/api/client.d.ts +10 -0
  28. package/dist/api/client.d.ts.map +1 -0
  29. package/dist/api/client.test.d.ts +2 -0
  30. package/dist/api/client.test.d.ts.map +1 -0
  31. package/dist/context/collector.d.ts +10 -0
  32. package/dist/context/collector.d.ts.map +1 -0
  33. package/dist/context/collector.test.d.ts +2 -0
  34. package/dist/context/collector.test.d.ts.map +1 -0
  35. package/dist/context/console.d.ts +10 -0
  36. package/dist/context/console.d.ts.map +1 -0
  37. package/dist/context/console.test.d.ts +2 -0
  38. package/dist/context/console.test.d.ts.map +1 -0
  39. package/dist/context/error-source.d.ts +21 -0
  40. package/dist/context/error-source.d.ts.map +1 -0
  41. package/dist/context/error-source.test.d.ts +2 -0
  42. package/dist/context/error-source.test.d.ts.map +1 -0
  43. package/dist/context/frustration.d.ts +27 -0
  44. package/dist/context/frustration.d.ts.map +1 -0
  45. package/dist/context/frustration.test.d.ts +2 -0
  46. package/dist/context/frustration.test.d.ts.map +1 -0
  47. package/dist/global.d.ts +3 -0
  48. package/dist/global.d.ts.map +1 -0
  49. package/dist/i18n/en.d.ts +47 -0
  50. package/dist/i18n/en.d.ts.map +1 -0
  51. package/dist/i18n/index.d.ts +4 -0
  52. package/dist/i18n/index.d.ts.map +1 -0
  53. package/dist/i18n/index.test.d.ts +2 -0
  54. package/dist/i18n/index.test.d.ts.map +1 -0
  55. package/dist/i18n/zh-CN.d.ts +47 -0
  56. package/dist/i18n/zh-CN.d.ts.map +1 -0
  57. package/dist/index.d.mts +8 -0
  58. package/dist/index.d.ts +8 -0
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/makethisbetter.cjs.js +84 -0
  61. package/dist/makethisbetter.cjs.js.map +1 -0
  62. package/dist/makethisbetter.esm.js +1433 -0
  63. package/dist/makethisbetter.esm.js.map +1 -0
  64. package/dist/makethisbetter.js +84 -0
  65. package/dist/makethisbetter.js.map +1 -0
  66. package/dist/popup/comment.d.ts +31 -0
  67. package/dist/popup/comment.d.ts.map +1 -0
  68. package/dist/popup/comment.test.d.ts +2 -0
  69. package/dist/popup/comment.test.d.ts.map +1 -0
  70. package/dist/popup/success.d.ts +8 -0
  71. package/dist/popup/success.d.ts.map +1 -0
  72. package/dist/popup/success.test.d.ts +2 -0
  73. package/dist/popup/success.test.d.ts.map +1 -0
  74. package/dist/record/control-bar.d.ts +12 -0
  75. package/dist/record/control-bar.d.ts.map +1 -0
  76. package/dist/record/control-bar.test.d.ts +2 -0
  77. package/dist/record/control-bar.test.d.ts.map +1 -0
  78. package/dist/record/session.d.ts +26 -0
  79. package/dist/record/session.d.ts.map +1 -0
  80. package/dist/record/session.test.d.ts +2 -0
  81. package/dist/record/session.test.d.ts.map +1 -0
  82. package/dist/screenshot/capture.d.ts +3 -0
  83. package/dist/screenshot/capture.d.ts.map +1 -0
  84. package/dist/screenshot/capture.test.d.ts +2 -0
  85. package/dist/screenshot/capture.test.d.ts.map +1 -0
  86. package/dist/styles.d.ts +9 -0
  87. package/dist/styles.d.ts.map +1 -0
  88. package/dist/types.d.ts +45 -0
  89. package/dist/types.d.ts.map +1 -0
  90. package/dist/widget/controller.d.ts +37 -0
  91. package/dist/widget/controller.d.ts.map +1 -0
  92. package/dist/widget/controller.test.d.ts +2 -0
  93. package/dist/widget/controller.test.d.ts.map +1 -0
  94. package/dist/widget/frustration-prompt.d.ts +11 -0
  95. package/dist/widget/frustration-prompt.d.ts.map +1 -0
  96. package/dist/widget/frustration-prompt.test.d.ts +2 -0
  97. package/dist/widget/frustration-prompt.test.d.ts.map +1 -0
  98. package/dist/widget/payload.d.ts +5 -0
  99. package/dist/widget/payload.d.ts.map +1 -0
  100. package/dist/widget/payload.test.d.ts +2 -0
  101. package/dist/widget/payload.test.d.ts.map +1 -0
  102. package/dist/widget/pet.d.ts +12 -0
  103. package/dist/widget/pet.d.ts.map +1 -0
  104. package/dist/widget/pet.test.d.ts +2 -0
  105. package/dist/widget/pet.test.d.ts.map +1 -0
  106. package/dist/widget/shadow.d.ts +11 -0
  107. package/dist/widget/shadow.d.ts.map +1 -0
  108. package/dist/widget/shadow.test.d.ts +2 -0
  109. package/dist/widget/shadow.test.d.ts.map +1 -0
  110. package/dist/widget/tab.d.ts +10 -0
  111. package/dist/widget/tab.d.ts.map +1 -0
  112. package/dist/widget/tab.test.d.ts +2 -0
  113. package/dist/widget/tab.test.d.ts.map +1 -0
  114. package/package.json +64 -0
  115. package/src/annotate/draw.test.ts +168 -0
  116. package/src/annotate/draw.ts +108 -0
  117. package/src/annotate/highlighter.test.ts +47 -0
  118. package/src/annotate/highlighter.ts +84 -0
  119. package/src/annotate/overlay.test.ts +91 -0
  120. package/src/annotate/overlay.ts +44 -0
  121. package/src/annotate/pin.test.ts +87 -0
  122. package/src/annotate/pin.ts +28 -0
  123. package/src/annotate/session.test.ts +219 -0
  124. package/src/annotate/session.ts +104 -0
  125. package/src/annotate/toolbar.test.ts +132 -0
  126. package/src/annotate/toolbar.ts +81 -0
  127. package/src/api/client.test.ts +75 -0
  128. package/src/api/client.ts +77 -0
  129. package/src/context/collector.test.ts +14 -0
  130. package/src/context/collector.ts +41 -0
  131. package/src/context/console.test.ts +44 -0
  132. package/src/context/console.ts +34 -0
  133. package/src/context/error-source.test.ts +115 -0
  134. package/src/context/error-source.ts +62 -0
  135. package/src/context/frustration.test.ts +134 -0
  136. package/src/context/frustration.ts +145 -0
  137. package/src/global.ts +3 -0
  138. package/src/i18n/en.ts +47 -0
  139. package/src/i18n/index.test.ts +24 -0
  140. package/src/i18n/index.ts +16 -0
  141. package/src/i18n/zh-CN.ts +47 -0
  142. package/src/index.ts +32 -0
  143. package/src/popup/comment.test.ts +73 -0
  144. package/src/popup/comment.ts +177 -0
  145. package/src/popup/success.test.ts +75 -0
  146. package/src/popup/success.ts +33 -0
  147. package/src/record/control-bar.test.ts +110 -0
  148. package/src/record/control-bar.ts +46 -0
  149. package/src/record/session.test.ts +153 -0
  150. package/src/record/session.ts +139 -0
  151. package/src/screenshot/capture.test.ts +68 -0
  152. package/src/screenshot/capture.ts +96 -0
  153. package/src/styles/widget.css +847 -0
  154. package/src/styles.ts +9 -0
  155. package/src/types.ts +46 -0
  156. package/src/vite-env.d.ts +6 -0
  157. package/src/widget/controller.test.ts +62 -0
  158. package/src/widget/controller.ts +249 -0
  159. package/src/widget/frustration-prompt.test.ts +86 -0
  160. package/src/widget/frustration-prompt.ts +34 -0
  161. package/src/widget/payload.test.ts +167 -0
  162. package/src/widget/payload.ts +31 -0
  163. package/src/widget/pet.test.ts +63 -0
  164. package/src/widget/pet.ts +67 -0
  165. package/src/widget/shadow.test.ts +25 -0
  166. package/src/widget/shadow.ts +41 -0
  167. package/src/widget/tab.test.ts +92 -0
  168. package/src/widget/tab.ts +31 -0
@@ -0,0 +1,847 @@
1
+ *, *::before, *::after {
2
+ box-sizing: border-box;
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+
7
+ :host {
8
+ all: initial;
9
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
10
+ font-size: 14px;
11
+ line-height: 1.5;
12
+ color: #191a1c;
13
+ -webkit-font-smoothing: antialiased;
14
+ }
15
+
16
+ :host([data-mtb-theme="dark"]) .mtb-popup,
17
+ :host([data-mtb-theme="dark"]) .mtb-success {
18
+ background: #151719;
19
+ border-color: rgba(255, 255, 255, 0.12);
20
+ color: #f9fafb;
21
+ }
22
+
23
+ :host([data-mtb-theme="dark"]) .mtb-popup-header {
24
+ border-bottom-color: rgba(255, 255, 255, 0.1);
25
+ }
26
+
27
+ :host([data-mtb-theme="dark"]) .mtb-popup-title,
28
+ :host([data-mtb-theme="dark"]) .mtb-success-title {
29
+ color: #f9fafb;
30
+ }
31
+
32
+ :host([data-mtb-theme="dark"]) .mtb-quick-option,
33
+ :host([data-mtb-theme="dark"]) .mtb-textarea {
34
+ background: #1f2327;
35
+ border-color: rgba(255, 255, 255, 0.12);
36
+ color: #f9fafb;
37
+ }
38
+
39
+ :host([data-mtb-theme="dark"]) .mtb-popup-close,
40
+ :host([data-mtb-theme="dark"]) .mtb-success-msg,
41
+ :host([data-mtb-theme="dark"]) .mtb-close-link {
42
+ color: rgba(255, 255, 255, 0.68);
43
+ }
44
+
45
+ @media (prefers-color-scheme: dark) {
46
+ :host([data-mtb-theme="auto"]) .mtb-popup,
47
+ :host([data-mtb-theme="auto"]) .mtb-success {
48
+ background: #151719;
49
+ border-color: rgba(255, 255, 255, 0.12);
50
+ color: #f9fafb;
51
+ }
52
+
53
+ :host([data-mtb-theme="auto"]) .mtb-popup-header {
54
+ border-bottom-color: rgba(255, 255, 255, 0.1);
55
+ }
56
+
57
+ :host([data-mtb-theme="auto"]) .mtb-popup-title,
58
+ :host([data-mtb-theme="auto"]) .mtb-success-title {
59
+ color: #f9fafb;
60
+ }
61
+
62
+ :host([data-mtb-theme="auto"]) .mtb-quick-option,
63
+ :host([data-mtb-theme="auto"]) .mtb-textarea {
64
+ background: #1f2327;
65
+ border-color: rgba(255, 255, 255, 0.12);
66
+ color: #f9fafb;
67
+ }
68
+
69
+ :host([data-mtb-theme="auto"]) .mtb-popup-close,
70
+ :host([data-mtb-theme="auto"]) .mtb-success-msg,
71
+ :host([data-mtb-theme="auto"]) .mtb-close-link {
72
+ color: rgba(255, 255, 255, 0.68);
73
+ }
74
+ }
75
+
76
+ /* ===== Side Tab ===== */
77
+ .mtb-tab {
78
+ position: fixed;
79
+ top: 50%;
80
+ right: 0;
81
+ transform: translateY(-50%);
82
+ z-index: 2147483646;
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ width: 32px;
87
+ padding: 14px 0;
88
+ background: #059669;
89
+ color: #fff;
90
+ border-radius: 8px 0 0 8px;
91
+ cursor: pointer;
92
+ box-shadow: -2px 0 14px rgba(5, 150, 105, 0.35);
93
+ transition: background 0.15s, box-shadow 0.15s, width 0.15s;
94
+ writing-mode: vertical-lr;
95
+ text-orientation: mixed;
96
+ font-size: 12px;
97
+ font-weight: 600;
98
+ letter-spacing: 0.04em;
99
+ user-select: none;
100
+ border: none;
101
+ outline: none;
102
+ }
103
+
104
+ .mtb-tab.left {
105
+ right: auto;
106
+ left: 0;
107
+ border-radius: 0 8px 8px 0;
108
+ box-shadow: 2px 0 14px rgba(5, 150, 105, 0.35);
109
+ }
110
+
111
+ .mtb-tab:hover {
112
+ background: #047857;
113
+ box-shadow: -3px 0 20px rgba(5, 150, 105, 0.5);
114
+ }
115
+
116
+ .mtb-tab.active {
117
+ background: #065f46;
118
+ }
119
+
120
+ /* ===== Toolbar ===== */
121
+ .mtb-toolbar {
122
+ position: fixed;
123
+ top: 18px;
124
+ left: 50%;
125
+ transform: translateX(-50%);
126
+ z-index: 2147483647;
127
+ display: flex;
128
+ align-items: center;
129
+ gap: 11px;
130
+ height: 46px;
131
+ padding: 0 7px;
132
+ border-radius: 13px;
133
+ background: linear-gradient(120deg, #10b981, #059669);
134
+ box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
135
+ animation: mtbBarIn 0.2s ease;
136
+ white-space: nowrap;
137
+ }
138
+
139
+ @keyframes mtbBarIn {
140
+ from { transform: translate(-50%, 12px); opacity: 0; }
141
+ to { transform: translate(-50%, 0); opacity: 1; }
142
+ }
143
+
144
+ .mtb-toolbar-modes {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: 3px;
148
+ background: rgba(255, 255, 255, 0.16);
149
+ border-radius: 9px;
150
+ padding: 3px;
151
+ }
152
+
153
+ .mtb-toolbar-mode-btn {
154
+ display: inline-flex;
155
+ align-items: center;
156
+ gap: 6px;
157
+ height: 30px;
158
+ padding: 0 12px;
159
+ border-radius: 7px;
160
+ border: none;
161
+ cursor: pointer;
162
+ font-family: inherit;
163
+ font-size: 12px;
164
+ font-weight: 550;
165
+ white-space: nowrap;
166
+ background: transparent;
167
+ color: rgba(255, 255, 255, 0.95);
168
+ transition: all 0.12s;
169
+ }
170
+
171
+ .mtb-toolbar-mode-btn.active {
172
+ background: #fff;
173
+ color: #047857;
174
+ }
175
+
176
+ .mtb-toolbar-hint {
177
+ font-size: 12px;
178
+ color: rgba(255, 255, 255, 0.95);
179
+ white-space: nowrap;
180
+ }
181
+
182
+ .mtb-toolbar-sep {
183
+ width: 1px;
184
+ height: 20px;
185
+ background: rgba(255, 255, 255, 0.22);
186
+ }
187
+
188
+ .mtb-exit-btn {
189
+ display: inline-flex;
190
+ align-items: center;
191
+ gap: 5px;
192
+ height: 30px;
193
+ padding: 0 12px;
194
+ border-radius: 8px;
195
+ font-size: 11.5px;
196
+ font-weight: 500;
197
+ color: #fff;
198
+ cursor: pointer;
199
+ background: rgba(255, 255, 255, 0.16);
200
+ border: none;
201
+ font-family: inherit;
202
+ transition: background 0.12s;
203
+ }
204
+
205
+ .mtb-exit-btn:hover {
206
+ background: rgba(255, 255, 255, 0.28);
207
+ }
208
+
209
+ /* ===== Overlay ===== */
210
+ .mtb-overlay {
211
+ position: fixed;
212
+ inset: 0;
213
+ z-index: 2147483640;
214
+ cursor: crosshair;
215
+ }
216
+
217
+ .mtb-dim {
218
+ position: fixed;
219
+ inset: 0;
220
+ z-index: 2147483639;
221
+ background: rgba(0, 0, 0, 0.08);
222
+ }
223
+
224
+ /* ===== Highlight ===== */
225
+ .mtb-highlight {
226
+ position: fixed;
227
+ z-index: 2147483641;
228
+ pointer-events: none;
229
+ border: 2px solid #10b981;
230
+ border-radius: 6px;
231
+ background: rgba(16, 185, 129, 0.06);
232
+ transition: all 0.08s ease;
233
+ }
234
+
235
+ .mtb-highlight-tooltip {
236
+ position: fixed;
237
+ z-index: 2147483642;
238
+ pointer-events: none;
239
+ transform: translateX(-50%);
240
+ background: #064e3b;
241
+ color: #fff;
242
+ padding: 4px 10px;
243
+ border-radius: 6px;
244
+ font-size: 11px;
245
+ font-weight: 500;
246
+ white-space: nowrap;
247
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
248
+ }
249
+
250
+ .mtb-highlight-tooltip::after {
251
+ content: '';
252
+ position: absolute;
253
+ top: 100%;
254
+ left: 50%;
255
+ transform: translateX(-50%);
256
+ border: 4px solid transparent;
257
+ border-top-color: #064e3b;
258
+ }
259
+
260
+ /* ===== Draw SVG ===== */
261
+ .mtb-draw-svg {
262
+ position: fixed;
263
+ inset: 0;
264
+ z-index: 2147483643;
265
+ pointer-events: none;
266
+ width: 100%;
267
+ height: 100%;
268
+ overflow: visible;
269
+ }
270
+
271
+ /* ===== Pin ===== */
272
+ .mtb-pin {
273
+ position: fixed;
274
+ z-index: 2147483644;
275
+ pointer-events: none;
276
+ width: 22px;
277
+ height: 22px;
278
+ border-radius: 50% 50% 50% 2px;
279
+ background: #059669;
280
+ border: 2px solid #fff;
281
+ display: flex;
282
+ align-items: center;
283
+ justify-content: center;
284
+ font-size: 10px;
285
+ color: #fff;
286
+ font-weight: 700;
287
+ box-shadow: 0 2px 8px rgba(5, 150, 105, 0.45);
288
+ animation: mtbPinPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
289
+ transform: translate(-50%, -50%);
290
+ }
291
+
292
+ @keyframes mtbPinPop {
293
+ from { transform: translate(-50%, -50%) scale(0.4); }
294
+ to { transform: translate(-50%, -50%) scale(1); }
295
+ }
296
+
297
+ /* ===== Comment Popup ===== */
298
+ .mtb-popup {
299
+ position: fixed;
300
+ z-index: 2147483645;
301
+ width: 320px;
302
+ background: #fff;
303
+ border: 1px solid rgba(0, 0, 0, 0.1);
304
+ border-radius: 14px;
305
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
306
+ overflow: hidden;
307
+ animation: mtbSlideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
308
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
309
+ }
310
+
311
+ @keyframes mtbSlideUp {
312
+ from { transform: translateY(14px) scale(0.97); opacity: 0; }
313
+ to { transform: translateY(0) scale(1); opacity: 1; }
314
+ }
315
+
316
+ .mtb-popup-header {
317
+ padding: 11px 13px 11px 14px;
318
+ border-bottom: 1px solid rgba(0, 0, 0, 0.06);
319
+ display: flex;
320
+ align-items: center;
321
+ gap: 8px;
322
+ }
323
+
324
+ .mtb-popup-icon {
325
+ width: 20px;
326
+ height: 20px;
327
+ border-radius: 5px;
328
+ background: rgba(16, 185, 129, 0.1);
329
+ display: flex;
330
+ align-items: center;
331
+ justify-content: center;
332
+ flex-shrink: 0;
333
+ }
334
+
335
+ .mtb-popup-title {
336
+ flex: 1;
337
+ font-size: 12.5px;
338
+ font-weight: 600;
339
+ white-space: nowrap;
340
+ overflow: hidden;
341
+ text-overflow: ellipsis;
342
+ color: #191a1c;
343
+ }
344
+
345
+ .mtb-popup-close {
346
+ background: none;
347
+ border: none;
348
+ cursor: pointer;
349
+ padding: 3px;
350
+ color: rgba(0, 0, 0, 0.38);
351
+ display: flex;
352
+ align-items: center;
353
+ border-radius: 4px;
354
+ transition: color 0.12s;
355
+ }
356
+
357
+ .mtb-popup-close:hover {
358
+ color: rgba(0, 0, 0, 0.7);
359
+ }
360
+
361
+ .mtb-popup-body {
362
+ padding: 13px;
363
+ }
364
+
365
+ .mtb-quick-options {
366
+ display: flex;
367
+ flex-direction: column;
368
+ gap: 6px;
369
+ margin-bottom: 12px;
370
+ }
371
+
372
+ .mtb-quick-option {
373
+ display: flex;
374
+ align-items: center;
375
+ gap: 10px;
376
+ width: 100%;
377
+ padding: 10px 12px;
378
+ border: 1px solid rgba(0, 0, 0, 0.09);
379
+ border-radius: 10px;
380
+ background: #fafafa;
381
+ cursor: pointer;
382
+ font-family: inherit;
383
+ font-size: 13px;
384
+ color: #191a1c;
385
+ text-align: left;
386
+ transition: all 0.12s;
387
+ }
388
+
389
+ .mtb-quick-option:hover {
390
+ background: rgba(16, 185, 129, 0.06);
391
+ border-color: rgba(16, 185, 129, 0.3);
392
+ }
393
+
394
+ .mtb-quick-option-emoji {
395
+ font-size: 15px;
396
+ flex-shrink: 0;
397
+ line-height: 1;
398
+ }
399
+
400
+ .mtb-textarea-wrap {
401
+ position: relative;
402
+ }
403
+
404
+ .mtb-textarea {
405
+ width: 100%;
406
+ height: 64px;
407
+ padding: 9px 11px;
408
+ border: 1px solid rgba(0, 0, 0, 0.12);
409
+ border-radius: 9px;
410
+ font-family: inherit;
411
+ font-size: 12.5px;
412
+ line-height: 1.5;
413
+ color: #191a1c;
414
+ outline: none;
415
+ background: #fff;
416
+ resize: none;
417
+ transition: border-color 0.12s, box-shadow 0.12s;
418
+ }
419
+
420
+ .mtb-textarea:focus {
421
+ border-color: #10b981;
422
+ box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
423
+ }
424
+
425
+ .mtb-textarea::placeholder {
426
+ color: rgba(0, 0, 0, 0.34);
427
+ }
428
+
429
+ .mtb-popup-error {
430
+ margin-top: 8px;
431
+ color: #b91c1c;
432
+ font-size: 11.5px;
433
+ }
434
+
435
+ .mtb-popup-error:empty,
436
+ .mtb-popup-error[hidden] {
437
+ display: none;
438
+ }
439
+
440
+ .mtb-popup-actions {
441
+ display: flex;
442
+ justify-content: flex-end;
443
+ gap: 8px;
444
+ margin-top: 12px;
445
+ }
446
+
447
+ .mtb-cancel-btn,
448
+ .mtb-submit-btn {
449
+ min-width: 72px;
450
+ height: 30px;
451
+ border: none;
452
+ border-radius: 7px;
453
+ cursor: pointer;
454
+ display: flex;
455
+ align-items: center;
456
+ justify-content: center;
457
+ padding: 0 12px;
458
+ font-family: inherit;
459
+ font-size: 12px;
460
+ font-weight: 600;
461
+ transition: background 0.12s;
462
+ }
463
+
464
+ .mtb-cancel-btn {
465
+ background: #f3f4f6;
466
+ color: rgba(0, 0, 0, 0.68);
467
+ }
468
+
469
+ .mtb-cancel-btn:hover {
470
+ background: #e5e7eb;
471
+ }
472
+
473
+ .mtb-submit-btn {
474
+ background: #d1d5db;
475
+ color: #fff;
476
+ }
477
+
478
+ .mtb-submit-btn.ready {
479
+ background: #059669;
480
+ }
481
+
482
+ .mtb-submit-btn.ready:hover {
483
+ background: #047857;
484
+ }
485
+
486
+ .mtb-submit-btn.loading {
487
+ background: #059669;
488
+ opacity: 0.7;
489
+ cursor: wait;
490
+ }
491
+
492
+ .mtb-submit-btn:disabled {
493
+ cursor: not-allowed;
494
+ }
495
+
496
+ /* ===== Success / Error States ===== */
497
+ .mtb-success {
498
+ position: fixed;
499
+ z-index: 2147483645;
500
+ width: 300px;
501
+ background: #fff;
502
+ border: 1px solid rgba(0, 0, 0, 0.1);
503
+ border-radius: 16px;
504
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
505
+ padding: 26px 22px;
506
+ text-align: center;
507
+ animation: mtbSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
508
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
509
+ }
510
+
511
+ .mtb-success-icon {
512
+ width: 44px;
513
+ height: 44px;
514
+ border-radius: 50%;
515
+ background: rgba(5, 150, 105, 0.08);
516
+ display: flex;
517
+ align-items: center;
518
+ justify-content: center;
519
+ margin: 0 auto 12px;
520
+ }
521
+
522
+ .mtb-success-title {
523
+ font-size: 16px;
524
+ font-weight: 700;
525
+ margin-bottom: 6px;
526
+ color: #191a1c;
527
+ }
528
+
529
+ .mtb-success-msg {
530
+ font-size: 13px;
531
+ color: rgba(0, 0, 0, 0.55);
532
+ margin-bottom: 16px;
533
+ line-height: 1.6;
534
+ }
535
+
536
+ .mtb-close-link {
537
+ background: none;
538
+ border: none;
539
+ cursor: pointer;
540
+ font-size: 12px;
541
+ color: rgba(0, 0, 0, 0.45);
542
+ font-family: inherit;
543
+ transition: color 0.12s;
544
+ }
545
+
546
+ .mtb-close-link:hover {
547
+ color: rgba(0, 0, 0, 0.7);
548
+ }
549
+
550
+ /* ===== Pet Entry ===== */
551
+ .mtb-pet {
552
+ position: fixed;
553
+ bottom: 20px;
554
+ right: 20px;
555
+ z-index: 2147483646;
556
+ cursor: pointer;
557
+ width: 52px;
558
+ height: 52px;
559
+ display: flex;
560
+ align-items: center;
561
+ justify-content: center;
562
+ border-radius: 50%;
563
+ background: transparent;
564
+ animation: mtbPetBounce 3s ease-in-out infinite;
565
+ transition: transform 0.2s;
566
+ user-select: none;
567
+ outline: none;
568
+ filter: drop-shadow(0 4px 12px rgba(5, 150, 105, 0.35));
569
+ }
570
+
571
+ .mtb-pet:hover {
572
+ transform: scale(1.12);
573
+ animation-play-state: paused;
574
+ }
575
+
576
+ .mtb-pet:hover .mtb-pet-bubble {
577
+ opacity: 1;
578
+ transform: translateX(-50%) translateY(0);
579
+ pointer-events: auto;
580
+ }
581
+
582
+ .mtb-pet.active {
583
+ animation: none;
584
+ opacity: 0.6;
585
+ }
586
+
587
+ .mtb-pet-svg {
588
+ display: block;
589
+ }
590
+
591
+ @keyframes mtbPetBounce {
592
+ 0%, 100% { transform: translateY(0); }
593
+ 50% { transform: translateY(-6px); }
594
+ }
595
+
596
+ .mtb-pet-bubble {
597
+ position: absolute;
598
+ bottom: 100%;
599
+ left: 50%;
600
+ transform: translateX(-50%) translateY(4px);
601
+ margin-bottom: 8px;
602
+ background: #064e3b;
603
+ color: #fff;
604
+ padding: 6px 12px;
605
+ border-radius: 8px;
606
+ font-size: 12px;
607
+ font-weight: 500;
608
+ white-space: nowrap;
609
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
610
+ opacity: 0;
611
+ pointer-events: none;
612
+ transition: opacity 0.2s, transform 0.2s;
613
+ }
614
+
615
+ .mtb-pet-bubble.visible {
616
+ opacity: 1;
617
+ transform: translateX(-50%) translateY(0);
618
+ pointer-events: auto;
619
+ }
620
+
621
+ .mtb-pet-bubble.hidden {
622
+ opacity: 0;
623
+ pointer-events: none;
624
+ }
625
+
626
+ .mtb-pet-bubble::after {
627
+ content: '';
628
+ position: absolute;
629
+ top: 100%;
630
+ left: 50%;
631
+ transform: translateX(-50%);
632
+ border: 5px solid transparent;
633
+ border-top-color: #064e3b;
634
+ }
635
+
636
+ /* ===== Frustration Prompt ===== */
637
+ .mtb-frustration-prompt {
638
+ position: fixed;
639
+ bottom: 20px;
640
+ right: 20px;
641
+ z-index: 2147483645;
642
+ display: flex;
643
+ align-items: center;
644
+ gap: 10px;
645
+ padding: 12px 16px;
646
+ background: #fff;
647
+ border: 1px solid rgba(0, 0, 0, 0.1);
648
+ border-radius: 12px;
649
+ box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
650
+ animation: mtbSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
651
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
652
+ }
653
+
654
+ :host([data-mtb-theme="dark"]) .mtb-frustration-prompt {
655
+ background: #151719;
656
+ border-color: rgba(255, 255, 255, 0.12);
657
+ color: #f9fafb;
658
+ }
659
+
660
+ @media (prefers-color-scheme: dark) {
661
+ :host([data-mtb-theme="auto"]) .mtb-frustration-prompt {
662
+ background: #151719;
663
+ border-color: rgba(255, 255, 255, 0.12);
664
+ color: #f9fafb;
665
+ }
666
+ }
667
+
668
+ .mtb-frustration-icon {
669
+ width: 32px;
670
+ height: 32px;
671
+ border-radius: 50%;
672
+ background: rgba(234, 179, 8, 0.1);
673
+ display: flex;
674
+ align-items: center;
675
+ justify-content: center;
676
+ flex-shrink: 0;
677
+ font-size: 16px;
678
+ line-height: 1;
679
+ }
680
+
681
+ .mtb-frustration-text {
682
+ font-size: 13px;
683
+ font-weight: 500;
684
+ color: inherit;
685
+ line-height: 1.4;
686
+ }
687
+
688
+ .mtb-frustration-actions {
689
+ display: flex;
690
+ gap: 6px;
691
+ flex-shrink: 0;
692
+ }
693
+
694
+ .mtb-frustration-tell {
695
+ height: 28px;
696
+ padding: 0 12px;
697
+ border: none;
698
+ border-radius: 7px;
699
+ background: #059669;
700
+ color: #fff;
701
+ cursor: pointer;
702
+ font-family: inherit;
703
+ font-size: 12px;
704
+ font-weight: 600;
705
+ transition: background 0.12s;
706
+ }
707
+
708
+ .mtb-frustration-tell:hover {
709
+ background: #047857;
710
+ }
711
+
712
+ .mtb-frustration-dismiss {
713
+ height: 28px;
714
+ padding: 0 8px;
715
+ border: none;
716
+ border-radius: 7px;
717
+ background: transparent;
718
+ color: rgba(0, 0, 0, 0.4);
719
+ cursor: pointer;
720
+ font-family: inherit;
721
+ font-size: 12px;
722
+ transition: color 0.12s;
723
+ }
724
+
725
+ .mtb-frustration-dismiss:hover {
726
+ color: rgba(0, 0, 0, 0.7);
727
+ }
728
+
729
+ :host([data-mtb-theme="dark"]) .mtb-frustration-dismiss {
730
+ color: rgba(255, 255, 255, 0.4);
731
+ }
732
+
733
+ :host([data-mtb-theme="dark"]) .mtb-frustration-dismiss:hover {
734
+ color: rgba(255, 255, 255, 0.7);
735
+ }
736
+
737
+ @media (prefers-color-scheme: dark) {
738
+ :host([data-mtb-theme="auto"]) .mtb-frustration-dismiss {
739
+ color: rgba(255, 255, 255, 0.4);
740
+ }
741
+ :host([data-mtb-theme="auto"]) .mtb-frustration-dismiss:hover {
742
+ color: rgba(255, 255, 255, 0.7);
743
+ }
744
+ }
745
+
746
+ /* ===== Record Control Bar ===== */
747
+ .mtb-record-bar {
748
+ position: fixed;
749
+ bottom: 24px;
750
+ left: 50%;
751
+ transform: translateX(-50%);
752
+ z-index: 2147483647;
753
+ display: flex;
754
+ align-items: center;
755
+ gap: 12px;
756
+ height: 42px;
757
+ padding: 0 8px 0 14px;
758
+ border-radius: 12px;
759
+ background: rgba(15, 23, 42, 0.92);
760
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
761
+ animation: mtbBarIn 0.2s ease;
762
+ }
763
+
764
+ .mtb-record-dot {
765
+ width: 8px;
766
+ height: 8px;
767
+ border-radius: 50%;
768
+ background: #ef4444;
769
+ animation: mtbRecordPulse 1.2s ease-in-out infinite;
770
+ flex-shrink: 0;
771
+ }
772
+
773
+ @keyframes mtbRecordPulse {
774
+ 0%, 100% { opacity: 1; }
775
+ 50% { opacity: 0.3; }
776
+ }
777
+
778
+ .mtb-record-timer {
779
+ font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
780
+ font-size: 13px;
781
+ font-weight: 500;
782
+ color: #fff;
783
+ font-variant-numeric: tabular-nums;
784
+ letter-spacing: 0.02em;
785
+ min-width: 38px;
786
+ }
787
+
788
+ .mtb-record-stop {
789
+ height: 28px;
790
+ padding: 0 14px;
791
+ border: none;
792
+ border-radius: 7px;
793
+ background: #059669;
794
+ color: #fff;
795
+ cursor: pointer;
796
+ font-family: inherit;
797
+ font-size: 12px;
798
+ font-weight: 600;
799
+ transition: background 0.12s;
800
+ }
801
+
802
+ .mtb-record-stop:hover {
803
+ background: #047857;
804
+ }
805
+
806
+ /* ===== Click Ripple ===== */
807
+ .mtb-click-ripple {
808
+ position: fixed;
809
+ z-index: 2147483644;
810
+ width: 24px;
811
+ height: 24px;
812
+ border-radius: 50%;
813
+ border: 2px solid #10b981;
814
+ background: rgba(16, 185, 129, 0.2);
815
+ pointer-events: none;
816
+ transform: translate(-50%, -50%) scale(0.5);
817
+ animation: mtbClickRipple 0.3s ease-out forwards;
818
+ }
819
+
820
+ @keyframes mtbClickRipple {
821
+ 0% {
822
+ transform: translate(-50%, -50%) scale(0.5);
823
+ opacity: 1;
824
+ }
825
+ 100% {
826
+ transform: translate(-50%, -50%) scale(2);
827
+ opacity: 0;
828
+ }
829
+ }
830
+
831
+ /* Loading dots */
832
+ .mtb-dot {
833
+ display: inline-block;
834
+ width: 4px;
835
+ height: 4px;
836
+ border-radius: 50%;
837
+ background: #fff;
838
+ animation: mtbDot 1.2s infinite;
839
+ }
840
+
841
+ .mtb-dot:nth-child(2) { animation-delay: 0.2s; }
842
+ .mtb-dot:nth-child(3) { animation-delay: 0.4s; }
843
+
844
+ @keyframes mtbDot {
845
+ 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
846
+ 40% { opacity: 1; transform: translateY(-3px); }
847
+ }