@codingfactory/mediables-vue 2.12.0 → 2.13.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 (64) hide show
  1. package/dist/{PixiFrameExporter-Cqb0nLT4.cjs → PixiFrameExporter-BnAievFi.cjs} +2 -2
  2. package/dist/{PixiFrameExporter-Cqb0nLT4.cjs.map → PixiFrameExporter-BnAievFi.cjs.map} +1 -1
  3. package/dist/{PixiFrameExporter-BUVwcHDX.js → PixiFrameExporter-DwbBy1Iu.js} +2 -2
  4. package/dist/{PixiFrameExporter-BUVwcHDX.js.map → PixiFrameExporter-DwbBy1Iu.js.map} +1 -1
  5. package/dist/components/ImageEditorModal.vue.d.ts +9 -2
  6. package/dist/composables/useImageEditorModal.d.ts +1232 -86
  7. package/dist/composables/useRadialMenu.d.ts +1 -1
  8. package/dist/editor-BoDU3YXD.js +10862 -0
  9. package/dist/editor-BoDU3YXD.js.map +1 -0
  10. package/dist/editor-D-cJRASf.cjs +2 -0
  11. package/dist/editor-D-cJRASf.cjs.map +1 -0
  12. package/dist/{index-BXf0oOKg.js → index-BGC4rPDc.js} +16147 -14384
  13. package/dist/index-BGC4rPDc.js.map +1 -0
  14. package/dist/index-CljyFIEv.cjs +357 -0
  15. package/dist/index-CljyFIEv.cjs.map +1 -0
  16. package/dist/mediables-vanilla.cjs +1 -1
  17. package/dist/mediables-vanilla.mjs +1 -1
  18. package/dist/mediables-vue.cjs +1 -1
  19. package/dist/mediables-vue.mjs +2 -2
  20. package/dist/style.css +1 -1
  21. package/dist/types/editor.d.ts +204 -27
  22. package/dist/vanilla-editor/VanillaImageEditor.d.ts +18 -0
  23. package/dist/vanilla-editor/VanillaImageEditorV2.d.ts +16 -0
  24. package/dist/vanilla-editor/core/EventEmitter.d.ts +12 -0
  25. package/dist/vanilla-editor/core/State.d.ts +98 -0
  26. package/dist/vanilla-editor/filters/categories.d.ts +69 -0
  27. package/dist/vanilla-editor/icons/icons.d.ts +42 -0
  28. package/dist/vanilla-editor/index.d.ts +342 -0
  29. package/dist/vanilla-editor/presets/index.d.ts +114 -0
  30. package/dist/vanilla-editor/renderer/CropManager.d.ts +140 -0
  31. package/dist/vanilla-editor/renderer/FilterManager.d.ts +132 -0
  32. package/dist/vanilla-editor/renderer/PixiRenderer.d.ts +274 -0
  33. package/dist/vanilla-editor/renderer/RemoveBgManager.d.ts +108 -0
  34. package/dist/vanilla-editor/styles/editor-v2.css +1366 -0
  35. package/dist/vanilla-editor/styles/editor.css +1403 -0
  36. package/dist/vanilla-editor/ui/ActiveFiltersPanel.d.ts +93 -0
  37. package/dist/vanilla-editor/ui/CategoryCarousel.d.ts +66 -0
  38. package/dist/vanilla-editor/ui/CropControls.d.ts +65 -0
  39. package/dist/vanilla-editor/ui/FilterAdjustments.d.ts +93 -0
  40. package/dist/vanilla-editor/ui/FilterCarousel.d.ts +74 -0
  41. package/dist/vanilla-editor/ui/MobileActiveFilters.d.ts +21 -0
  42. package/dist/vanilla-editor/ui/MobileFilterDrawer.d.ts +79 -0
  43. package/dist/vanilla-editor/ui/Toolbar.d.ts +35 -0
  44. package/dist/vanilla-editor/ui/UIBuilder.d.ts +87 -0
  45. package/dist/vanilla-editor/ui-v2/ActiveFiltersStack.d.ts +16 -0
  46. package/dist/vanilla-editor/ui-v2/BackgroundPanel.d.ts +16 -0
  47. package/dist/vanilla-editor/ui-v2/BottomDrawer.d.ts +55 -0
  48. package/dist/vanilla-editor/ui-v2/CategoryTabs.d.ts +21 -0
  49. package/dist/vanilla-editor/ui-v2/FilterControlsView.d.ts +16 -0
  50. package/dist/vanilla-editor/ui-v2/FilterListView.d.ts +32 -0
  51. package/dist/vanilla-editor/ui-v2/LayerStackPanel.d.ts +30 -0
  52. package/dist/vanilla-editor/ui-v2/MobileActiveChips.d.ts +23 -0
  53. package/dist/vanilla-editor/ui-v2/MobileNavigation.d.ts +51 -0
  54. package/dist/vanilla-editor/ui-v2/SplitPanelLayout.d.ts +70 -0
  55. package/dist/vanilla-editor/ui-v2/TextPanel.d.ts +58 -0
  56. package/dist/vanilla-exports.d.ts +9 -0
  57. package/package.json +3 -2
  58. package/dist/editor-Bj9-m03S.js +0 -9132
  59. package/dist/editor-Bj9-m03S.js.map +0 -1
  60. package/dist/editor-DaM6IN3r.cjs +0 -2
  61. package/dist/editor-DaM6IN3r.cjs.map +0 -1
  62. package/dist/index-BXf0oOKg.js.map +0 -1
  63. package/dist/index-DyZIdWLm.cjs +0 -357
  64. package/dist/index-DyZIdWLm.cjs.map +0 -1
