Repository navigation
Expand file tree
/
Copy pathcode.css
More file actions
250 lines (235 loc) · 23.8 KB
/
Copy pathcode.css
File metadata and controls
250 lines (235 loc) · 23.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
/* openconstructor code (code.js): a VS Code-like workspace —
title bar / activity bar · explorer · code | preview · problems & console panel · AI chat / status bar */
.cw { --cw-bg: #0b0b0b; --cw-line: var(--border, #262626); --cw-mono: var(--mono, ui-monospace, monospace);
position: fixed; inset: 0; z-index: 110; display: grid; grid-template-rows: 38px minmax(0, 1fr) 24px; background: var(--bg, #0a0a0a); color: var(--text, #f2f2f2); animation: cw-in .2s cubic-bezier(.2,.8,.2,1); }
@keyframes cw-in { from { opacity: 0; } }
.cw.hidden { display: none; }
.cw button { cursor: pointer; }
.cw button:disabled { cursor: default; }
/* dialogs, menus and toasts opened from here must sit above the workspace; toasts keep clear of the chat */
body.cw-open .modal { z-index: 120; }
body.cw-open .ctx, body.cw-open .toasts { z-index: 125; }
/* toasts sit over the editors, left of the chat */
body.cw-open .toasts { left: calc((100vw - var(--cw-chat-w, 0px)) / 2); bottom: 36px; }
/* ── Title bar ── */
.cw-bar { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--cw-line); background: var(--panel, #111); }
.cw-brand { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 0; border-radius: 4px; background: none; color: inherit; font: 700 13px var(--cw-mono); letter-spacing: -.02em; }
.cw-brand:hover { background: var(--hover, #ffffff0d); }
.cw-brand i { font-style: normal; font-weight: 400; color: var(--muted, #8e8e8e); }
.cw-brand b { margin-left: 2px; padding: 0 6px; border: 1px solid var(--accent, #f2f2f2); border-radius: 3px; background: var(--accent-dim, #ffffff22); color: var(--accent, #f2f2f2); font-size: 11.5px; font-weight: 600; }
/* the app's name in the middle, like the file name in an editor's title */
.cw-title { position: absolute; left: 50%; display: flex; align-items: center; gap: 10px; max-width: 34%; height: 24px; padding: 0 14px; transform: translateX(-50%); border: 1px solid var(--cw-line); border-radius: 5px; background: var(--bg, #0a0a0a); }
.cw-name { overflow: hidden; color: var(--text-2, #c4c4c4); font: 12px var(--cw-mono); text-overflow: ellipsis; white-space: nowrap; }
.cw-name::before { content: "~/"; color: var(--subtle, #5e5e5e); }
.cw-diff { display: flex; gap: 6px; font: 600 11.5px var(--cw-mono); }
.cw-diff:empty { display: none; }
.cw-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cw-actions .btn { height: 26px; }
.cw-layout { display: flex; gap: 1px; margin-right: 6px; padding: 2px; border: 1px solid var(--cw-line); border-radius: 5px; }
.cw-layout button, .cw-tool { display: grid; place-items: center; width: 26px; height: 22px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--muted, #8e8e8e); font: 15px/1 var(--cw-mono); transition: color .12s, background .12s; }
.cw-layout button:hover, .cw-tool:hover { background: var(--hover, #ffffff0d); color: var(--text, #f2f2f2); }
.cw-layout button[aria-pressed="true"] { background: var(--accent-dim, #ffffff22); color: var(--accent, #f2f2f2); }
/* ── Body: activity bar · explorer · editors+panel · chat ── */
.cw-body { display: flex; min-height: 0; }
.cw-act { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 46px; padding: 6px 0; border-right: 1px solid var(--cw-line); background: var(--panel, #111); }
.cw-act > span { flex: 1; }
.cw-act button { position: relative; display: grid; place-items: center; width: 46px; height: 44px; border: 0; background: none; color: var(--subtle, #5e5e5e); transition: color .12s; }
.cw-act button:hover { color: var(--text-2, #c4c4c4); }
.cw-act button[aria-pressed="true"] { color: var(--text, #f2f2f2); }
.cw-act button[aria-pressed="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--accent, #f2f2f2); }
.cw-act em { position: absolute; right: 7px; bottom: 7px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: #f85149; color: #fff; font: 700 9.5px/15px var(--cw-mono); font-style: normal; text-align: center; }
.cw-act em:empty { display: none; }
.cw-side { display: flex; flex-direction: column; flex-shrink: 0; min-width: 0; overflow: auto; background: var(--panel, #111); }
.cw-side-h { padding: 11px 14px 8px; color: var(--muted, #8e8e8e); font: 600 10.5px var(--cw-mono); letter-spacing: .08em; text-transform: uppercase; }
.cw-sec + .cw-sec { margin-top: 8px; }
.cw-sec-h { display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; color: var(--text-2, #c4c4c4); font: 700 10.5px var(--cw-mono); letter-spacing: .05em; text-transform: uppercase; }
.cw-sec-h span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-sec-h button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--muted, #8e8e8e); font: 15px/1 var(--cw-mono); }
.cw-sec-h button:hover { background: var(--hover, #ffffff0d); color: var(--text, #f2f2f2); }
.cw-tree button { display: flex; align-items: center; gap: 8px; width: 100%; height: 26px; padding: 0 10px 0 24px; border: 0; background: none; color: var(--text-2, #c4c4c4); font: 12.5px var(--cw-mono); text-align: left; }
.cw-tree button:hover { background: var(--hover, #ffffff0a); color: var(--text, #f2f2f2); }
.cw-tree button[aria-current="true"] { background: #ffffff1a; color: var(--text, #f2f2f2); box-shadow: inset 1px 0 0 var(--accent, #f2f2f2); }
.cw-tree button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-tree button svg { flex-shrink: 0; color: var(--muted, #8e8e8e); }
.cw-tree button[aria-current="true"] svg { color: var(--accent, #f2f2f2); }
.cw-tree i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; }
.cw-tree em { color: var(--subtle, #5e5e5e); font-size: 11px; font-style: normal; }
.cw-tree p { margin: 2px 0 6px; padding: 0 14px 0 24px; color: var(--subtle, #5e5e5e); font-size: 12px; line-height: 1.6; }
/* lines between panes: thin, turn orange on hover / while dragging */
.cw-sash { position: relative; z-index: 3; flex-shrink: 0; width: 1px; background: var(--cw-line); cursor: col-resize; touch-action: none; }
.cw-sash::after { content: ""; position: absolute; inset: 0 -3px; transition: background .15s; }
.cw-sash.h { width: auto; height: 1px; cursor: row-resize; }
.cw-sash.h::after { inset: -3px 0; }
.cw-sash:hover::after, .cw-sash:active::after { background: linear-gradient(90deg, transparent 2px, var(--accent, #f2f2f2) 2px 5px, transparent 5px); }
.cw-sash.h:hover::after, .cw-sash.h:active::after { background: linear-gradient(transparent 2px, var(--accent, #f2f2f2) 2px 5px, transparent 5px); }
.cw-resizing.cols, .cw-resizing.cols * { cursor: col-resize !important; user-select: none; }
.cw-resizing.rows, .cw-resizing.rows * { cursor: row-resize !important; user-select: none; }
.cw-resizing iframe { pointer-events: none; }
.cw-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.cw-editors { display: flex; flex: 1; min-height: 0; }
.cw-code, .cw-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cw[data-layout="code"] .cw-view, .cw[data-layout="code"] .cw-sash.v,
.cw[data-layout="preview"] .cw-code, .cw[data-layout="preview"] .cw-sash.v { display: none; }
.cw[data-layout="code"] .cw-code, .cw[data-layout="preview"] .cw-view { flex: 1 1 0 !important; }
.cw.no-side .cw-side, .cw.no-side [data-sash="side"],
.cw.no-chat .cw-chat, .cw.no-chat [data-sash="chat"],
.cw.no-panel .cw-panel, .cw.no-panel [data-sash="panel"] { display: none; }
/* ── Code editor: tabs, breadcrumbs, numbered lines ── */
.cw .add, .cw-change .add { color: #3fb950; } .cw .del, .cw-change .del { color: #f85149; }
.cw-tabsrow { display: flex; flex-shrink: 0; height: 34px; border-bottom: 1px solid var(--cw-line); background: var(--panel, #111); }
.cw-files { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cw-files button { position: relative; display: flex; align-items: center; gap: 7px; padding: 0 14px; border: 0; border-right: 1px solid var(--cw-line); background: none; color: var(--muted, #8e8e8e); font: 12px var(--cw-mono); white-space: nowrap; }
.cw-files button:hover { color: var(--text, #f2f2f2); }
.cw-files button[aria-selected="true"] { background: var(--cw-bg); color: var(--text, #f2f2f2); box-shadow: inset 0 1px 0 var(--accent, #f2f2f2); }
.cw-files button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--cw-bg); }
.cw-files i, .cw-change i, .cw-crumbs i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; }
.cw-files em { color: var(--subtle, #5e5e5e); font-style: normal; font-size: 11px; }
.cw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2, #c4c4c4); }
.cw-tabsrow > .btn { align-self: center; height: 24px; margin: 0 8px; padding: 0 10px; font-size: 11.5px; }
.cw-tabsrow > .btn[hidden] { display: none; }
.cw-crumbs { display: flex; align-items: center; gap: 6px; flex-shrink: 0; height: 24px; padding: 0 16px; background: var(--cw-bg); color: var(--muted, #8e8e8e); font: 11.5px var(--cw-mono); }
.cw-crumbs:empty { display: none; }
.cw-crumbs span { display: flex; align-items: center; gap: 6px; }
.cw-crumbs svg { color: var(--subtle, #5e5e5e); }
.cw-editor { position: relative; display: flex; flex: 1; min-height: 0; background: var(--cw-bg); }
.cw-gutter { flex-shrink: 0; min-width: 34px; margin: 0; padding: 8px 12px 14px 14px; overflow: hidden; color: #4a4a4a; font: 12.5px/1.65 var(--cw-mono); text-align: right; user-select: none; }
.cw-src { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.cw-hl, .cw-editor .cw-src textarea { margin: 0; padding: 8px 16px 14px 8px; font: 12.5px/1.65 var(--cw-mono); tab-size: 2; white-space: pre; letter-spacing: 0; }
.cw-hl { position: absolute; top: 0; left: 0; min-width: 100%; color: #d6d6d6; pointer-events: none; will-change: transform; }
.cw-editor .cw-src textarea { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; outline: 0; resize: none; overflow: auto; background: transparent; color: transparent; caret-color: var(--accent, #f2f2f2); -webkit-text-fill-color: transparent; }
.cw-editor .cw-src textarea::selection { background: #ffffff40; -webkit-text-fill-color: transparent; }
.hl-k { color: #ff7b72; } .hl-s { color: #a5d6ff; } .hl-c { color: #6e7681; font-style: italic; }
.hl-n { color: #79c0ff; } .hl-b { color: #ffa657; } .hl-f { color: #d2a8ff; } .hl-p { color: #7ee787; } .hl-a { color: #ff7b72; }
.cw-code-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; background: var(--cw-bg); text-align: center; }
.cw-code-empty.hidden { display: none; }
.cw-code-empty span { color: var(--accent, #f2f2f2); font: 700 22px var(--cw-mono); letter-spacing: -.08em; }
.cw-code-empty p { max-width: 280px; margin: 0; color: var(--muted, #8e8e8e); font-size: 12.5px; line-height: 1.7; }
/* ── Preview: toolbar, the app in a small browser window ── */
.cw-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; height: 34px; padding: 0 8px 0 12px; overflow: hidden; border-bottom: 1px solid var(--cw-line); background: var(--panel, #111); }
.cw-ptitle { display: flex; align-items: center; gap: 6px; margin-right: auto; color: var(--text-2, #c4c4c4); font: 600 11.5px var(--cw-mono); white-space: nowrap; }
.cw-ptitle svg { color: var(--accent, #f2f2f2); }
.cw-devices { display: flex; gap: 1px; padding: 2px; border: 1px solid var(--cw-line); border-radius: 5px; }
.cw-devices button { display: grid; place-items: center; width: 26px; height: 20px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--muted, #8e8e8e); transition: color .12s, background .12s; }
.cw-devices button:hover { color: var(--text, #f2f2f2); }
.cw-devices button[aria-pressed="true"] { background: var(--accent-dim, #ffffff22); color: var(--accent, #f2f2f2); }
.cw-width { display: flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px; border: 1px solid var(--cw-line); border-radius: 5px; color: var(--subtle, #5e5e5e); font: 11px var(--cw-mono); }
.cw-width:focus-within { border-color: var(--accent, #f2f2f2); }
.cw-width input { width: 4.2ch; padding: 0; border: 0; outline: 0; background: none; color: var(--text, #f2f2f2); font: 600 11.5px var(--cw-mono); text-align: right; }
.cw-zoom { color: var(--muted, #8e8e8e); font: 11px var(--cw-mono); }
.cw-zoom:empty { display: none; }
.cw-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(ellipse 60% 50% at 50% 0%, #ffffff0d, transparent 70%), radial-gradient(#1c1c1c 1px, transparent 1px) 0 0 / 18px 18px, var(--cw-bg); }
.cw-frame { position: absolute; top: 20px; left: 50%; transform-origin: top center; transition: width .2s cubic-bezier(.2,.8,.2,1); }
.cw-stage.is-fill .cw-frame { top: 12px; transition: none; }
.cw-resizing .cw-frame { transition: none; }
.cw-chrome { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid #2b2b2b; border-bottom: 0; border-radius: 8px 8px 0 0; background: linear-gradient(#1a1a1a, #151515); }
.cw-chrome i { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; }
.cw-chrome i:nth-child(1) { background: #f8514999; } .cw-chrome i:nth-child(2) { background: #e3b34199; } .cw-chrome i:nth-child(3) { background: #3fb95099; }
.cw-chrome span { flex: 1; min-width: 0; overflow: hidden; margin: 0 8px; padding: 3px 10px; border-radius: 5px; background: #0d0d0d; color: var(--muted, #8e8e8e); font: 11px var(--cw-mono); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cw-chrome em { color: var(--subtle, #5e5e5e); font: 10.5px var(--cw-mono); font-style: normal; white-space: nowrap; }
.cw-frame iframe { display: block; width: 100%; height: calc(100% - 30px); border: 1px solid #2b2b2b; border-radius: 0 0 8px 8px; background: #0b0b0f; box-shadow: 0 30px 80px -30px #000; }
.cw-grip { position: absolute; top: 50%; z-index: 2; width: 14px; height: 64px; margin-top: -32px; border-radius: 7px; cursor: col-resize; touch-action: none; }
.cw-grip[data-grip="-1"] { left: -18px; } .cw-grip[data-grip="1"] { right: -18px; }
.cw-grip::after { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: #3a3a3a; transition: background .15s; }
.cw-grip:hover::after, .cw-resizing .cw-grip::after { background: var(--accent, #f2f2f2); box-shadow: 0 0 12px #ffffff88; }
.cw-stage.is-fill .cw-grip { display: none; }
.cw-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.cw-empty.hidden, .cw-frame.hidden { display: none; }
.cw-orb { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border: 1px solid var(--border-2, #2b2b2b); border-radius: 6px; background: var(--panel, #111); color: var(--accent, #f2f2f2); font: 700 22px var(--cw-mono); box-shadow: 0 0 0 6px #ffffff0a, 0 20px 50px -20px #ffffff55; }
.cw-orb i { font-style: normal; animation: cw-blink 1.1s steps(1) infinite; }
@keyframes cw-blink { 50% { opacity: 0; } }
.cw-empty h2 { margin: 20px 0 8px; font-size: 22px; letter-spacing: -.03em; }
.cw-empty p { max-width: 420px; margin: 0; color: var(--muted, #8e8e8e); font-size: 13px; line-height: 1.7; }
.cw-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 480px; margin-top: 18px; }
.cw-ideas button { padding: 5px 11px; border: 1px solid var(--border-2, #2b2b2b); border-radius: 4px; background: var(--panel, #111); color: var(--text-2, #c4c4c4); font-size: 12px; transition: border-color .15s, color .15s, transform .15s; }
.cw-ideas button:hover { border-color: var(--accent, #f2f2f2); color: var(--text, #fff); transform: translateY(-1px); }
/* an error of the running app: a bar over the preview, sent to the AI right away when auto-fix is on */
.cw-err { position: absolute; left: 50%; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 12px; width: min(620px, calc(100% - 24px)); padding: 9px 9px 9px 13px; transform: translateX(-50%); border: 1px solid #f8514966; border-radius: 7px; background: #1a0f0fee; box-shadow: 0 18px 50px -20px #000; backdrop-filter: blur(8px); animation: cw-err-in .25s cubic-bezier(.2,.8,.2,1); }
.cw-err.hidden { display: none; }
@keyframes cw-err-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.cw-err > i { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: #f85149; box-shadow: 0 0 10px #f85149; }
.cw-err.is-fixing { border-color: #ffffff66; background: #1a140fee; }
.cw-err.is-fixing > i { background: var(--accent, #f2f2f2); box-shadow: 0 0 10px var(--accent, #f2f2f2); animation: cw-pulse 1s ease-in-out infinite; }
@keyframes cw-pulse { 50% { opacity: .3; } }
.cw-err > div { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.cw-err b { overflow: hidden; color: #ffb4ae; font: 600 12px var(--cw-mono); text-overflow: ellipsis; white-space: nowrap; }
.cw-err code { overflow: hidden; color: var(--muted, #8e8e8e); font: 11px var(--cw-mono); text-overflow: ellipsis; white-space: nowrap; }
.cw-err code:empty { display: none; }
.cw-err span { flex-shrink: 0; color: var(--accent, #f2f2f2); font: 11.5px var(--cw-mono); }
.cw-err .btn { flex-shrink: 0; height: 26px; }
.cw-err .btn[hidden] { display: none; }
/* ── Bottom panel: problems and console ── */
.cw-panel { display: flex; flex-direction: column; flex-shrink: 0; min-height: 0; background: var(--cw-bg); }
.cw-panel-h { display: flex; align-items: center; gap: 2px; flex-shrink: 0; height: 32px; padding: 0 6px 0 10px; }
.cw-panel-h > span { flex: 1; }
.cw-panel-h [data-ptab] { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; background: none; color: var(--muted, #8e8e8e); font: 600 10.5px var(--cw-mono); letter-spacing: .06em; text-transform: uppercase; }
.cw-panel-h [data-ptab]:hover { color: var(--text-2, #c4c4c4); }
.cw-panel-h [data-ptab][aria-selected="true"] { color: var(--text, #f2f2f2); box-shadow: inset 0 -1px 0 var(--accent, #f2f2f2); }
.cw-panel-h em { min-width: 16px; height: 16px; padding: 0 5px; border-radius: 8px; background: #262626; color: var(--text-2, #c4c4c4); font: 600 10px/16px var(--cw-mono); font-style: normal; letter-spacing: 0; text-align: center; }
.cw-panel-h em:empty { display: none; }
#cwProbN { background: #f8514933; color: #ffb4ae; }
.cw-panel-b { flex: 1; min-height: 0; overflow: auto; padding: 2px 0 8px; font: 12px/1.6 var(--cw-mono); }
.cw-panel-b[hidden] { display: none; }
.cw-panel-empty { margin: 6px 0; padding: 0 20px; color: var(--subtle, #5e5e5e); }
.cw-row { display: flex; align-items: center; gap: 8px; padding: 2px 20px; }
.cw-row:hover { background: #ffffff08; }
.cw-row svg { flex-shrink: 0; color: #f85149; }
.cw-row span { flex: 1; min-width: 0; overflow: hidden; color: var(--text, #f2f2f2); text-overflow: ellipsis; white-space: nowrap; }
.cw-row code { color: var(--muted, #8e8e8e); font: inherit; }
.cw-row em, .cw-line em { color: var(--subtle, #5e5e5e); font-size: 11px; font-style: normal; }
.cw-row-src { margin: 0 0 4px; padding: 0 20px 0 42px; overflow: hidden; color: var(--muted, #8e8e8e); font: 11.5px/1.6 var(--cw-mono); text-overflow: ellipsis; white-space: pre; }
.cw-line { display: flex; align-items: baseline; gap: 10px; padding: 1px 20px; border-bottom: 1px solid #141414; }
.cw-line b { width: 10px; flex-shrink: 0; color: var(--subtle, #5e5e5e); text-align: center; }
.cw-line span { flex: 1; min-width: 0; color: var(--text-2, #c4c4c4); white-space: pre-wrap; word-break: break-word; }
.cw-line.warn { background: #e3b3410d; } .cw-line.warn b, .cw-line.warn span { color: #e3b341; }
.cw-line.error { background: #f851490f; } .cw-line.error b, .cw-line.error span { color: #ff8b84; }
.cw-line.div { justify-content: center; border: 0; color: var(--subtle, #5e5e5e); }
.cw-line.div span { flex: 0 1 auto; color: var(--subtle, #5e5e5e); font-size: 11px; }
.cw-line.div::before, .cw-line.div::after { content: ""; flex: 1; align-self: center; height: 1px; background: #1c1c1c; }
.cw-line.div em { display: none; }
/* ── AI chat on the right ── */
.cw-chat { display: flex; flex-shrink: 0; min-width: 300px; max-width: calc(100vw - 520px); }
.cw-chat > .chat-panel { display: flex !important; flex: 1; width: auto !important; min-width: 0; order: 0; border: 0; }
.cw-chat [data-panel-action] { display: none; }
.cw-chat .message.welcome strong { color: var(--accent, #f2f2f2); }
/* the note in the chat after a change */
.cw-change { margin: 0 12px 12px; overflow: hidden; border: 1px solid var(--cw-line, #262626); border-radius: 5px; background: var(--panel-2, #141414); font: 11.5px var(--mono, monospace); }
.cw-change div { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.cw-change div + div { border-top: 1px solid var(--border, #262626); }
.cw-change span { color: var(--text, #f2f2f2); }
.cw-change em { margin-right: auto; color: var(--muted, #8e8e8e); font-style: normal; }
.cw-change b { font-weight: 600; }
/* ── Status bar ── */
.cw-status { display: flex; align-items: center; gap: 2px; min-width: 0; padding-right: 8px; overflow: hidden; border-top: 1px solid var(--cw-line); background: var(--panel, #111); color: var(--muted, #8e8e8e); font: 11.5px var(--cw-mono); white-space: nowrap; }
.cw-st-brand { display: flex; align-items: center; gap: 5px; align-self: stretch; margin-right: 6px; padding: 0 10px; background: var(--accent, #f2f2f2); color: #111; font-weight: 700; }
.cw-status > button { display: flex; align-items: center; gap: 5px; height: 100%; padding: 0 8px; border: 0; background: none; color: inherit; font: inherit; }
.cw-status > button:hover { background: var(--hover, #ffffff0d); color: var(--text, #f2f2f2); }
#cwStProb svg + svg { margin-left: 6px; }
#cwStProb.has-err { color: #ff8b84; }
.cw-auto i { width: 7px; height: 7px; border-radius: 50%; background: #4a4a4a; transition: background .15s, box-shadow .15s; }
.cw-auto[aria-pressed="true"] { color: var(--text-2, #c4c4c4); }
.cw-auto[aria-pressed="true"] i { background: #3fb950; box-shadow: 0 0 8px #3fb95099; }
.cw-st-gap { flex: 1; }
.cw-status > span:not(.cw-st-gap):not(.cw-st-brand):not(.cw-langbar) { padding: 0 8px; }
.cw-status > span:empty { display: none; }
.cw-langbar { display: flex; flex-shrink: 0; gap: 1px; width: 72px; height: 5px; overflow: hidden; border-radius: 3px; }
.cw-stats { overflow: hidden; text-overflow: ellipsis; }
/* the "code" entry in the editor's top menu */
.tb-code { color: var(--accent, #f2f2f2) !important; }
.tb-code span { margin-right: 2px; letter-spacing: -.08em; opacity: .8; }
/* narrower screens: the explorer and the line stats go first */
@media (max-width: 1280px) { .cw-stats, .cw-langbar { display: none !important; } }
@media (max-width: 1180px) { .cw-side, [data-sash="side"] { display: none; } .cw-act [data-pane="side"] { display: none; } .cw-title { display: none; } }
@media (max-width: 980px) { .cw-actions [data-cw="canvas"] { display: none; } }
/* phones: preview (or code) on top, the chat below; no explorer, panel or status bar */
@media (max-width: 760px) {
.cw { grid-template-rows: 44px minmax(0, 1fr); }
.cw-word, .cw-act, .cw-status, .cw-sash, .cw-panel, .cw-width, .cw-zoom, .cw-devices button[data-dev="1280"], .cw-layout [data-tab="split"] { display: none !important; }
.cw-body { flex-direction: column; }
.cw-chat { width: auto !important; max-width: none; height: 46%; border-top: 1px solid var(--cw-line); }
.cw.no-chat .cw-chat { display: flex; }
.cw[data-layout="split"] .cw-code { display: none; }
.cw[data-layout="split"] .cw-view { flex: 1 1 0 !important; }
.cw-grip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cw, .cw-orb i { animation: none; } }
@media (max-width: 760px) { body.cw-open .toasts { left: 50%; bottom: calc(46% + 12px); } }