Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
618 lines (553 loc) · 14.6 KB
/
Copy pathstyle.css
File metadata and controls
618 lines (553 loc) · 14.6 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
:root {
--md-primary: #6750a4;
--md-primary-light: #8b73ca;
--md-primary-dark: #4f378b;
--md-on-primary: #ffffff;
--md-secondary: #9c27b0;
--md-surface: #fffbff;
--md-surface-container: #f3edf7; /* Used for modal background */
--md-surface-variant: #e7e0ec; /* Used for slider track, disabled states */
--md-on-surface: #1c1b1f;
--md-on-surface-variant: #49454f; /* Used for labels, icons */
--md-outline: #79747e; /* Used for input borders */
--md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
--md-elevation-2: 0 2px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
--md-elevation-3: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
--md-radius-small: 4px; /* M3 uses smaller radius */
--md-radius-medium: 12px;
--md-radius-large: 28px; /* For modal dialog */
--md-radius-full: 999px; /* For slider thumb */
--md-transition: all 0.2s ease-in-out; /* Slightly faster M3 transition */
--md-slider-track-height: 4px;
--md-slider-thumb-size: 20px;
--md-slider-thumb-hover-size: 28px; /* Thumb halo */
--md-slider-thumb-focus-size: 40px; /* Focus halo */
}
/* General Body Styles */
body {
font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
padding: 24px;
background-color: var(--md-surface);
color: var(--md-on-surface);
margin: 0;
transition: var(--md-transition);
max-width: 800px; /* Limit max width */
margin: 0 auto;
}
h1,
h2 {
color: var(--md-on-surface);
font-weight: 400;
}
h1 {
font-size: 28px; /* Slightly smaller h1 */
margin-bottom: 0; /* Removed default margin */
}
h2 {
font-size: 22px;
margin-top: 32px;
margin-bottom: 16px;
}
p {
color: var(--md-on-surface-variant);
margin-bottom: 24px;
text-align: center;
max-width: 600px;
}
/* Header Styles */
.app-header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px; /* Adjust spacing */
}
/* Icon Button Styles (Used for Settings, Close, Reset) */
.md-icon-button,
.reset-button {
background: none;
border: none;
padding: 8px;
border-radius: 50%;
cursor: pointer;
color: var(--md-on-surface-variant);
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden; /* Needed for ripple */
transition: background-color 0.15s ease-out;
flex-shrink: 0; /* Prevent shrinking in flex layouts */
width: 40px; /* M3 touch target size */
height: 40px;
box-sizing: border-box;
}
.md-icon-button:hover,
.reset-button:hover {
background-color: rgba(0, 0, 0, 0.08); /* Use subtle hover */
}
.md-icon-button:active,
.reset-button:active {
background-color: rgba(0, 0, 0, 0.12);
}
.md-icon-button .material-symbols-rounded,
.reset-button .material-symbols-rounded {
font-size: 24px;
display: block; /* Prevent extra space */
}
/* Drop Zone Styles */
#drop-zone {
width: 100%;
max-width: 100%;
height: 250px; /* Slightly smaller */
border: 2px dashed var(--md-outline);
border-radius: var(--md-radius-medium); /* M3 medium radius */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
color: var(--md-on-surface-variant);
background-color: var(--md-surface-container);
margin-bottom: 24px;
transition: var(--md-transition);
transition-property: border-color, transform, box-shadow, background-color;
cursor: pointer;
position: relative;
overflow: hidden;
}
.drop-icon {
font-size: 48px;
margin-bottom: 12px;
color: var(--md-primary);
}
#drop-zone::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--md-primary);
opacity: 0;
transition: var(--md-transition);
z-index: 1;
pointer-events: none;
}
#drop-zone.dragover {
border-color: var(--md-primary);
background-color: #e8def8; /* Lighter purple on drag */
/* transform: scale(1.01); No scale needed */
box-shadow: var(--md-elevation-1);
}
#drop-zone.dragover::after {
opacity: 0.05;
}
#drop-zone.clicked {
transform: scale(0.99);
transition: transform 0.1s ease-out;
}
#drop-zone p,
#drop-zone button {
position: relative;
z-index: 2;
margin: 8px 0;
}
#drop-zone p {
margin-bottom: 8px;
}
.paste-hint {
font-size: 12px; /* Smaller hint */
opacity: 0.8;
margin-top: 8px;
margin-bottom: 0;
}
/* Standard Button Style (Browse Files) */
.md-button {
position: relative;
padding: 10px 24px; /* M3 Button Padding */
margin-top: 16px;
cursor: pointer;
background-color: var(--md-primary);
color: var(--md-on-primary);
border: none;
border-radius: var(--md-radius-full); /* M3 uses full radius */
font-size: 14px; /* M3 font size */
font-weight: 500;
text-transform: none; /* M3 often uses sentence case */
letter-spacing: 0.1px;
box-shadow: var(--md-elevation-1);
transition: var(--md-transition);
transition-property: background-color, box-shadow, transform;
overflow: hidden;
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 40px; /* M3 touch target */
}
.md-button:hover {
background-color: var(--md-primary-light);
box-shadow: var(--md-elevation-2);
}
.md-button:active {
transform: scale(0.98); /* Subtle click feedback */
}
/* Ripple Animation */
.ripple {
position: absolute;
border-radius: 50%;
transform: scale(0);
animation: ripple 0.6s linear;
pointer-events: none;
/* Ripple color set in JS based on button type */
}
@keyframes ripple {
to {
transform: scale(2.5);
opacity: 0;
}
}
/* Status Indicator */
#status {
width: 100%;
max-width: 400px;
margin-top: 20px;
padding: 12px 16px;
font-weight: 500;
color: var(--md-on-surface-variant);
background-color: var(--md-surface-container);
border-radius: var(--md-radius-medium);
transition: var(--md-transition);
box-shadow: var(--md-elevation-1);
text-align: center;
font-size: 14px;
}
#status.processing {
animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(103, 80, 164, 0.3);
}
70% {
box-shadow: 0 0 0 8px rgba(103, 80, 164, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(103, 80, 164, 0);
}
}
/* Preview Area */
#preview-canvas {
margin-top: 16px;
background-color: var(--md-surface-variant); /* Match background */
border-radius: var(--md-radius-medium);
max-width: 90%; /* Responsive width */
height: auto; /* Maintain aspect ratio */
box-shadow: var(--md-elevation-2);
transition: opacity 0.3s ease-out, transform 0.3s ease-out;
transform: translateY(10px) scale(0.98); /* Start slightly down and smaller */
opacity: 0;
display: block; /* Keep in layout flow even when hidden */
}
#preview-canvas.show {
transform: translateY(0) scale(1);
opacity: 1;
}
/* Modal Styles */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.32);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Delay visibility change */
}
.modal-overlay.visible {
opacity: 1;
visibility: visible;
transition-delay: 0s;
}
.modal-dialog {
background-color: var(--md-surface-container);
color: var(--md-on-surface);
border-radius: var(--md-radius-large);
padding: 24px;
box-shadow: var(--md-elevation-3);
width: 90%;
max-width: 400px;
transform: scale(0.95) translateY(10px);
opacity: 0;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.modal-overlay.visible .modal-dialog {
transform: scale(1) translateY(0);
opacity: 1;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px; /* More space */
}
.modal-header h2 {
margin: 0;
font-size: 22px;
font-weight: 500;
}
.modal-content {
display: flex;
flex-direction: column;
gap: 24px; /* Spacing between setting items */
}
.setting-item {
display: flex;
flex-direction: column;
gap: 8px;
}
/* Container for label + value */
.slider-label-container {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px; /* Space between label and slider */
}
.setting-item label {
font-size: 14px;
font-weight: 500;
color: var(--md-on-surface-variant);
}
.slider-value {
font-size: 14px;
font-weight: 400;
color: var(--md-on-surface-variant);
}
.input-group {
display: flex;
align-items: center;
gap: 12px; /* Space between input and reset button */
}
/* Basic Input Styles (for color picker) */
.setting-item input[type="color"] {
flex-grow: 1;
padding: 0; /* Remove padding for native picker */
border: 1px solid var(--md-outline);
border-radius: var(--md-radius-small);
background-color: var(--md-surface);
color: var(--md-on-surface);
height: 40px; /* Match height roughly */
cursor: pointer;
min-width: 50px; /* Ensure it doesn't collapse */
}
.setting-item input[type="color"]:focus {
outline: 2px solid var(--md-primary);
outline-offset: 1px;
}
/* Number Input Styles */
.number-input {
width: 80px;
height: 40px;
padding: 0 8px;
border: 1px solid var(--md-outline);
border-radius: var(--md-radius-small);
background-color: var(--md-surface);
color: var(--md-on-surface);
font-size: 14px;
text-align: center;
margin-left: 8px;
}
.number-input:focus {
outline: 2px solid var(--md-primary);
outline-offset: 1px;
}
.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button {
opacity: 1;
height: 24px;
}
/* Error Message Styles */
.error-message {
color: #b00020; /* Material Design error color */
font-size: 12px;
margin-top: 4px;
display: block; /* Use block for positioning */
width: 100%; /* Span full width below input */
text-align: right; /* Align error message relative to input group */
padding-right: 50px; /* Adjust padding to align near the input */
}
/* Input Error State */
.number-input.error {
border-color: #b00020;
}
.number-input.error:focus {
outline-color: #b00020;
}
/* --- M3 Slider Styles --- */
.slider-container {
gap: 16px; /* Space between slider and reset button */
}
input[type="range"] {
flex-grow: 1;
-webkit-appearance: none; /* Override default look */
appearance: none;
width: 100%; /* Full width */
height: var(--md-slider-track-height);
background: var(--md-surface-variant); /* Default track color */
border-radius: var(--md-radius-full);
outline: none;
cursor: pointer;
transition: background 0.1s ease-in-out; /* For dynamic track update */
margin: calc(var(--md-slider-thumb-size) / 2) 0;
/* Center thumb vertically */
}
/* Webkit (Chrome, Safari, Edge) Thumb */
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: var(--md-slider-thumb-size);
height: var(--md-slider-thumb-size);
background: var(--md-primary);
border-radius: var(--md-radius-full);
border: none; /* No border needed */
cursor: pointer;
position: relative; /* For pseudo-elements */
transition: background-color 0.15s ease-out, transform 0.15s ease-out,
box-shadow 0.15s ease-out;
box-shadow: var(--md-elevation-1); /* Subtle shadow */
}
/* Firefox Thumb */
input[type="range"]::-moz-range-thumb {
width: var(--md-slider-thumb-size);
height: var(--md-slider-thumb-size);
background: var(--md-primary);
border-radius: var(--md-radius-full);
border: none;
cursor: pointer;
transition: background-color 0.15s ease-out, transform 0.15s ease-out,
box-shadow 0.15s ease-out;
box-shadow: var(--md-elevation-1);
}
/* Hover State - Add a "halo" effect */
input[type="range"]:hover::-webkit-slider-thumb::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: var(--md-slider-thumb-hover-size);
height: var(--md-slider-thumb-hover-size);
background-color: var(--md-primary);
opacity: 0.12; /* M3 hover state opacity */
border-radius: 50%;
z-index: -1; /* Behind the thumb */
}
/* input[type="range"]:hover::-moz-range-thumb::before { */
/* Similar styling for Firefox if possible, often harder */
/* Consider just scaling thumb slightly or changing color */
/* } */
/* Active/Focus State - Larger halo */
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb {
background-color: var(--md-primary-dark); /* Darken thumb on active */
transform: scale(1.1); /* Slightly enlarge thumb */
box-shadow: var(--md-elevation-2);
}
input[type="range"]:active::-webkit-slider-thumb::before,
input[type="range"]:focus::-webkit-slider-thumb::before {
width: var(--md-slider-thumb-focus-size);
height: var(--md-slider-thumb-focus-size);
opacity: 0.18; /* M3 focus state opacity */
}
input[type="range"]:active::-moz-range-thumb,
input[type="range"]:focus::-moz-range-thumb {
background-color: var(--md-primary-dark);
transform: scale(1.1);
box-shadow: var(--md-elevation-2);
}
/* Webkit Track Styles (Less crucial with background gradient) */
input[type="range"]::-webkit-slider-runnable-track {
width: 100%;
cursor: pointer;
background: transparent; /* Let the input element background handle it */
border-radius: var(--md-radius-full);
}
/* Firefox Track Styles */
input[type="range"]::-moz-range-track {
width: 100%;
cursor: pointer;
background: transparent; /* Let the input element background handle it */
border-radius: var(--md-radius-full);
}
/* Toggle Switch Styles */
.switch {
position: relative;
display: inline-block;
width: 48px;
height: 24px;
margin-left: auto;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--md-surface-variant);
transition: .2s;
border-radius: 24px;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 2px;
bottom: 2px;
background-color: white;
transition: .2s;
border-radius: 50%;
box-shadow: var(--md-elevation-1);
}
input:checked + .slider {
background-color: var(--md-primary);
}
input:checked + .slider:before {
transform: translateX(24px);
}
/* Download Button Styles */
#download-button {
display: none;
margin-top: 16px;
background-color: var(--md-primary);
color: var(--md-on-primary);
border: none;
border-radius: var(--md-radius-full);
padding: 10px 24px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: var(--md-transition);
box-shadow: var(--md-elevation-1);
}
#download-button:hover {
background-color: var(--md-primary-light);
box-shadow: var(--md-elevation-2);
}
#download-button:active {
transform: scale(0.98);
}