main
css 659 lines 13.6 KB
Raw
1 /* Modal Styles */
2 /* Until the full transition of A0 modals is complete,
3 consider .modal-content, .modal-container, and .modal-overlay part of the legacy modal system.
4
5 Keep changes conservative because some classes like modal-header are shared between
6 the old and the new system. */
7
8 .modal {
9 display: none;
10 position: fixed;
11 top: 0;
12 left: 0;
13 width: 100%;
14 height: 100%;
15 z-index: 5000;
16 }
17 .modal.show {
18 display: block;
19 }
20
21 .modal-inner {
22 display: flex;
23 flex-direction: column;
24 overflow: hidden;
25 position: fixed;
26 top: 50%;
27 left: 50%;
28 transform: translate(-50%, -50%);
29 width: min(92vw, 980px);
30 max-width: calc(100vw - 24px);
31 max-height: min(88vh, 900px);
32 border: 1px solid color-mix(in srgb, var(--color-border) 68%, transparent);
33 border-radius: 7px;
34 background: color-mix(in srgb, var(--color-background) 94%, #000 6%);
35 box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
36 z-index: 2;
37 }
38
39 /* Overlay (old system) */
40 .modal-overlay {
41 position: fixed;
42 top: 0;
43 left: 0;
44 right: 0;
45 bottom: 0;
46 background: rgba(0, 0, 0, 0.48);
47 backdrop-filter: blur(8px) saturate(112%);
48 -webkit-backdrop-filter: blur(8px) saturate(112%);
49 display: flex;
50 align-items: center;
51 justify-content: center;
52 z-index: 5001;
53 }
54
55 /* Modal Backdrop */
56 .modal-backdrop {
57 position: fixed;
58 top: 0;
59 left: 0;
60 width: 100%;
61 height: 100%;
62 background-color: rgba(0, 0, 0, 0.48);
63 backdrop-filter: blur(8px) saturate(112%);
64 -webkit-backdrop-filter: blur(8px) saturate(112%);
65 z-index: 1;
66 cursor: pointer;
67 }
68
69 /* Modal Container (old system) */
70 .modal-container {
71 background: color-mix(in srgb, var(--color-background) 94%, #000 6%);
72 border: 1px solid color-mix(in srgb, var(--color-border) 68%, transparent);
73 border-radius: 7px;
74 width: 1100px; /* Reduced from 1200px to 1100px */
75 max-height: 90vh;
76 display: flex;
77 flex-direction: column;
78 overflow: hidden;
79 box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
80 box-sizing: border-box;
81 }
82
83 /* Modal Header */
84 .modal-header {
85 display: grid;
86 grid-template-columns: minmax(0, 1fr);
87 grid-auto-flow: column;
88 grid-auto-columns: auto;
89 align-items: center;
90 justify-content: space-between;
91 gap: 0.5rem;
92 min-height: 42px;
93 padding: 0.45rem 0.75rem 0.45rem 1rem;
94 background: color-mix(in srgb, var(--color-background) 92%, #000 8%);
95 color: var(--color-text);
96 border-bottom: 1px solid color-mix(in srgb, var(--color-border) 64%, transparent);
97 }
98 .modal-header h2 {
99 margin: 0;
100 min-width: 0;
101 overflow: hidden;
102 text-overflow: ellipsis;
103 white-space: nowrap;
104 }
105
106 .modal-title {
107 font-size: 0.92rem;
108 font-weight: 750;
109 letter-spacing: 0;
110 }
111
112 /* Modal Subheader */
113 .modal-subheader {
114 display: inline;
115 justify-content: space-between;
116 align-items: center;
117 padding: 0.7rem 1.5rem;
118 }
119
120 /* Modal Close Button */
121 .modal-close {
122 display: inline-flex;
123 align-items: center;
124 justify-content: center;
125 width: 34px;
126 height: 34px;
127 min-width: 34px;
128 min-height: 34px;
129 background: transparent;
130 border: 1px solid transparent;
131 border-radius: 7px;
132 font-size: 1.45rem;
133 line-height: 1;
134 color: var(--color-text);
135 opacity: 0.72;
136 cursor: pointer;
137 padding: 0;
138 transition: background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
139 }
140
141 .modal-close:hover {
142 opacity: 1;
143 border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
144 background: color-mix(in srgb, var(--color-background-hover) 72%, transparent);
145 }
146
147 /* Modal Description */
148 .modal-description {
149 padding: 0.8rem 1rem 0 1rem;
150 flex-grow: 1;
151 }
152
153 /* Modal Content */
154 .modal-content {
155 padding: 0.5rem 1.5rem 0 1.5rem;
156 overflow-y: auto;
157 height: calc(90vh);
158 flex-grow: 1;
159 background-clip: border-box;
160 border: 6px solid transparent;
161 margin-bottom: 0;
162 padding-bottom: 10px;
163 box-sizing: border-box;
164 }
165
166 .modal-bd {
167 min-width: 0;
168 }
169
170 .modal-scroll {
171 min-height: 0;
172 max-height: min(88vh, 900px);
173 overflow-y: auto;
174 padding: 0.9rem 1rem 1rem;
175 background: color-mix(in srgb, var(--color-background) 95%, #000 5%);
176 }
177
178 .modal-x {
179 position: absolute;
180 top: 1rem;
181 right: 1rem;
182 background: none;
183 border: none;
184 font-size: 1.5rem;
185 cursor: pointer;
186 color: var(--color-text);
187 padding: 0.5rem;
188 line-height: 1;
189 z-index: 3;
190 }
191
192 .modal-content::-webkit-scrollbar, .modal-scroll::-webkit-scrollbar {
193 width: 6px;
194 height: 6px;
195 }
196 .modal-content::-webkit-scrollbar-track, .modal-scroll::-webkit-scrollbar-track {
197 background: transparent;
198 margin: 4px 0;
199 border-radius: 6px;
200 }
201 .modal-content::-webkit-scrollbar-thumb, .modal-scroll::-webkit-scrollbar-thumb {
202 background-color: rgba(155, 155, 155, 0.5);
203 border-radius: 6px;
204 transition: background-color 0.2s ease;
205 }
206 .modal-content::-webkit-scrollbar-thumb:hover, .modal-scroll::-webkit-scrollbar-thumb:hover {
207 background-color: rgba(155, 155, 155, 0.7);
208 }
209
210 /* Modal with footer support */
211 .modal-footer {
212 display: flex;
213 justify-content: flex-end;
214 align-items: center;
215 min-height: 54px;
216 padding: 0.55rem 1rem;
217 border-top: 1px solid color-mix(in srgb, var(--color-border) 58%, transparent);
218 background: color-mix(in srgb, var(--color-background) 92%, #000 8%);
219 gap: 0.75rem;
220 }
221 .modal-inner.modal-with-footer {
222 display: flex;
223 flex-direction: column;
224 }
225 .modal-inner.modal-with-footer .modal-scroll {
226 flex: 1;
227 min-height: 0;
228 overflow-y: auto;
229 }
230 .modal-footer-slot {
231 flex-shrink: 0;
232 border-top: 1px solid color-mix(in srgb, var(--color-border) 58%, transparent);
233 background: color-mix(in srgb, var(--color-background) 92%, #000 8%);
234 }
235
236 .modal-footer-slot .modal-footer {
237 border-top: 0;
238 }
239
240 /* Section Styles */
241 .section {
242 margin-bottom: 2rem;
243 padding: 1rem;
244 /* padding-bottom: 0; */
245 border: 1px solid var(--color-border);
246 border-radius: 0.5rem;
247 }
248 .section-title {
249 font-size: 1.25rem;
250 font-weight: bold;
251 color: var(--color-primary);
252 margin-bottom: 0.5rem;
253 }
254 .section-description {
255 color: var(--color-text);
256 margin-bottom: 1rem;
257 }
258
259 /* Buttons Container */
260 .modal-button-container {
261 display: flex;
262 justify-content: space-between;
263 gap: 10px;
264 width: 100%;
265 margin-top: 20px;
266 }
267 .modal-button-container .button {
268 flex: 1;
269 min-width: 0;
270 padding: 10px;
271 text-align: center;
272 white-space: nowrap;
273 font-size: 0.9em;
274 display: flex;
275 justify-content: center;
276 align-items: center;
277 }
278 #buttons-container {
279 display: flex;
280 gap: 0.875rem !important;
281 }
282
283 /* Button Styles */
284 .btn {
285 font-weight: 500;
286 min-height: 32px;
287 padding: 0.42rem 1rem;
288 border-radius: 7px;
289 cursor: pointer;
290 border: 1px solid transparent;
291 font-size: 0.84rem;
292 font-family: "Rubik", Arial, Helvetica, sans-serif;
293 transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
294 }
295 .btn.slim {
296 padding: 0.2em 0.4em;
297 }
298 .btn.primary {
299 border-color: color-mix(in srgb, var(--color-primary) 42%, var(--color-border));
300 background: color-mix(in srgb, #2196f3 78%, var(--color-panel));
301 color: white;
302 width: fit-content;
303 align-items: center;
304 display: inline-flex;
305 }
306 .btn:disabled {
307 cursor: not-allowed;
308 }
309 .btn-ok {
310 border-color: color-mix(in srgb, #4248f1 56%, var(--color-border));
311 background: color-mix(in srgb, #4248f1 86%, var(--color-panel));
312 color: white;
313 display: inline-flex;
314 align-items: center;
315 gap: 0.5rem;
316 transition: background 0.3s ease-in-out;
317 }
318 .btn-ok > svg {
319 max-width: 20px;
320 }
321 .btn-ok:hover {
322 border-color: color-mix(in srgb, #656bff 70%, var(--color-border));
323 background: #353bc5;
324 }
325 .btn-ok:active {
326 background: #2b309c;
327 }
328 .btn-cancel {
329 background: transparent;
330 color: var(--color-accent);
331 border: 1px solid color-mix(in srgb, var(--color-accent) 82%, var(--color-border));
332 transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
333 }
334 .btn-cancel:hover {
335 background: var(--color-accent);
336 color: var(--color-text);
337 }
338 .btn-cancel:active {
339 background: #a94658;
340 color: var(--color-text);
341 }
342 .light-mode .btn-cancel:hover {
343 background: var(--color-accent);
344 color: var(--color-background);
345 }
346 .light-mode .btn-cancel:active {
347 background: #a94658;
348 color: var(--color-background);
349 }
350 .btn-field {
351 border-color: color-mix(in srgb, #2196f3 48%, var(--color-border));
352 background: color-mix(in srgb, #2196f3 78%, var(--color-panel));
353 color: white;
354 width: fit-content;
355 }
356 .btn-field:disabled {
357 background: #ccc;
358 cursor: not-allowed;
359 }
360
361 /* Editor Toolbar */
362 .editor-toolbar {
363 display: flex;
364 align-items: center;
365 gap: 1rem;
366 padding: 0.5rem 1rem;
367 }
368 .toolbar-group {
369 display: flex;
370 align-items: center;
371 gap: 0.5rem;
372 padding: 0 0.5rem;
373 border-right: 1px solid var(--color-border);
374 }
375 .toolbar-group:last-child {
376 border-right: none;
377 }
378 .toolbar-button {
379 display: flex;
380 align-items: center;
381 justify-content: center;
382 width: 32px;
383 height: 32px;
384 padding: 0.4rem;
385 background: transparent;
386 border: 1px solid transparent;
387 border-radius: 4px;
388 color: var(--color-text);
389 opacity: 0.7;
390 cursor: pointer;
391 transition: all 0.2s ease;
392 }
393 .toolbar-button svg {
394 width: 18px;
395 height: 18px;
396 }
397 .toolbar-button:hover {
398 opacity: 1;
399 background-color: rgba(255, 255, 255, 0.1);
400 }
401 .toolbar-button:active {
402 transform: translateY(1px);
403 }
404 .toolbar-button.active {
405 background-color: rgba(255, 255, 255, 0.15);
406 border-color: var(--color-border);
407 opacity: 1;
408 }
409 .toolbar-button:disabled {
410 opacity: 0.3;
411 cursor: not-allowed;
412 }
413 .toolbar-button:disabled:hover {
414 background-color: transparent;
415 }
416
417 /* Range Input Styles */
418 input[type="range"] {
419 width: 100%;
420 cursor: pointer;
421 height: 4px;
422 -webkit-appearance: none;
423 appearance: none;
424 background: var(--color-border);
425 border-radius: 2px;
426 outline: none;
427 transition: all 0.2s ease;
428 }
429 input[type="range"]::-webkit-slider-thumb {
430 -webkit-appearance: none;
431 appearance: none;
432 width: 16px;
433 height: 16px;
434 background: var(--color-primary);
435 border-radius: 50%;
436 cursor: pointer;
437 transition: all 0.2s ease;
438 }
439
440 input[type="range"]::-moz-range-thumb {
441 width: 16px;
442 height: 16px;
443 background: var(--color-primary);
444 border-radius: 50%;
445 cursor: pointer;
446 border: none;
447 transition: all 0.2s ease;
448 }
449
450 .range-value {
451 min-width: 3em;
452 text-align: right;
453 }
454
455 /* Light mode overrides */
456 .light-mode input[type="range"]::-webkit-slider-thumb {
457 background: #777;
458 }
459 .light-mode input[type="range"]::-moz-range-thumb {
460 background: #777;
461 }
462
463 /* Responsive Design */
464 @media (max-width: 1280px) {
465 .modal-container {
466 width: 95%;
467 min-width: unset; /* Remove min-width constraints */
468 max-width: 95%;
469 }
470 .section {
471 overflow-x: auto;
472 }
473 }
474 @media (max-width: 768px) {
475 .modal-header {
476 padding-left: 1.1rem;
477 text-wrap: nowrap;
478 }
479 .modal-content {
480 padding: 0.5rem;
481 overflow-y: auto;
482 flex-grow: 1;
483 }
484 .modal-footer {
485 padding: var(--spacing-sm) !important;
486 }
487 .section {
488 margin-bottom: 1.5rem;
489 padding: 1rem;
490 /* padding-bottom: 0; */
491 border: 1px solid var(--color-border);
492 border-radius: 0.5rem;
493 }
494 #buttons-container {
495 margin: 0 auto;
496 }
497 .btn {
498 padding: 0.5rem 1.7rem;
499 }
500 }
501 @media (max-width: 540px) {
502 .modal-header h2 {
503 font-size: var(--font-size-normal);
504 margin: 0;
505 }
506 #buttons-container {
507 max-height: 50px;
508 }
509 .btn {
510 text-wrap: wrap;
511 font-size: var(--font-size-small);
512 }
513 .btn-upload {
514 margin: 0 auto;
515 gap: 0.5rem;
516 align-items: center;
517 }
518 .btn-upload > svg {
519 width: 20px;
520 }
521 }
522
523 .loading {
524 --loading-delay: 500ms;
525 width: calc(100% - 4rem);
526 max-width: 1200px;
527 min-height: 50px;
528 border-radius: 12px;
529 background: var(--color-border);
530 position: relative;
531 overflow: hidden;
532 margin: 2rem auto;
533 opacity: 0;
534 animation: fadeIn 500ms ease-out var(--loading-delay) forwards;
535 }
536
537 @keyframes fadeIn {
538 0% {
539 opacity: 0;
540 }
541 100% {
542 opacity: 1;
543 }
544 }
545
546 .loading::before {
547 content: "";
548 position: absolute;
549 top: 0;
550 left: 0;
551 width: 100%;
552 height: 100%;
553 background: linear-gradient(
554 90deg,
555 var(--color-background),
556 var(--color-border),
557 var(--color-background)
558 );
559 opacity: 0;
560 animation:
561 shimmer 2s linear var(--loading-delay) infinite,
562 fadeIn 0s linear var(--loading-delay) forwards;
563 background-size: 200% 100%;
564 }
565
566 @keyframes shimmer {
567 0% {
568 background-position: 200% 0;
569 }
570 100% {
571 background-position: -200% 0;
572 }
573 }
574
575 /* Confirm Dialog */
576 .confirm-dialog-backdrop {
577 position: fixed;
578 top: 0;
579 left: 0;
580 right: 0;
581 bottom: 0;
582 background: rgba(0, 0, 0, 0.5);
583 display: flex;
584 align-items: center;
585 justify-content: center;
586 z-index: 10000;
587 opacity: 0;
588 transition: opacity 0.2s ease;
589 }
590
591 .confirm-dialog-backdrop.visible {
592 opacity: 1;
593 }
594
595 .confirm-dialog {
596 background: var(--color-panel);
597 border: 1px solid var(--color-border);
598 border-radius: 8px;
599 max-width: 450px;
600 width: 90%;
601 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
602 transform: scale(0.95);
603 transition: transform 0.2s ease;
604 }
605
606 .confirm-dialog-backdrop.visible .confirm-dialog {
607 transform: scale(1);
608 }
609
610 .confirm-dialog-header {
611 display: flex;
612 align-items: center;
613 gap: 0.75em;
614 padding: 1em 1.25em;
615 border-bottom: 1px solid var(--color-border);
616 }
617
618 .confirm-dialog-icon {
619 font-size: 1.5em;
620 }
621
622 .confirm-dialog-title {
623 font-size: 1.1em;
624 font-weight: 600;
625 color: var(--color-text);
626 }
627
628 .confirm-dialog-body {
629 padding: 1.25em;
630 color: var(--color-text);
631 line-height: 1.6;
632 font-size: 0.95em;
633 }
634
635 .confirm-dialog-body ul {
636 margin: 0.75em 0;
637 padding-left: 1.5em;
638 }
639
640 .confirm-dialog-body p {
641 margin: 0;
642 }
643
644 .confirm-dialog-footer {
645 display: flex;
646 justify-content: flex-end;
647 gap: 0.75em;
648 padding: 1em 1.25em;
649 border-top: 1px solid var(--color-border);
650 }
651
652 .confirm-dialog-footer .confirm-dialog-install-button {
653 padding-inline: 1.1rem;
654 }
655
656 .confirm-dialog-footer .confirm-dialog-plugin-scan-button {
657 padding-inline: 1.65rem;
658 font-size: 1rem;
659 }