clay-server 2.5.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 (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +281 -0
  3. package/bin/cli.js +2385 -0
  4. package/lib/cli-sessions.js +270 -0
  5. package/lib/config.js +237 -0
  6. package/lib/daemon.js +489 -0
  7. package/lib/ipc.js +112 -0
  8. package/lib/notes.js +120 -0
  9. package/lib/pages.js +664 -0
  10. package/lib/project.js +1433 -0
  11. package/lib/public/app.js +2795 -0
  12. package/lib/public/apple-touch-icon-dark.png +0 -0
  13. package/lib/public/apple-touch-icon.png +0 -0
  14. package/lib/public/css/base.css +264 -0
  15. package/lib/public/css/diff.css +128 -0
  16. package/lib/public/css/filebrowser.css +1114 -0
  17. package/lib/public/css/highlight.css +144 -0
  18. package/lib/public/css/icon-strip.css +296 -0
  19. package/lib/public/css/input.css +573 -0
  20. package/lib/public/css/menus.css +856 -0
  21. package/lib/public/css/messages.css +1445 -0
  22. package/lib/public/css/mobile-nav.css +354 -0
  23. package/lib/public/css/overlays.css +697 -0
  24. package/lib/public/css/rewind.css +505 -0
  25. package/lib/public/css/server-settings.css +761 -0
  26. package/lib/public/css/sidebar.css +936 -0
  27. package/lib/public/css/sticky-notes.css +358 -0
  28. package/lib/public/css/title-bar.css +314 -0
  29. package/lib/public/favicon-dark.svg +1 -0
  30. package/lib/public/favicon.svg +1 -0
  31. package/lib/public/icon-192-dark.png +0 -0
  32. package/lib/public/icon-192.png +0 -0
  33. package/lib/public/icon-512-dark.png +0 -0
  34. package/lib/public/icon-512.png +0 -0
  35. package/lib/public/icon-mono.svg +1 -0
  36. package/lib/public/index.html +762 -0
  37. package/lib/public/manifest.json +27 -0
  38. package/lib/public/modules/diff.js +398 -0
  39. package/lib/public/modules/events.js +21 -0
  40. package/lib/public/modules/filebrowser.js +1411 -0
  41. package/lib/public/modules/fileicons.js +172 -0
  42. package/lib/public/modules/icons.js +54 -0
  43. package/lib/public/modules/input.js +584 -0
  44. package/lib/public/modules/markdown.js +356 -0
  45. package/lib/public/modules/notifications.js +649 -0
  46. package/lib/public/modules/qrcode.js +70 -0
  47. package/lib/public/modules/rewind.js +345 -0
  48. package/lib/public/modules/server-settings.js +510 -0
  49. package/lib/public/modules/sidebar.js +1083 -0
  50. package/lib/public/modules/state.js +3 -0
  51. package/lib/public/modules/sticky-notes.js +688 -0
  52. package/lib/public/modules/terminal.js +697 -0
  53. package/lib/public/modules/theme.js +738 -0
  54. package/lib/public/modules/tools.js +1608 -0
  55. package/lib/public/modules/utils.js +56 -0
  56. package/lib/public/style.css +15 -0
  57. package/lib/public/sw.js +75 -0
  58. package/lib/push.js +124 -0
  59. package/lib/sdk-bridge.js +989 -0
  60. package/lib/server.js +582 -0
  61. package/lib/sessions.js +424 -0
  62. package/lib/terminal-manager.js +187 -0
  63. package/lib/terminal.js +24 -0
  64. package/lib/themes/ayu-light.json +9 -0
  65. package/lib/themes/catppuccin-latte.json +9 -0
  66. package/lib/themes/catppuccin-mocha.json +9 -0
  67. package/lib/themes/clay-light.json +10 -0
  68. package/lib/themes/clay.json +10 -0
  69. package/lib/themes/dracula.json +9 -0
  70. package/lib/themes/everforest-light.json +9 -0
  71. package/lib/themes/everforest.json +9 -0
  72. package/lib/themes/github-light.json +9 -0
  73. package/lib/themes/gruvbox-dark.json +9 -0
  74. package/lib/themes/gruvbox-light.json +9 -0
  75. package/lib/themes/monokai.json +9 -0
  76. package/lib/themes/nord-light.json +9 -0
  77. package/lib/themes/nord.json +9 -0
  78. package/lib/themes/one-dark.json +9 -0
  79. package/lib/themes/one-light.json +9 -0
  80. package/lib/themes/rose-pine-dawn.json +9 -0
  81. package/lib/themes/rose-pine.json +9 -0
  82. package/lib/themes/solarized-dark.json +9 -0
  83. package/lib/themes/solarized-light.json +9 -0
  84. package/lib/themes/tokyo-night-light.json +9 -0
  85. package/lib/themes/tokyo-night.json +9 -0
  86. package/lib/updater.js +97 -0
  87. package/package.json +47 -0
@@ -0,0 +1,358 @@
1
+ /* ==========================================================================
2
+ Sticky Notes
3
+ ========================================================================== */
4
+
5
+ /* --- Container (inside #app, absolutely positioned) --- */
6
+ #sticky-notes-container {
7
+ position: absolute;
8
+ inset: 0;
9
+ pointer-events: none;
10
+ z-index: 50;
11
+ overflow: hidden;
12
+ }
13
+
14
+ #sticky-notes-container.hidden { display: none; }
15
+
16
+ /* --- Toggle button (in title bar, matches terminal-toggle-btn) --- */
17
+ #sticky-notes-toggle-btn {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ background: none;
22
+ border: 1px solid transparent;
23
+ border-radius: 8px;
24
+ color: var(--text-dimmer);
25
+ cursor: pointer;
26
+ padding: 4px;
27
+ transition: color 0.15s, background 0.15s, border-color 0.15s;
28
+ position: relative;
29
+ }
30
+
31
+ #sticky-notes-toggle-btn .lucide { width: 15px; height: 15px; }
32
+ #sticky-notes-toggle-btn:hover { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.04); border-color: var(--border); }
33
+ #sticky-notes-toggle-btn.active { color: var(--text); background: rgba(var(--overlay-rgb),0.06); border-color: var(--border); }
34
+
35
+ .sticky-notes-count {
36
+ position: absolute;
37
+ top: -4px;
38
+ right: -4px;
39
+ background: var(--accent);
40
+ color: #fff;
41
+ font-size: 9px;
42
+ font-weight: 700;
43
+ min-width: 14px;
44
+ height: 14px;
45
+ border-radius: 7px;
46
+ display: inline-flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ padding: 0 3px;
50
+ font-family: "Roboto Mono", monospace;
51
+ }
52
+
53
+ .sticky-notes-count.hidden { display: none; }
54
+
55
+ /* --- Individual note --- */
56
+ .sticky-note {
57
+ position: absolute;
58
+ pointer-events: auto;
59
+ border-radius: 6px;
60
+ box-shadow: 0 2px 12px rgba(var(--shadow-rgb), 0.12);
61
+ display: flex;
62
+ flex-direction: column;
63
+ min-width: 160px;
64
+ min-height: 80px;
65
+ transition: box-shadow 0.15s;
66
+ overflow: hidden;
67
+ }
68
+
69
+ .sticky-note:hover {
70
+ box-shadow: 0 4px 20px rgba(var(--shadow-rgb), 0.2);
71
+ }
72
+
73
+ .sticky-note.dragging,
74
+ .sticky-note.resizing {
75
+ opacity: 0.92;
76
+ box-shadow: 0 8px 32px rgba(var(--shadow-rgb), 0.3);
77
+ transition: none;
78
+ }
79
+
80
+ /* --- Note color themes (light) --- */
81
+ .sticky-note[data-color="yellow"] { background: #FFF9C4; border: 1px solid #EFD74E; }
82
+ .sticky-note[data-color="blue"] { background: #BBDEFB; border: 1px solid #64B5F6; }
83
+ .sticky-note[data-color="green"] { background: #C8E6C9; border: 1px solid #66BB6A; }
84
+ .sticky-note[data-color="pink"] { background: #F8BBD0; border: 1px solid #F06292; }
85
+ .sticky-note[data-color="orange"] { background: #FFE0B2; border: 1px solid #FFA726; }
86
+ .sticky-note[data-color="purple"] { background: #E1BEE7; border: 1px solid #AB47BC; }
87
+
88
+ /* --- Note color themes (dark) --- */
89
+ .dark-theme .sticky-note[data-color="yellow"] { background: #3D3A1E; border-color: #8B7E2A; }
90
+ .dark-theme .sticky-note[data-color="blue"] { background: #1A2A3D; border-color: #3A7BD5; }
91
+ .dark-theme .sticky-note[data-color="green"] { background: #1A2D1A; border-color: #4A8F4A; }
92
+ .dark-theme .sticky-note[data-color="pink"] { background: #3D1A2A; border-color: #C44A72; }
93
+ .dark-theme .sticky-note[data-color="orange"] { background: #3D2A1A; border-color: #C47A3A; }
94
+ .dark-theme .sticky-note[data-color="purple"] { background: #2A1A3D; border-color: #8A4AAA; }
95
+
96
+ /* --- Header (drag bar) --- */
97
+ .sticky-note-header {
98
+ display: flex;
99
+ align-items: center;
100
+ gap: 2px;
101
+ padding: 4px 6px;
102
+ user-select: none;
103
+ flex-shrink: 0;
104
+ }
105
+
106
+ .sticky-note-spacer {
107
+ flex: 1;
108
+ min-width: 0;
109
+ height: 20px;
110
+ cursor: grab;
111
+ font-size: 12px;
112
+ font-weight: 700;
113
+ line-height: 20px;
114
+ overflow: hidden;
115
+ text-overflow: ellipsis;
116
+ white-space: nowrap;
117
+ color: transparent;
118
+ pointer-events: auto;
119
+ }
120
+
121
+ .sticky-note-spacer:active { cursor: grabbing; }
122
+
123
+ .sticky-note-header button {
124
+ display: flex;
125
+ align-items: center;
126
+ justify-content: center;
127
+ background: none;
128
+ border: none;
129
+ border-radius: 4px;
130
+ padding: 3px;
131
+ cursor: pointer;
132
+ opacity: 0;
133
+ transition: opacity 0.15s, background 0.15s;
134
+ }
135
+
136
+ .sticky-note:hover .sticky-note-header button { opacity: 0.5; }
137
+ .sticky-note .sticky-note-header button:hover { opacity: 0.9; background: rgba(0,0,0,0.06); }
138
+
139
+ .sticky-note-header button .lucide { width: 13px; height: 13px; }
140
+
141
+ /* Text colors per note color (light) */
142
+ .sticky-note[data-color="yellow"] .sticky-note-header button { color: #6D5E00; }
143
+ .sticky-note[data-color="blue"] .sticky-note-header button { color: #0D47A1; }
144
+ .sticky-note[data-color="green"] .sticky-note-header button { color: #1B5E20; }
145
+ .sticky-note[data-color="pink"] .sticky-note-header button { color: #880E4F; }
146
+ .sticky-note[data-color="orange"] .sticky-note-header button { color: #E65100; }
147
+ .sticky-note[data-color="purple"] .sticky-note-header button { color: #4A148C; }
148
+
149
+ /* Text colors per note color (dark) */
150
+ .dark-theme .sticky-note[data-color="yellow"] .sticky-note-header button { color: #E8E0A8; }
151
+ .dark-theme .sticky-note[data-color="blue"] .sticky-note-header button { color: #B0D4F1; }
152
+ .dark-theme .sticky-note[data-color="green"] .sticky-note-header button { color: #B0D8B0; }
153
+ .dark-theme .sticky-note[data-color="pink"] .sticky-note-header button { color: #F0B8CC; }
154
+ .dark-theme .sticky-note[data-color="orange"] .sticky-note-header button { color: #F0D0A8; }
155
+ .dark-theme .sticky-note[data-color="purple"] .sticky-note-header button { color: #D8B8F0; }
156
+
157
+ /* --- Body (textarea) --- */
158
+ .sticky-note-body {
159
+ flex: 1;
160
+ padding: 0 8px 8px;
161
+ min-height: 0;
162
+ display: flex;
163
+ }
164
+
165
+ .sticky-note-text {
166
+ width: 100%;
167
+ height: 100%;
168
+ min-height: 40px;
169
+ background: none;
170
+ border: none;
171
+ outline: none;
172
+ resize: none;
173
+ font-family: "Pretendard", system-ui, sans-serif;
174
+ font-size: 13px;
175
+ line-height: 1.5;
176
+ color: inherit;
177
+ }
178
+
179
+ /* Body text colors (light) */
180
+ .sticky-note[data-color="yellow"] .sticky-note-body { color: #5D4E00; }
181
+ .sticky-note[data-color="blue"] .sticky-note-body { color: #0D47A1; }
182
+ .sticky-note[data-color="green"] .sticky-note-body { color: #1B5E20; }
183
+ .sticky-note[data-color="pink"] .sticky-note-body { color: #880E4F; }
184
+ .sticky-note[data-color="orange"] .sticky-note-body { color: #E65100; }
185
+ .sticky-note[data-color="purple"] .sticky-note-body { color: #4A148C; }
186
+
187
+ /* Body text colors (dark) */
188
+ .dark-theme .sticky-note[data-color="yellow"] .sticky-note-body { color: #E8E0A8; }
189
+ .dark-theme .sticky-note[data-color="blue"] .sticky-note-body { color: #B0D4F1; }
190
+ .dark-theme .sticky-note[data-color="green"] .sticky-note-body { color: #B0D8B0; }
191
+ .dark-theme .sticky-note[data-color="pink"] .sticky-note-body { color: #F0B8CC; }
192
+ .dark-theme .sticky-note[data-color="orange"] .sticky-note-body { color: #F0D0A8; }
193
+ .dark-theme .sticky-note[data-color="purple"] .sticky-note-body { color: #D8B8F0; }
194
+
195
+ .sticky-note-text::placeholder {
196
+ opacity: 0.35;
197
+ color: inherit;
198
+ }
199
+
200
+ /* --- Rendered markdown view --- */
201
+ .sticky-note-rendered {
202
+ width: 100%;
203
+ height: 100%;
204
+ overflow-y: auto;
205
+ font-family: "Pretendard", system-ui, sans-serif;
206
+ font-size: 13px;
207
+ line-height: 1.5;
208
+ cursor: text;
209
+ word-break: break-word;
210
+ color: inherit;
211
+ }
212
+
213
+ .sticky-note-rendered a {
214
+ color: inherit;
215
+ text-decoration: underline;
216
+ text-underline-offset: 2px;
217
+ cursor: pointer;
218
+ }
219
+
220
+ .sticky-note-rendered a:hover {
221
+ opacity: 0.7;
222
+ }
223
+
224
+ .sticky-note-rendered .sn-title {
225
+ font-weight: 700;
226
+ margin-bottom: 2px;
227
+ }
228
+
229
+ .sticky-note-rendered strong {
230
+ font-weight: 700;
231
+ }
232
+
233
+ .sticky-note-rendered code {
234
+ font-family: "Roboto Mono", monospace;
235
+ font-size: 12px;
236
+ padding: 1px 4px;
237
+ border-radius: 3px;
238
+ background: rgba(0,0,0,0.06);
239
+ }
240
+
241
+ .dark-theme .sticky-note-rendered code {
242
+ background: rgba(255,255,255,0.08);
243
+ }
244
+
245
+ .sticky-note-rendered del {
246
+ opacity: 0.5;
247
+ }
248
+
249
+ .sticky-note-rendered .sn-check {
250
+ font-size: 12px;
251
+ margin-right: 4px;
252
+ opacity: 0.6;
253
+ }
254
+
255
+ .sticky-note-rendered .sn-check.checked {
256
+ opacity: 0.9;
257
+ }
258
+
259
+ /* --- Resize handle (bottom-right corner) --- */
260
+ .sticky-note-resize {
261
+ position: absolute;
262
+ bottom: 0;
263
+ right: 0;
264
+ width: 14px;
265
+ height: 14px;
266
+ cursor: nwse-resize;
267
+ opacity: 0;
268
+ transition: opacity 0.15s;
269
+ }
270
+
271
+ .sticky-note:hover .sticky-note-resize { opacity: 0.3; }
272
+
273
+ .sticky-note-resize::after {
274
+ content: "";
275
+ position: absolute;
276
+ bottom: 3px;
277
+ right: 3px;
278
+ width: 6px;
279
+ height: 6px;
280
+ border-right: 2px solid currentColor;
281
+ border-bottom: 2px solid currentColor;
282
+ opacity: 0.5;
283
+ }
284
+
285
+ /* --- Minimized state --- */
286
+ .sticky-note.minimized .sticky-note-body,
287
+ .sticky-note.minimized .sticky-note-resize {
288
+ display: none;
289
+ }
290
+
291
+ .sticky-note.minimized {
292
+ min-height: unset;
293
+ min-width: unset;
294
+ height: auto !important;
295
+ width: auto !important;
296
+ }
297
+
298
+ .sticky-note.minimized .sticky-note-spacer {
299
+ color: inherit;
300
+ opacity: 1;
301
+ }
302
+
303
+ .sticky-note.minimized .sticky-note-header button {
304
+ display: none;
305
+ }
306
+
307
+ .sticky-note.minimized .sticky-note-min-btn {
308
+ display: flex !important;
309
+ opacity: 0.5 !important;
310
+ pointer-events: auto !important;
311
+ order: 99;
312
+ }
313
+
314
+ .sticky-note.minimized .sticky-note-min-btn:hover {
315
+ opacity: 0.9 !important;
316
+ }
317
+
318
+ /* --- Color picker popup --- */
319
+ .sticky-note-color-picker {
320
+ position: fixed;
321
+ display: flex;
322
+ gap: 4px;
323
+ padding: 6px 8px;
324
+ background: var(--bg-alt);
325
+ border: 1px solid var(--border);
326
+ border-radius: 8px;
327
+ box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.3);
328
+ z-index: 250;
329
+ }
330
+
331
+ .sticky-note-color-dot {
332
+ width: 18px;
333
+ height: 18px;
334
+ border-radius: 50%;
335
+ border: 2px solid transparent;
336
+ cursor: pointer;
337
+ transition: transform 0.1s, border-color 0.15s;
338
+ padding: 0;
339
+ background: none;
340
+ }
341
+
342
+ .sticky-note-color-dot:hover { transform: scale(1.2); }
343
+ .sticky-note-color-dot.active { border-color: var(--text); }
344
+
345
+ .sticky-note-color-dot[data-color="yellow"] { background: #F9E04B; }
346
+ .sticky-note-color-dot[data-color="blue"] { background: #64B5F6; }
347
+ .sticky-note-color-dot[data-color="green"] { background: #66BB6A; }
348
+ .sticky-note-color-dot[data-color="pink"] { background: #F06292; }
349
+ .sticky-note-color-dot[data-color="orange"] { background: #FFA726; }
350
+ .sticky-note-color-dot[data-color="purple"] { background: #AB47BC; }
351
+
352
+ /* --- Mobile: hide entirely --- */
353
+ @media (max-width: 768px) {
354
+ #sticky-notes-container,
355
+ #sticky-notes-toggle-btn {
356
+ display: none !important;
357
+ }
358
+ }
@@ -0,0 +1,314 @@
1
+ /* ==========================================================================
2
+ Top Bar — full-width bar above everything (forms reverse-ㄱ with icon strip)
3
+ ========================================================================== */
4
+
5
+ #top-bar {
6
+ flex-shrink: 0;
7
+ height: 32px;
8
+ background: var(--sidebar-bg);
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ padding: calc(var(--safe-top) + 0px) 0 0;
13
+ position: relative;
14
+ }
15
+
16
+ .top-bar-title {
17
+ display: flex;
18
+ align-items: center;
19
+ gap: 5px;
20
+ font-family: "Nunito", sans-serif;
21
+ font-size: 13px;
22
+ font-weight: 700;
23
+ color: var(--text-muted);
24
+ text-decoration: none;
25
+ -webkit-app-region: no-drag;
26
+ transition: color 0.15s;
27
+ }
28
+
29
+ .top-bar-icon {
30
+ width: 16px;
31
+ height: 16px;
32
+ border-radius: 4px;
33
+ flex-shrink: 0;
34
+ }
35
+
36
+ .top-bar-title:hover {
37
+ color: var(--text);
38
+ }
39
+
40
+ /* --- Top bar actions (right-aligned group) --- */
41
+ .top-bar-actions {
42
+ position: absolute;
43
+ right: 10px;
44
+ top: 50%;
45
+ transform: translateY(-50%);
46
+ display: flex;
47
+ align-items: center;
48
+ gap: 2px;
49
+ }
50
+
51
+ .top-bar-actions button {
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ background: none;
56
+ border: none;
57
+ border-radius: 6px;
58
+ color: var(--text-dimmer);
59
+ cursor: pointer;
60
+ padding: 3px;
61
+ transition: color 0.15s, background 0.15s;
62
+ }
63
+
64
+ .top-bar-actions button .lucide { width: 14px; height: 14px; }
65
+ .top-bar-actions button:hover { color: var(--text-secondary); background: rgba(var(--overlay-rgb),0.06); }
66
+
67
+ #server-settings-btn.active { color: var(--text); }
68
+
69
+ /* Debug button in top bar */
70
+ .top-bar-actions #debug-menu-wrap { position: relative; }
71
+ .top-bar-actions #debug-menu-wrap.hidden { display: none; }
72
+ .top-bar-actions #debug-btn { color: var(--error); opacity: 0.6; }
73
+ .top-bar-actions #debug-btn:hover { opacity: 1; background: var(--error-8); }
74
+ .top-bar-actions #debug-btn.active { opacity: 1; background: var(--error-12); }
75
+
76
+ /* QR/Share button in top bar */
77
+ .top-bar-actions #qr-btn.active { color: var(--text); background: rgba(var(--overlay-rgb),0.06); }
78
+
79
+ /* ==========================================================================
80
+ Title Bar — split into sidebar-column and main-column sections
81
+ ========================================================================== */
82
+
83
+ /* --- Sidebar section (inside #sidebar-column) --- */
84
+ .title-bar-sidebar {
85
+ flex-shrink: 0;
86
+ height: 48px;
87
+ display: flex;
88
+ align-items: center;
89
+ padding: 0 10px;
90
+ background: var(--sidebar-bg);
91
+ border-bottom: 1px solid var(--border-subtle);
92
+ }
93
+
94
+ .title-bar-project-name {
95
+ width: 100%;
96
+ font-size: 13px;
97
+ font-weight: 600;
98
+ color: var(--text);
99
+ overflow: hidden;
100
+ text-overflow: ellipsis;
101
+ white-space: nowrap;
102
+ }
103
+
104
+ /* --- Content section (inside #main-column) --- */
105
+ .title-bar-content {
106
+ flex-shrink: 0;
107
+ height: 48px;
108
+ display: flex;
109
+ align-items: center;
110
+ justify-content: space-between;
111
+ padding: 0 16px;
112
+ min-width: 0;
113
+ border-bottom: 1px solid var(--border-subtle);
114
+ }
115
+
116
+ .title-bar-content #header-left {
117
+ display: flex;
118
+ align-items: center;
119
+ overflow: hidden;
120
+ min-width: 0;
121
+ flex: 1;
122
+ }
123
+
124
+ .title-bar-content .status {
125
+ display: flex;
126
+ align-items: center;
127
+ gap: 6px;
128
+ font-size: 12px;
129
+ color: var(--text-muted);
130
+ flex-shrink: 0;
131
+ }
132
+
133
+ /* --- Mobile --- */
134
+ @media (max-width: 768px) {
135
+ #top-bar {
136
+ padding-top: var(--safe-top);
137
+ height: calc(32px + var(--safe-top));
138
+ }
139
+
140
+ #sidebar-column {
141
+ width: 0 !important;
142
+ min-width: 0 !important;
143
+ overflow: visible;
144
+ }
145
+
146
+ .title-bar-sidebar {
147
+ display: none;
148
+ }
149
+
150
+ .title-bar-content {
151
+ padding: 0 12px;
152
+ }
153
+
154
+ /* Hide title-bar terminal & sticky-notes buttons on mobile (tab bar has them) */
155
+ .title-bar-content .status #terminal-toggle-btn,
156
+ .title-bar-content .status #sticky-notes-toggle-btn {
157
+ display: none;
158
+ }
159
+ }
160
+
161
+ /* ==========================================================================
162
+ Header Indicators (Context Bar, Rate Limit, Fast Mode)
163
+ ========================================================================== */
164
+
165
+ /* --- Context bar --- */
166
+ .header-context {
167
+ display: inline-flex;
168
+ align-items: center;
169
+ gap: 6px;
170
+ width: 80px;
171
+ cursor: default;
172
+ }
173
+
174
+ .header-context-bar {
175
+ flex: 1;
176
+ height: 3px;
177
+ background: var(--border);
178
+ border-radius: 2px;
179
+ overflow: hidden;
180
+ }
181
+
182
+ .header-context-fill {
183
+ height: 100%;
184
+ width: 0%;
185
+ background: var(--accent);
186
+ border-radius: 2px;
187
+ transition: width 0.3s ease, background 0.3s ease;
188
+ }
189
+
190
+ .header-context-fill.warn { background: var(--warning); }
191
+ .header-context-fill.danger { background: var(--error); }
192
+
193
+ .header-context-label {
194
+ font-family: "Roboto Mono", monospace;
195
+ font-size: 10px;
196
+ color: var(--text-dimmer);
197
+ white-space: nowrap;
198
+ }
199
+
200
+ /* --- Shared pill style for rate limit & fast mode --- */
201
+ .header-rate-limit,
202
+ .header-fast-mode {
203
+ display: inline-flex;
204
+ align-items: center;
205
+ gap: 4px;
206
+ padding: 2px 8px;
207
+ border-radius: 10px;
208
+ font-size: 11px;
209
+ font-weight: 600;
210
+ white-space: nowrap;
211
+ user-select: none;
212
+ }
213
+
214
+ .header-rate-limit .lucide,
215
+ .header-fast-mode .lucide {
216
+ width: 12px;
217
+ height: 12px;
218
+ }
219
+
220
+ .header-pill-text {
221
+ line-height: 1;
222
+ }
223
+
224
+ /* Rate limit wrapper for popover positioning */
225
+ .header-rate-limit-wrap {
226
+ position: relative;
227
+ display: inline-flex;
228
+ }
229
+
230
+ /* Rate limit states */
231
+ .header-rate-limit.warning {
232
+ background: color-mix(in srgb, var(--warning) 12%, transparent);
233
+ color: var(--warning);
234
+ }
235
+
236
+ .header-rate-limit.rejected {
237
+ background: color-mix(in srgb, var(--error) 12%, transparent);
238
+ color: var(--error);
239
+ }
240
+
241
+ /* Rate limit external link icon */
242
+ .rate-limit-link {
243
+ display: inline-flex;
244
+ align-items: center;
245
+ color: inherit;
246
+ opacity: 0.6;
247
+ margin-left: 2px;
248
+ transition: opacity 0.15s;
249
+ }
250
+
251
+ .rate-limit-link:hover {
252
+ opacity: 1;
253
+ }
254
+
255
+ .rate-limit-link .lucide {
256
+ width: 10px;
257
+ height: 10px;
258
+ }
259
+
260
+ /* Rate limit popover */
261
+ .rate-limit-popover {
262
+ position: absolute;
263
+ top: calc(100% + 8px);
264
+ left: 50%;
265
+ transform: translateX(-50%);
266
+ padding: 8px 14px;
267
+ border-radius: 10px;
268
+ font-size: 12px;
269
+ font-weight: 500;
270
+ white-space: nowrap;
271
+ background: color-mix(in srgb, var(--warning) 15%, var(--bg));
272
+ color: var(--warning);
273
+ border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
274
+ box-shadow: 0 4px 12px rgba(0,0,0,0.12);
275
+ animation: popover-in 0.2s ease-out;
276
+ z-index: 100;
277
+ pointer-events: none;
278
+ }
279
+
280
+ .rate-limit-popover.rejected {
281
+ background: color-mix(in srgb, var(--error) 15%, var(--bg));
282
+ color: var(--error);
283
+ border-color: color-mix(in srgb, var(--error) 25%, transparent);
284
+ }
285
+
286
+ .rate-limit-popover.fade-out {
287
+ opacity: 0;
288
+ transition: opacity 0.3s;
289
+ }
290
+
291
+ @keyframes popover-in {
292
+ from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
293
+ to { opacity: 1; transform: translateX(-50%) translateY(0); }
294
+ }
295
+
296
+ /* Fast mode states */
297
+ .header-fast-mode.cooldown {
298
+ background: color-mix(in srgb, var(--warning) 12%, transparent);
299
+ color: var(--warning);
300
+ }
301
+
302
+ .header-fast-mode.active {
303
+ background: color-mix(in srgb, var(--accent) 12%, transparent);
304
+ color: var(--accent);
305
+ }
306
+
307
+ /* Hide pills on very narrow screens */
308
+ @media (max-width: 400px) {
309
+ .header-pill-text { display: none; }
310
+ .header-rate-limit,
311
+ .header-fast-mode { padding: 3px; }
312
+ .rate-limit-popover { font-size: 11px; padding: 6px 10px; }
313
+ .header-context { width: 50px; }
314
+ }