@@ -0,0 +1,1366 @@
1
+ /**
2
+ * Vanilla Image Editor v2 — Split Panel Layout
3
+ *
4
+ * All selectors are scoped under .vanilla-image-editor-v2 to avoid colliding
5
+ * with v1 styles or with Ionic shadow-DOM-adjacent CSS. No Tailwind — it
6
+ * breaks Ionic Shadow DOM (proven by 32 archived UI variants).
7
+ */
8
+
9
+ /* ==================== CSS Variables ==================== */
10
+ .vanilla-image-editor-v2 {
11
+ /* Light theme (default) */
12
+ --editor-bg: #ffffff;
13
+ --editor-surface: #f5f5f5;
14
+ --editor-surface-2: #eeeeee;
15
+ --editor-text: #1a1a1a;
16
+ --editor-text-muted: #666666;
17
+ --editor-border: #dddddd;
18
+ --editor-border-light: #eeeeee;
19
+ --editor-primary: #3880ff;
20
+ --editor-primary-hover: #3171e0;
21
+ --editor-primary-light: #e6f0ff;
22
+ --editor-danger: #eb445a;
23
+ --editor-danger-hover: #cf3c4f;
24
+ --editor-success: #2dd36f;
25
+ --editor-shadow: rgba(0, 0, 0, 0.1);
26
+ --editor-overlay: rgba(0, 0, 0, 0.5);
27
+
28
+ /* Checkerboard for transparency preview */
29
+ --editor-checker-a: #ffffff;
30
+ --editor-checker-b: #e5e5e5;
31
+
32
+ /* Sizing */
33
+ --editor-radius: 8px;
34
+ --editor-radius-sm: 4px;
35
+ --editor-spacing: 16px;
36
+ --editor-spacing-sm: 8px;
37
+ --editor-spacing-xs: 4px;
38
+
39
+ /* Sliders */
40
+ --slider-track-height: 6px;
41
+ --slider-thumb-size: 20px;
42
+ --slider-track-bg: #cccccc;
43
+ --slider-track-fill: var(--editor-primary);
44
+ }
45
+
46
+ .vanilla-image-editor-v2.dark {
47
+ --editor-bg: #0a0a0a;
48
+ --editor-surface: #1a1a1a;
49
+ --editor-surface-2: #252525;
50
+ --editor-text: #ffffff;
51
+ --editor-text-muted: #999999;
52
+ --editor-border: #333333;
53
+ --editor-border-light: #444444;
54
+ --editor-primary-light: #1a2744;
55
+ --editor-shadow: rgba(0, 0, 0, 0.3);
56
+ --slider-track-bg: #444444;
57
+
58
+ --editor-checker-a: #1f1f1f;
59
+ --editor-checker-b: #161616;
60
+ }
61
+
62
+ /* ==================== Base Layout ==================== */
63
+ .vanilla-image-editor-v2 {
64
+ width: 100%;
65
+ height: 100%;
66
+ display: flex;
67
+ flex-direction: column;
68
+ background: var(--editor-bg);
69
+ color: var(--editor-text);
70
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
71
+ font-size: 14px;
72
+ overflow: hidden;
73
+ }
74
+
75
+ .vanilla-image-editor-v2 .editor-v2-toolbar {
76
+ flex: 0 0 auto;
77
+ border-bottom: 1px solid var(--editor-border);
78
+ }
79
+
80
+ .vanilla-image-editor-v2 .editor-v2-body {
81
+ flex: 1 1 auto;
82
+ display: flex;
83
+ flex-direction: row; /* canvas | panel on desktop */
84
+ min-height: 0;
85
+ min-width: 0;
86
+ overflow: hidden;
87
+ }
88
+
89
+ /* ==================== Canvas ==================== */
90
+ .vanilla-image-editor-v2 .editor-v2-canvas {
91
+ flex: 1 1 auto;
92
+ min-width: 0;
93
+ min-height: 0;
94
+ position: relative;
95
+ background-color: var(--editor-surface);
96
+ /* Checkerboard pattern — makes alpha/opacity changes visible against the
97
+ editor background rather than fading into a solid color. */
98
+ background-image:
99
+ linear-gradient(45deg, var(--editor-checker-b) 25%, transparent 25%),
100
+ linear-gradient(-45deg, var(--editor-checker-b) 25%, transparent 25%),
101
+ linear-gradient(45deg, transparent 75%, var(--editor-checker-b) 75%),
102
+ linear-gradient(-45deg, transparent 75%, var(--editor-checker-b) 75%);
103
+ background-size: 20px 20px;
104
+ background-position: 0 0, 0 10px, 10px -10px, -10px 0;
105
+ overflow: hidden;
106
+ }
107
+
108
+ .vanilla-image-editor-v2 .canvas-container {
109
+ width: 100%;
110
+ height: 100%;
111
+ }
112
+
113
+ .vanilla-image-editor-v2 .canvas-container canvas.pixi-canvas {
114
+ display: block;
115
+ width: 100%;
116
+ height: 100%;
117
+ }
118
+
119
+ .vanilla-image-editor-v2 .crop-overlay {
120
+ position: absolute;
121
+ top: 0;
122
+ left: 0;
123
+ width: 100%;
124
+ height: 100%;
125
+ pointer-events: none;
126
+ z-index: 10;
127
+ }
128
+
129
+ /* ==================== Inspector Panel ==================== */
130
+ .vanilla-image-editor-v2 .editor-v2-panel {
131
+ flex: 0 0 clamp(340px, 32vw, 440px);
132
+ display: flex;
133
+ flex-direction: column;
134
+ background: var(--editor-bg);
135
+ border-left: 1px solid var(--editor-border);
136
+ overflow: hidden;
137
+ }
138
+
139
+ /* Category tabs at top */
140
+ .vanilla-image-editor-v2 .panel-tabs {
141
+ flex: 0 0 auto;
142
+ display: flex;
143
+ flex-wrap: wrap;
144
+ gap: var(--editor-spacing-xs);
145
+ padding: var(--editor-spacing-sm);
146
+ border-bottom: 1px solid var(--editor-border-light);
147
+ background: var(--editor-surface);
148
+ }
149
+
150
+ .vanilla-image-editor-v2 .panel-tab {
151
+ flex: 1 1 auto;
152
+ min-width: 0;
153
+ display: flex;
154
+ flex-direction: column;
155
+ align-items: center;
156
+ justify-content: center;
157
+ gap: 2px;
158
+ padding: 8px 6px;
159
+ background: transparent;
160
+ border: 1px solid transparent;
161
+ border-radius: var(--editor-radius-sm);
162
+ color: var(--editor-text-muted);
163
+ font-size: 11px;
164
+ font-weight: 500;
165
+ cursor: pointer;
166
+ transition: background 0.15s, color 0.15s, border-color 0.15s;
167
+ }
168
+
169
+ .vanilla-image-editor-v2 .panel-tab:hover {
170
+ background: var(--editor-surface-2);
171
+ color: var(--editor-text);
172
+ }
173
+
174
+ .vanilla-image-editor-v2 .panel-tab.active {
175
+ background: var(--editor-primary-light);
176
+ color: var(--editor-primary);
177
+ border-color: var(--editor-primary);
178
+ }
179
+
180
+ .vanilla-image-editor-v2 .panel-tab-icon {
181
+ display: flex;
182
+ width: 20px;
183
+ height: 20px;
184
+ align-items: center;
185
+ justify-content: center;
186
+ }
187
+
188
+ .vanilla-image-editor-v2 .panel-tab-icon svg {
189
+ width: 20px;
190
+ height: 20px;
191
+ }
192
+
193
+ /* Panel body (scrollable content area) */
194
+ .vanilla-image-editor-v2 .panel-body {
195
+ flex: 1 1 auto;
196
+ min-height: 0;
197
+ overflow-y: auto;
198
+ overflow-x: hidden;
199
+ -webkit-overflow-scrolling: touch;
200
+ display: flex;
201
+ flex-direction: column;
202
+ }
203
+
204
+ /* Filter list section */
205
+ .vanilla-image-editor-v2 .panel-section {
206
+ padding: var(--editor-spacing-sm) var(--editor-spacing);
207
+ border-bottom: 1px solid var(--editor-border-light);
208
+ }
209
+
210
+ .vanilla-image-editor-v2 .panel-section-title {
211
+ display: flex;
212
+ align-items: center;
213
+ justify-content: space-between;
214
+ margin: 0 0 var(--editor-spacing-sm) 0;
215
+ font-size: 11px;
216
+ font-weight: 600;
217
+ letter-spacing: 0.05em;
218
+ text-transform: uppercase;
219
+ color: var(--editor-text-muted);
220
+ }
221
+
222
+ .vanilla-image-editor-v2 .filter-list {
223
+ display: flex;
224
+ flex-direction: column;
225
+ gap: 2px;
226
+ }
227
+
228
+ .vanilla-image-editor-v2 .filter-row {
229
+ display: flex;
230
+ align-items: center;
231
+ gap: var(--editor-spacing-sm);
232
+ width: 100%;
233
+ padding: 8px 10px;
234
+ background: transparent;
235
+ border: 1px solid transparent;
236
+ border-radius: var(--editor-radius-sm);
237
+ color: var(--editor-text);
238
+ text-align: left;
239
+ cursor: pointer;
240
+ transition: background 0.15s, border-color 0.15s;
241
+ }
242
+
243
+ .vanilla-image-editor-v2 .filter-row:hover {
244
+ background: var(--editor-surface);
245
+ }
246
+
247
+ .vanilla-image-editor-v2 .filter-row.selected {
248
+ background: var(--editor-primary-light);
249
+ border-color: var(--editor-primary);
250
+ }
251
+
252
+ .vanilla-image-editor-v2 .filter-row-toggle {
253
+ flex: 0 0 auto;
254
+ width: 18px;
255
+ height: 18px;
256
+ border-radius: 50%;
257
+ border: 2px solid var(--editor-border);
258
+ background: var(--editor-bg);
259
+ display: flex;
260
+ align-items: center;
261
+ justify-content: center;
262
+ cursor: pointer;
263
+ transition: background 0.15s, border-color 0.15s;
264
+ padding: 0;
265
+ }
266
+
267
+ .vanilla-image-editor-v2 .filter-row-toggle.active {
268
+ background: var(--editor-success);
269
+ border-color: var(--editor-success);
270
+ color: #ffffff;
271
+ }
272
+
273
+ .vanilla-image-editor-v2 .filter-row-toggle svg {
274
+ width: 10px;
275
+ height: 10px;
276
+ }
277
+
278
+ .vanilla-image-editor-v2 .filter-row-body {
279
+ flex: 1 1 auto;
280
+ min-width: 0;
281
+ display: flex;
282
+ flex-direction: column;
283
+ gap: 2px;
284
+ }
285
+
286
+ .vanilla-image-editor-v2 .filter-row-name {
287
+ font-size: 13px;
288
+ font-weight: 500;
289
+ color: var(--editor-text);
290
+ white-space: nowrap;
291
+ overflow: hidden;
292
+ text-overflow: ellipsis;
293
+ }
294
+
295
+ .vanilla-image-editor-v2 .filter-row-summary {
296
+ font-size: 11px;
297
+ color: var(--editor-text-muted);
298
+ white-space: nowrap;
299
+ overflow: hidden;
300
+ text-overflow: ellipsis;
301
+ }
302
+
303
+ .vanilla-image-editor-v2 .filter-row-chevron {
304
+ flex: 0 0 auto;
305
+ width: 14px;
306
+ height: 14px;
307
+ color: var(--editor-text-muted);
308
+ display: flex;
309
+ align-items: center;
310
+ justify-content: center;
311
+ }
312
+
313
+ /* Selected filter controls */
314
+ .vanilla-image-editor-v2 .controls-section {
315
+ padding: var(--editor-spacing) var(--editor-spacing);
316
+ background: var(--editor-surface);
317
+ border-top: 1px solid var(--editor-border-light);
318
+ border-bottom: 1px solid var(--editor-border-light);
319
+ }
320
+
321
+ .vanilla-image-editor-v2 .controls-header {
322
+ display: flex;
323
+ align-items: center;
324
+ justify-content: space-between;
325
+ margin-bottom: var(--editor-spacing-sm);
326
+ }
327
+
328
+ .vanilla-image-editor-v2 .controls-title {
329
+ font-size: 14px;
330
+ font-weight: 600;
331
+ color: var(--editor-text);
332
+ }
333
+
334
+ .vanilla-image-editor-v2 .controls-grid {
335
+ display: flex;
336
+ flex-direction: column;
337
+ gap: var(--editor-spacing);
338
+ }
339
+
340
+ .vanilla-image-editor-v2 .no-filter-selected {
341
+ padding: var(--editor-spacing);
342
+ color: var(--editor-text-muted);
343
+ font-size: 13px;
344
+ font-style: italic;
345
+ text-align: center;
346
+ }
347
+
348
+ /* Active filters stack */
349
+ .vanilla-image-editor-v2 .active-stack {
350
+ display: flex;
351
+ flex-direction: column;
352
+ gap: 4px;
353
+ }
354
+
355
+ .vanilla-image-editor-v2 .active-chip {
356
+ display: flex;
357
+ align-items: center;
358
+ gap: var(--editor-spacing-sm);
359
+ padding: 6px 10px;
360
+ background: var(--editor-surface);
361
+ border: 1px solid var(--editor-border-light);
362
+ border-radius: var(--editor-radius-sm);
363
+ font-size: 13px;
364
+ color: var(--editor-text);
365
+ }
366
+
367
+ .vanilla-image-editor-v2 .active-chip:hover {
368
+ border-color: var(--editor-border);
369
+ }
370
+
371
+ .vanilla-image-editor-v2 .active-chip.selected {
372
+ border-color: var(--editor-primary);
373
+ background: var(--editor-primary-light);
374
+ }
375
+
376
+ .vanilla-image-editor-v2 .active-chip-name {
377
+ flex: 1 1 auto;
378
+ min-width: 0;
379
+ cursor: pointer;
380
+ background: none;
381
+ border: 0;
382
+ padding: 0;
383
+ color: inherit;
384
+ font: inherit;
385
+ text-align: left;
386
+ white-space: nowrap;
387
+ overflow: hidden;
388
+ text-overflow: ellipsis;
389
+ }
390
+
391
+ .vanilla-image-editor-v2 .active-chip-remove {
392
+ flex: 0 0 auto;
393
+ width: 20px;
394
+ height: 20px;
395
+ padding: 0;
396
+ background: transparent;
397
+ border: 0;
398
+ cursor: pointer;
399
+ color: var(--editor-text-muted);
400
+ display: flex;
401
+ align-items: center;
402
+ justify-content: center;
403
+ border-radius: var(--editor-radius-sm);
404
+ transition: background 0.15s, color 0.15s;
405
+ }
406
+
407
+ .vanilla-image-editor-v2 .active-chip-remove:hover {
408
+ background: var(--editor-danger);
409
+ color: #ffffff;
410
+ }
411
+
412
+ .vanilla-image-editor-v2 .active-chip-remove svg {
413
+ width: 12px;
414
+ height: 12px;
415
+ }
416
+
417
+ .vanilla-image-editor-v2 .active-empty {
418
+ font-size: 12px;
419
+ color: var(--editor-text-muted);
420
+ font-style: italic;
421
+ }
422
+
423
+ /* ==================== Reusable Controls (inherit from v1 styles via class) ==================== */
424
+ /* The controls (slider, toggle, color, select, text) reuse the v1 UIBuilder
425
+ factories. Their CSS classes are unprefixed (e.g. .slider-control) so we
426
+ scope them here only to adjust spacing inside the v2 panel context. */
427
+
428
+ .vanilla-image-editor-v2 .slider-control,
429
+ .vanilla-image-editor-v2 .toggle-control,
430
+ .vanilla-image-editor-v2 .color-control,
431
+ .vanilla-image-editor-v2 .select-control,
432
+ .vanilla-image-editor-v2 .text-control,
433
+ .vanilla-image-editor-v2 .button-control {
434
+ display: flex;
435
+ flex-direction: column;
436
+ gap: 4px;
437
+ }
438
+
439
+ .vanilla-image-editor-v2 .slider-header {
440
+ display: flex;
441
+ align-items: center;
442
+ justify-content: space-between;
443
+ font-size: 12px;
444
+ }
445
+
446
+ .vanilla-image-editor-v2 .slider-label,
447
+ .vanilla-image-editor-v2 .toggle-label,
448
+ .vanilla-image-editor-v2 .color-label,
449
+ .vanilla-image-editor-v2 .select-label,
450
+ .vanilla-image-editor-v2 .text-label {
451
+ font-size: 12px;
452
+ font-weight: 500;
453
+ color: var(--editor-text);
454
+ }
455
+
456
+ .vanilla-image-editor-v2 .slider-value {
457
+ font-size: 12px;
458
+ color: var(--editor-text-muted);
459
+ font-variant-numeric: tabular-nums;
460
+ }
461
+
462
+ .vanilla-image-editor-v2 .slider-input {
463
+ width: 100%;
464
+ height: var(--slider-thumb-size);
465
+ background: transparent;
466
+ appearance: none;
467
+ -webkit-appearance: none;
468
+ }
469
+
470
+ .vanilla-image-editor-v2 .slider-input::-webkit-slider-runnable-track {
471
+ height: var(--slider-track-height);
472
+ background: var(--slider-track-bg);
473
+ border-radius: 3px;
474
+ }
475
+
476
+ .vanilla-image-editor-v2 .slider-input::-webkit-slider-thumb {
477
+ appearance: none;
478
+ -webkit-appearance: none;
479
+ width: var(--slider-thumb-size);
480
+ height: var(--slider-thumb-size);
481
+ background: var(--editor-primary);
482
+ border-radius: 50%;
483
+ border: 2px solid var(--editor-bg);
484
+ box-shadow: 0 1px 3px var(--editor-shadow);
485
+ margin-top: calc((var(--slider-track-height) - var(--slider-thumb-size)) / 2);
486
+ cursor: pointer;
487
+ }
488
+
489
+ .vanilla-image-editor-v2 .slider-input::-moz-range-track {
490
+ height: var(--slider-track-height);
491
+ background: var(--slider-track-bg);
492
+ border-radius: 3px;
493
+ }
494
+
495
+ .vanilla-image-editor-v2 .slider-input::-moz-range-thumb {
496
+ width: var(--slider-thumb-size);
497
+ height: var(--slider-thumb-size);
498
+ background: var(--editor-primary);
499
+ border-radius: 50%;
500
+ border: 2px solid var(--editor-bg);
501
+ box-shadow: 0 1px 3px var(--editor-shadow);
502
+ cursor: pointer;
503
+ }
504
+
505
+ .vanilla-image-editor-v2 .toggle-switch {
506
+ position: relative;
507
+ width: 36px;
508
+ height: 20px;
509
+ background: var(--editor-border);
510
+ border-radius: 20px;
511
+ cursor: pointer;
512
+ transition: background 0.2s;
513
+ }
514
+
515
+ .vanilla-image-editor-v2 .toggle-input {
516
+ position: absolute;
517
+ opacity: 0;
518
+ pointer-events: none;
519
+ }
520
+
521
+ .vanilla-image-editor-v2 .toggle-slider {
522
+ position: absolute;
523
+ top: 2px;
524
+ left: 2px;
525
+ width: 16px;
526
+ height: 16px;
527
+ background: #ffffff;
528
+ border-radius: 50%;
529
+ transition: transform 0.2s;
530
+ }
531
+
532
+ .vanilla-image-editor-v2 .toggle-input:checked ~ .toggle-slider {
533
+ transform: translateX(16px);
534
+ }
535
+
536
+ .vanilla-image-editor-v2 .toggle-switch:has(.toggle-input:checked) {
537
+ background: var(--editor-primary);
538
+ }
539
+
540
+ .vanilla-image-editor-v2 .color-input {
541
+ width: 100%;
542
+ height: 32px;
543
+ border: 1px solid var(--editor-border);
544
+ border-radius: var(--editor-radius-sm);
545
+ background: var(--editor-bg);
546
+ cursor: pointer;
547
+ padding: 2px;
548
+ }
549
+
550
+ .vanilla-image-editor-v2 .select-input,
551
+ .vanilla-image-editor-v2 .text-input {
552
+ width: 100%;
553
+ padding: 6px 8px;
554
+ background: var(--editor-bg);
555
+ border: 1px solid var(--editor-border);
556
+ border-radius: var(--editor-radius-sm);
557
+ color: var(--editor-text);
558
+ font-size: 13px;
559
+ font-family: inherit;
560
+ }
561
+
562
+ .vanilla-image-editor-v2 .select-input:focus,
563
+ .vanilla-image-editor-v2 .text-input:focus {
564
+ outline: none;
565
+ border-color: var(--editor-primary);
566
+ box-shadow: 0 0 0 2px var(--editor-primary-light);
567
+ }
568
+
569
+ .vanilla-image-editor-v2 .btn {
570
+ display: inline-flex;
571
+ align-items: center;
572
+ justify-content: center;
573
+ gap: 6px;
574
+ padding: 6px 12px;
575
+ background: var(--editor-surface);
576
+ border: 1px solid var(--editor-border);
577
+ border-radius: var(--editor-radius-sm);
578
+ color: var(--editor-text);
579
+ font-size: 13px;
580
+ font-family: inherit;
581
+ cursor: pointer;
582
+ transition: background 0.15s, border-color 0.15s;
583
+ }
584
+
585
+ .vanilla-image-editor-v2 .btn:hover {
586
+ background: var(--editor-surface-2);
587
+ }
588
+
589
+ .vanilla-image-editor-v2 .btn-text {
590
+ background: transparent;
591
+ border-color: transparent;
592
+ color: var(--editor-primary);
593
+ }
594
+
595
+ .vanilla-image-editor-v2 .btn-text:hover {
596
+ background: var(--editor-primary-light);
597
+ }
598
+
599
+ .vanilla-image-editor-v2 .btn-secondary {
600
+ background: var(--editor-surface);
601
+ }
602
+
603
+ .vanilla-image-editor-v2 .btn:disabled,
604
+ .vanilla-image-editor-v2 .background-upload-input:disabled {
605
+ opacity: 0.5;
606
+ cursor: not-allowed;
607
+ }
608
+
609
+ .vanilla-image-editor-v2 .btn-icon {
610
+ display: inline-flex;
611
+ align-items: center;
612
+ justify-content: center;
613
+ }
614
+
615
+ .vanilla-image-editor-v2 .btn-icon svg {
616
+ width: 16px;
617
+ height: 16px;
618
+ }
619
+
620
+ /* ==================== Crop mode ==================== */
621
+ .vanilla-image-editor-v2 .crop-controls-wrapper {
622
+ padding: var(--editor-spacing);
623
+ }
624
+
625
+ .vanilla-image-editor-v2 .rotation-arbitrary {
626
+ background: var(--editor-bg);
627
+ }
628
+
629
+ .vanilla-image-editor-v2 .rotation-action-btn {
630
+ width: 100%;
631
+ }
632
+
633
+ .vanilla-image-editor-v2 .rotation-number-input {
634
+ background: var(--editor-bg);
635
+ }
636
+
637
+ /* ==================== Background replacement ==================== */
638
+ .vanilla-image-editor-v2 .background-panel {
639
+ display: flex;
640
+ flex-direction: column;
641
+ gap: var(--editor-spacing);
642
+ }
643
+
644
+ .vanilla-image-editor-v2 .background-field {
645
+ display: flex;
646
+ flex-direction: column;
647
+ gap: 6px;
648
+ color: var(--editor-text);
649
+ }
650
+
651
+ .vanilla-image-editor-v2 .background-field-label {
652
+ font-size: 12px;
653
+ font-weight: 500;
654
+ color: var(--editor-text);
655
+ }
656
+
657
+ .vanilla-image-editor-v2 .background-gradient-grid,
658
+ .vanilla-image-editor-v2 .background-media-grid {
659
+ display: grid;
660
+ grid-template-columns: repeat(3, minmax(0, 1fr));
661
+ gap: 8px;
662
+ }
663
+
664
+ .vanilla-image-editor-v2 .background-gradient-swatch,
665
+ .vanilla-image-editor-v2 .background-media-choice {
666
+ min-height: 44px;
667
+ border: 1px solid var(--editor-border);
668
+ border-radius: var(--editor-radius-sm);
669
+ color: #ffffff;
670
+ cursor: pointer;
671
+ font: inherit;
672
+ overflow: hidden;
673
+ padding: 0;
674
+ position: relative;
675
+ }
676
+
677
+ .vanilla-image-editor-v2 .background-gradient-swatch:hover,
678
+ .vanilla-image-editor-v2 .background-media-choice:hover {
679
+ border-color: var(--editor-primary);
680
+ }
681
+
682
+ .vanilla-image-editor-v2 .background-gradient-label,
683
+ .vanilla-image-editor-v2 .background-media-choice {
684
+ display: inline-flex;
685
+ align-items: center;
686
+ justify-content: center;
687
+ width: 100%;
688
+ height: 100%;
689
+ min-height: 44px;
690
+ padding: 6px;
691
+ background: rgba(0, 0, 0, 0.28);
692
+ font-size: 12px;
693
+ font-weight: 600;
694
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
695
+ }
696
+
697
+ .vanilla-image-editor-v2 .background-upload-input {
698
+ width: 100%;
699
+ padding: 8px;
700
+ background: var(--editor-bg);
701
+ border: 1px solid var(--editor-border);
702
+ border-radius: var(--editor-radius-sm);
703
+ color: var(--editor-text);
704
+ font: inherit;
705
+ }
706
+
707
+ .vanilla-image-editor-v2 .background-remove-btn {
708
+ width: 100%;
709
+ }
710
+
711
+ /* ==================== Text panel ==================== */
712
+ .vanilla-image-editor-v2 .text-panel {
713
+ display: flex;
714
+ flex-direction: column;
715
+ gap: var(--editor-spacing);
716
+ }
717
+
718
+ .vanilla-image-editor-v2 .text-panel-header {
719
+ display: flex;
720
+ align-items: center;
721
+ justify-content: space-between;
722
+ gap: var(--editor-spacing-sm);
723
+ }
724
+
725
+ .vanilla-image-editor-v2 .text-panel-header .panel-section-title {
726
+ margin-bottom: 0;
727
+ }
728
+
729
+ .vanilla-image-editor-v2 .text-panel-empty,
730
+ .vanilla-image-editor-v2 .text-panel-error {
731
+ margin: 0;
732
+ color: var(--editor-text-muted);
733
+ font-size: 13px;
734
+ }
735
+
736
+ .vanilla-image-editor-v2 .text-panel-error {
737
+ color: var(--editor-danger);
738
+ }
739
+
740
+ .vanilla-image-editor-v2 .text-field {
741
+ display: flex;
742
+ flex-direction: column;
743
+ gap: 6px;
744
+ color: var(--editor-text);
745
+ }
746
+
747
+ .vanilla-image-editor-v2 .text-field-label {
748
+ font-size: 12px;
749
+ font-weight: 500;
750
+ color: var(--editor-text);
751
+ }
752
+
753
+ .vanilla-image-editor-v2 .text-area-input,
754
+ .vanilla-image-editor-v2 .text-number-input {
755
+ width: 100%;
756
+ padding: 6px 8px;
757
+ background: var(--editor-bg);
758
+ border: 1px solid var(--editor-border);
759
+ border-radius: var(--editor-radius-sm);
760
+ color: var(--editor-text);
761
+ font: inherit;
762
+ }
763
+
764
+ .vanilla-image-editor-v2 .text-area-input {
765
+ min-height: 88px;
766
+ resize: vertical;
767
+ }
768
+
769
+ .vanilla-image-editor-v2 .text-area-input:focus,
770
+ .vanilla-image-editor-v2 .text-number-input:focus,
771
+ .vanilla-image-editor-v2 .text-checkbox-input:focus {
772
+ outline: none;
773
+ border-color: var(--editor-primary);
774
+ box-shadow: 0 0 0 2px var(--editor-primary-light);
775
+ }
776
+
777
+ .vanilla-image-editor-v2 .text-content-actions {
778
+ display: flex;
779
+ justify-content: flex-end;
780
+ gap: var(--editor-spacing-sm);
781
+ }
782
+
783
+ .vanilla-image-editor-v2 .text-control-grid {
784
+ display: grid;
785
+ grid-template-columns: repeat(2, minmax(0, 1fr));
786
+ gap: var(--editor-spacing-sm);
787
+ }
788
+
789
+ .vanilla-image-editor-v2 .text-control-grid .text-field {
790
+ min-width: 0;
791
+ }
792
+
793
+ .vanilla-image-editor-v2 .text-effect-section {
794
+ display: flex;
795
+ flex-direction: column;
796
+ gap: var(--editor-spacing-sm);
797
+ padding-top: var(--editor-spacing-sm);
798
+ border-top: 1px solid var(--editor-border-light);
799
+ }
800
+
801
+ .vanilla-image-editor-v2 .text-effect-title {
802
+ color: var(--editor-text-muted);
803
+ font-size: 11px;
804
+ font-weight: 600;
805
+ letter-spacing: 0.05em;
806
+ text-transform: uppercase;
807
+ }
808
+
809
+ .vanilla-image-editor-v2 .text-checkbox-field {
810
+ justify-content: space-between;
811
+ }
812
+
813
+ .vanilla-image-editor-v2 .text-checkbox-input {
814
+ width: 20px;
815
+ height: 20px;
816
+ accent-color: var(--editor-primary);
817
+ }
818
+
819
+ /* ==================== Layer stack ==================== */
820
+ .vanilla-image-editor-v2 .layer-stack-panel {
821
+ display: flex;
822
+ flex-direction: column;
823
+ gap: var(--editor-spacing-sm);
824
+ }
825
+
826
+ .vanilla-image-editor-v2 .layer-stack-header {
827
+ display: flex;
828
+ align-items: center;
829
+ justify-content: space-between;
830
+ gap: 8px;
831
+ }
832
+
833
+ .vanilla-image-editor-v2 .layer-stack-title {
834
+ font-size: 13px;
835
+ font-weight: 600;
836
+ color: var(--editor-text);
837
+ }
838
+
839
+ .vanilla-image-editor-v2 .layer-stack-order {
840
+ color: var(--editor-text-muted);
841
+ font-size: 11px;
842
+ }
843
+
844
+ .vanilla-image-editor-v2 .layer-stack-list {
845
+ display: flex;
846
+ flex-direction: column;
847
+ gap: 6px;
848
+ }
849
+
850
+ .vanilla-image-editor-v2 .layer-row {
851
+ display: grid;
852
+ grid-template-columns: 34px minmax(0, 1fr) auto;
853
+ gap: 8px;
854
+ align-items: center;
855
+ min-height: 48px;
856
+ padding: 6px;
857
+ border: 1px solid var(--editor-border);
858
+ border-radius: var(--editor-radius-sm);
859
+ background: var(--editor-surface);
860
+ }
861
+
862
+ .vanilla-image-editor-v2 .layer-row.active {
863
+ border-color: var(--editor-primary);
864
+ box-shadow: 0 0 0 1px var(--editor-primary-light);
865
+ }
866
+
867
+ .vanilla-image-editor-v2 .layer-row.hidden {
868
+ opacity: 0.62;
869
+ }
870
+
871
+ .vanilla-image-editor-v2 .layer-row-select,
872
+ .vanilla-image-editor-v2 .layer-action-btn {
873
+ display: inline-flex;
874
+ align-items: center;
875
+ justify-content: center;
876
+ border: 1px solid transparent;
877
+ border-radius: var(--editor-radius-sm);
878
+ background: transparent;
879
+ color: var(--editor-text);
880
+ cursor: pointer;
881
+ }
882
+
883
+ .vanilla-image-editor-v2 .layer-row-select {
884
+ width: 32px;
885
+ height: 32px;
886
+ padding: 0;
887
+ }
888
+
889
+ .vanilla-image-editor-v2 .layer-row-select:focus-visible,
890
+ .vanilla-image-editor-v2 .layer-action-btn:focus-visible {
891
+ outline: none;
892
+ border-color: var(--editor-primary);
893
+ box-shadow: 0 0 0 2px var(--editor-primary-light);
894
+ }
895
+
896
+ .vanilla-image-editor-v2 .layer-thumb {
897
+ display: inline-flex;
898
+ align-items: center;
899
+ justify-content: center;
900
+ width: 28px;
901
+ height: 28px;
902
+ border: 1px solid var(--editor-border);
903
+ border-radius: var(--editor-radius-sm);
904
+ background: var(--editor-bg);
905
+ color: var(--editor-text-muted);
906
+ overflow: hidden;
907
+ }
908
+
909
+ .vanilla-image-editor-v2 .layer-thumb svg {
910
+ width: 16px;
911
+ height: 16px;
912
+ }
913
+
914
+ .vanilla-image-editor-v2 .layer-row-main {
915
+ min-width: 0;
916
+ }
917
+
918
+ .vanilla-image-editor-v2 .layer-row-name,
919
+ .vanilla-image-editor-v2 .layer-row-meta {
920
+ display: block;
921
+ overflow: hidden;
922
+ text-overflow: ellipsis;
923
+ white-space: nowrap;
924
+ }
925
+
926
+ .vanilla-image-editor-v2 .layer-row-name {
927
+ color: var(--editor-text);
928
+ font-size: 13px;
929
+ font-weight: 600;
930
+ }
931
+
932
+ .vanilla-image-editor-v2 .layer-row-meta {
933
+ color: var(--editor-text-muted);
934
+ font-size: 11px;
935
+ }
936
+
937
+ .vanilla-image-editor-v2 .layer-row-actions {
938
+ display: grid;
939
+ grid-template-columns: repeat(3, 28px);
940
+ gap: 4px;
941
+ }
942
+
943
+ .vanilla-image-editor-v2 .layer-action-btn {
944
+ width: 28px;
945
+ height: 28px;
946
+ padding: 0;
947
+ }
948
+
949
+ .vanilla-image-editor-v2 .layer-action-btn:hover {
950
+ background: var(--editor-surface-2);
951
+ }
952
+
953
+ .vanilla-image-editor-v2 .layer-action-btn:disabled {
954
+ opacity: 0.35;
955
+ cursor: not-allowed;
956
+ }
957
+
958
+ .vanilla-image-editor-v2 .layer-action-btn svg {
959
+ width: 15px;
960
+ height: 15px;
961
+ }
962
+
963
+ .vanilla-image-editor-v2 .layer-stack-empty {
964
+ padding: var(--editor-spacing);
965
+ color: var(--editor-text-muted);
966
+ font-size: 13px;
967
+ text-align: center;
968
+ }
969
+
970
+ /* ==================== Loading overlay ==================== */
971
+ .vanilla-image-editor-v2 .editor-loading-overlay {
972
+ position: absolute;
973
+ inset: 0;
974
+ display: flex;
975
+ flex-direction: column;
976
+ align-items: center;
977
+ justify-content: center;
978
+ gap: var(--editor-spacing-sm);
979
+ background: var(--editor-overlay);
980
+ color: #ffffff;
981
+ z-index: 100;
982
+ font-size: 13px;
983
+ }
984
+
985
+ .vanilla-image-editor-v2 .editor-loading-spinner {
986
+ width: 32px;
987
+ height: 32px;
988
+ border: 3px solid rgba(255, 255, 255, 0.3);
989
+ border-top-color: #ffffff;
990
+ border-radius: 50%;
991
+ animation: v2-spin 0.8s linear infinite;
992
+ }
993
+
994
+ @keyframes v2-spin {
995
+ to { transform: rotate(360deg); }
996
+ }
997
+
998
+ /* ==================== Toolbar (reuses v1 toolbar styling inside this shell) ==================== */
999
+ .vanilla-image-editor-v2 .editor-toolbar {
1000
+ display: flex;
1001
+ align-items: center;
1002
+ justify-content: space-between;
1003
+ padding: var(--editor-spacing-sm) var(--editor-spacing);
1004
+ background: var(--editor-surface);
1005
+ }
1006
+
1007
+ .vanilla-image-editor-v2 .toolbar-section {
1008
+ display: flex;
1009
+ align-items: center;
1010
+ gap: var(--editor-spacing-sm);
1011
+ }
1012
+
1013
+ .vanilla-image-editor-v2 .zoom-label {
1014
+ font-size: 12px;
1015
+ font-weight: 500;
1016
+ min-width: 50px;
1017
+ text-align: center;
1018
+ color: var(--editor-text-muted);
1019
+ }
1020
+
1021
+ .vanilla-image-editor-v2 .icon-btn {
1022
+ width: 36px;
1023
+ height: 36px;
1024
+ display: inline-flex;
1025
+ align-items: center;
1026
+ justify-content: center;
1027
+ background: transparent;
1028
+ border: 1px solid transparent;
1029
+ border-radius: var(--editor-radius-sm);
1030
+ color: var(--editor-text);
1031
+ cursor: pointer;
1032
+ transition: background 0.15s, border-color 0.15s;
1033
+ padding: 0;
1034
+ }
1035
+
1036
+ .vanilla-image-editor-v2 .icon-btn:hover:not(:disabled) {
1037
+ background: var(--editor-surface-2);
1038
+ }
1039
+
1040
+ .vanilla-image-editor-v2 .icon-btn:disabled {
1041
+ opacity: 0.4;
1042
+ cursor: not-allowed;
1043
+ }
1044
+
1045
+ .vanilla-image-editor-v2 .icon-btn svg {
1046
+ width: 20px;
1047
+ height: 20px;
1048
+ }
1049
+
1050
+ .vanilla-image-editor-v2 .icon-btn.btn-primary {
1051
+ background: var(--editor-primary);
1052
+ color: #ffffff;
1053
+ }
1054
+
1055
+ .vanilla-image-editor-v2 .icon-btn.btn-primary:hover:not(:disabled) {
1056
+ background: var(--editor-primary-hover);
1057
+ }
1058
+
1059
+ /* ==================== Mobile shell (bottom drawer) ==================== */
1060
+ @media (max-width: 900px) {
1061
+ .vanilla-image-editor-v2 .editor-v2-body {
1062
+ flex-direction: column;
1063
+ /* Let the drawer overlay the bottom of the canvas area via absolute
1064
+ positioning — the drawer owns its own height. */
1065
+ position: relative;
1066
+ }
1067
+
1068
+ /* Canvas takes the full stage; drawer floats over the bottom */
1069
+ .vanilla-image-editor-v2 .editor-v2-canvas {
1070
+ flex: 1 1 auto;
1071
+ min-height: 0;
1072
+ touch-action: none; /* canvas owns its own gestures */
1073
+ }
1074
+
1075
+ /* Desktop panel is not rendered on mobile; hide defensively in case a
1076
+ stale swap leaves it behind. */
1077
+ .vanilla-image-editor-v2 .editor-v2-panel {
1078
+ display: none;
1079
+ }
1080
+ }
1081
+
1082
+ /* ==================== Mobile: active filter chips strip ==================== */
1083
+ .vanilla-image-editor-v2 .mobile-active-chips {
1084
+ flex: 0 0 auto;
1085
+ padding: 6px 10px;
1086
+ background: var(--editor-bg);
1087
+ border-top: 1px solid var(--editor-border-light);
1088
+ overflow-x: auto;
1089
+ overflow-y: hidden;
1090
+ -webkit-overflow-scrolling: touch;
1091
+ scrollbar-width: none;
1092
+ touch-action: pan-x;
1093
+ }
1094
+
1095
+ .vanilla-image-editor-v2 .mobile-active-chips::-webkit-scrollbar {
1096
+ display: none;
1097
+ }
1098
+
1099
+ /* Only show the chips strip in the mobile shell */
1100
+ @media (min-width: 901px) {
1101
+ .vanilla-image-editor-v2 .mobile-active-chips {
1102
+ display: none !important;
1103
+ }
1104
+ }
1105
+
1106
+ .vanilla-image-editor-v2 .mobile-active-track {
1107
+ display: inline-flex;
1108
+ gap: 6px;
1109
+ min-width: 100%;
1110
+ }
1111
+
1112
+ .vanilla-image-editor-v2 .mobile-active-chip {
1113
+ flex: 0 0 auto;
1114
+ display: inline-flex;
1115
+ align-items: center;
1116
+ gap: 4px;
1117
+ padding: 4px 4px 4px 10px;
1118
+ background: var(--editor-surface);
1119
+ border: 1px solid var(--editor-border-light);
1120
+ border-radius: 16px;
1121
+ font-size: 12px;
1122
+ color: var(--editor-text);
1123
+ white-space: nowrap;
1124
+ }
1125
+
1126
+ .vanilla-image-editor-v2 .mobile-active-chip.selected {
1127
+ background: var(--editor-primary-light);
1128
+ border-color: var(--editor-primary);
1129
+ }
1130
+
1131
+ .vanilla-image-editor-v2 .mobile-active-chip-name {
1132
+ background: none;
1133
+ border: 0;
1134
+ padding: 0;
1135
+ font: inherit;
1136
+ color: inherit;
1137
+ cursor: pointer;
1138
+ }
1139
+
1140
+ .vanilla-image-editor-v2 .mobile-active-chip-remove {
1141
+ width: 22px;
1142
+ height: 22px;
1143
+ padding: 0;
1144
+ background: transparent;
1145
+ border: 0;
1146
+ cursor: pointer;
1147
+ color: var(--editor-text-muted);
1148
+ display: inline-flex;
1149
+ align-items: center;
1150
+ justify-content: center;
1151
+ border-radius: 50%;
1152
+ transition: background 0.15s;
1153
+ }
1154
+
1155
+ .vanilla-image-editor-v2 .mobile-active-chip-remove:hover,
1156
+ .vanilla-image-editor-v2 .mobile-active-chip-remove:active {
1157
+ background: var(--editor-danger);
1158
+ color: #ffffff;
1159
+ }
1160
+
1161
+ .vanilla-image-editor-v2 .mobile-active-chip-remove svg {
1162
+ width: 12px;
1163
+ height: 12px;
1164
+ }
1165
+
1166
+ /* ==================== Mobile: bottom drawer ==================== */
1167
+ .vanilla-image-editor-v2 .editor-v2-drawer {
1168
+ flex: 0 0 auto;
1169
+ display: flex;
1170
+ flex-direction: column;
1171
+ background: var(--editor-bg);
1172
+ border-top: 1px solid var(--editor-border);
1173
+ box-shadow: 0 -4px 20px var(--editor-shadow);
1174
+ /* Height is controlled inline by BottomDrawer; fall back to 45% */
1175
+ height: 45%;
1176
+ min-height: 80px;
1177
+ overflow: hidden;
1178
+ padding-bottom: env(safe-area-inset-bottom, 0);
1179
+ will-change: height;
1180
+ }
1181
+
1182
+ @media (min-width: 901px) {
1183
+ /* Desktop never shows the drawer */
1184
+ .vanilla-image-editor-v2 .editor-v2-drawer {
1185
+ display: none !important;
1186
+ }
1187
+ }
1188
+
1189
+ .vanilla-image-editor-v2 .drawer-handle {
1190
+ flex: 0 0 auto;
1191
+ width: 100%;
1192
+ height: 28px;
1193
+ display: flex;
1194
+ align-items: center;
1195
+ justify-content: center;
1196
+ background: transparent;
1197
+ border: 0;
1198
+ padding: 0;
1199
+ cursor: grab;
1200
+ touch-action: pan-y;
1201
+ -webkit-tap-highlight-color: transparent;
1202
+ }
1203
+
1204
+ .vanilla-image-editor-v2 .drawer-handle:active {
1205
+ cursor: grabbing;
1206
+ }
1207
+
1208
+ .vanilla-image-editor-v2 .drawer-handle-grip {
1209
+ width: 40px;
1210
+ height: 4px;
1211
+ background: var(--editor-border);
1212
+ border-radius: 2px;
1213
+ }
1214
+
1215
+ .vanilla-image-editor-v2 .drawer-header {
1216
+ flex: 0 0 auto;
1217
+ }
1218
+
1219
+ .vanilla-image-editor-v2 .drawer-body {
1220
+ flex: 1 1 auto;
1221
+ min-height: 0;
1222
+ overflow-y: auto;
1223
+ overflow-x: hidden;
1224
+ -webkit-overflow-scrolling: touch;
1225
+ overscroll-behavior: contain;
1226
+ touch-action: pan-y;
1227
+ }
1228
+
1229
+ .vanilla-image-editor-v2 .drawer-content {
1230
+ display: flex;
1231
+ flex-direction: column;
1232
+ min-height: 100%;
1233
+ }
1234
+
1235
+ /* Drawer nav header (back button + title + optional right action) */
1236
+ .vanilla-image-editor-v2 .drawer-nav-header {
1237
+ display: flex;
1238
+ align-items: center;
1239
+ gap: 8px;
1240
+ padding: 8px var(--editor-spacing);
1241
+ border-bottom: 1px solid var(--editor-border-light);
1242
+ background: var(--editor-surface);
1243
+ }
1244
+
1245
+ .vanilla-image-editor-v2 .drawer-nav-title {
1246
+ flex: 1 1 auto;
1247
+ margin: 0;
1248
+ font-size: 15px;
1249
+ font-weight: 600;
1250
+ color: var(--editor-text);
1251
+ text-align: center;
1252
+ white-space: nowrap;
1253
+ overflow: hidden;
1254
+ text-overflow: ellipsis;
1255
+ }
1256
+
1257
+ /* When there's no back button, the title still centers because flex:1 */
1258
+ .vanilla-image-editor-v2 .drawer-nav-header:not(:has(.drawer-back-btn)) .drawer-nav-title {
1259
+ text-align: left;
1260
+ }
1261
+
1262
+ .vanilla-image-editor-v2 .drawer-back-btn {
1263
+ flex: 0 0 auto;
1264
+ width: 36px;
1265
+ height: 36px;
1266
+ display: inline-flex;
1267
+ align-items: center;
1268
+ justify-content: center;
1269
+ background: transparent;
1270
+ border: 0;
1271
+ border-radius: 50%;
1272
+ color: var(--editor-text);
1273
+ cursor: pointer;
1274
+ padding: 0;
1275
+ transition: background 0.15s;
1276
+ }
1277
+
1278
+ .vanilla-image-editor-v2 .drawer-back-btn:hover,
1279
+ .vanilla-image-editor-v2 .drawer-back-btn:active {
1280
+ background: var(--editor-surface-2);
1281
+ }
1282
+
1283
+ .vanilla-image-editor-v2 .drawer-back-btn svg {
1284
+ width: 24px;
1285
+ height: 24px;
1286
+ }
1287
+
1288
+ .vanilla-image-editor-v2 .drawer-nav-body {
1289
+ padding: var(--editor-spacing-sm) var(--editor-spacing);
1290
+ display: flex;
1291
+ flex-direction: column;
1292
+ gap: var(--editor-spacing-sm);
1293
+ }
1294
+
1295
+ /* On mobile, the CategoryTabs component renders as a grid instead of a
1296
+ tab strip so touch targets are larger. Override the base panel-tabs
1297
+ layout inside the drawer. */
1298
+ .vanilla-image-editor-v2 .drawer-nav-body .panel-tabs {
1299
+ display: grid;
1300
+ grid-template-columns: repeat(4, 1fr);
1301
+ gap: 8px;
1302
+ padding: 0;
1303
+ background: transparent;
1304
+ border: 0;
1305
+ }
1306
+
1307
+ .vanilla-image-editor-v2 .drawer-nav-body .panel-tab {
1308
+ flex: none;
1309
+ padding: 12px 8px;
1310
+ background: var(--editor-surface);
1311
+ border: 1px solid var(--editor-border-light);
1312
+ font-size: 12px;
1313
+ gap: 4px;
1314
+ }
1315
+
1316
+ .vanilla-image-editor-v2 .drawer-nav-body .panel-tab.active {
1317
+ background: var(--editor-primary-light);
1318
+ border-color: var(--editor-primary);
1319
+ }
1320
+
1321
+ .vanilla-image-editor-v2 .drawer-nav-body .panel-tab-icon svg {
1322
+ width: 22px;
1323
+ height: 22px;
1324
+ }
1325
+
1326
+ /* Filter list inside the drawer — slightly larger rows for touch */
1327
+ .vanilla-image-editor-v2 .drawer-nav-body .filter-row {
1328
+ padding: 10px 12px;
1329
+ }
1330
+
1331
+ .vanilla-image-editor-v2 .drawer-nav-body .filter-row-name {
1332
+ font-size: 14px;
1333
+ }
1334
+
1335
+ /* Keep the selected-filter controls section flat inside the drawer (no
1336
+ inner border or background — the drawer's own surface is enough). */
1337
+ .vanilla-image-editor-v2 .drawer-nav-body .controls-section {
1338
+ padding: 0;
1339
+ background: transparent;
1340
+ border: 0;
1341
+ }
1342
+
1343
+ /* Reduced-motion: drawer height transitions are already handled in JS,
1344
+ but disable the nav-header transitions too for consistency. */
1345
+ @media (prefers-reduced-motion: reduce) {
1346
+ .vanilla-image-editor-v2 .editor-v2-drawer,
1347
+ .vanilla-image-editor-v2 .drawer-back-btn {
1348
+ transition: none !important;
1349
+ }
1350
+ }
1351
+
1352
+ /* Respect reduced-motion preferences */
1353
+ @media (prefers-reduced-motion: reduce) {
1354
+ .vanilla-image-editor-v2 .panel-tab,
1355
+ .vanilla-image-editor-v2 .filter-row,
1356
+ .vanilla-image-editor-v2 .filter-row-toggle,
1357
+ .vanilla-image-editor-v2 .active-chip,
1358
+ .vanilla-image-editor-v2 .active-chip-remove,
1359
+ .vanilla-image-editor-v2 .btn,
1360
+ .vanilla-image-editor-v2 .btn-text,
1361
+ .vanilla-image-editor-v2 .icon-btn,
1362
+ .vanilla-image-editor-v2 .toggle-switch,
1363
+ .vanilla-image-editor-v2 .toggle-slider {
1364
+ transition: none;
1365
+ }
1366
+ }