christy-richtext 1.0.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.
@@ -0,0 +1,876 @@
1
+
2
+ /* === Wrapper === */
3
+ .crt-editor-wrapper {
4
+ display: flex;
5
+ flex-direction: column;
6
+ border: 1px solid #d1d5db;
7
+ border-radius: 8px;
8
+ overflow: hidden;
9
+ background: #fff;
10
+ font-family: system-ui, -apple-system, sans-serif;
11
+ }
12
+
13
+ /* === Toolbar === */
14
+ .crt-toolbar {
15
+ display: flex;
16
+ flex-wrap: wrap;
17
+ align-items: center;
18
+ gap: 2px;
19
+ padding: 6px 8px;
20
+ background: linear-gradient(to bottom, #ffffff, #f3f4f6);
21
+ border-bottom: 1px solid #e5e7eb;
22
+ }
23
+ .crt-label {
24
+ font-size: 12px;
25
+ color: #6b7280;
26
+ padding: 0 2px;
27
+ white-space: nowrap;
28
+ }
29
+ .crt-toolbar-group--image {
30
+ background: #eff6ff;
31
+ border-radius: 6px;
32
+ padding: 2px 6px;
33
+ }
34
+ .crt-input-width {
35
+ width: 90px;
36
+ height: 26px;
37
+ padding: 0 6px;
38
+ border: 1px solid #d1d5db;
39
+ border-radius: 4px;
40
+ font-size: 12px;
41
+ outline: none;
42
+ background: #fff;
43
+ }
44
+ .crt-input-width:focus {
45
+ border-color: #2563eb;
46
+ }
47
+ .crt-btn--word {
48
+ background: #f0fdf4;
49
+ color: #15803d;
50
+ border: 1px solid #bbf7d0;
51
+ font-size: 12px;
52
+ padding: 0 8px;
53
+ }
54
+ .crt-btn--word:hover:not(:disabled) {
55
+ background: #dcfce7;
56
+ }
57
+ .crt-btn--word:disabled {
58
+ opacity: 0.55;
59
+ cursor: not-allowed;
60
+ }
61
+ .crt-toolbar-group {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: 2px;
65
+ }
66
+ .crt-divider {
67
+ width: 1px;
68
+ height: 20px;
69
+ background: #d1d5db;
70
+ margin: 0 4px;
71
+ }
72
+ .crt-btn {
73
+ display: inline-flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ min-width: 28px;
77
+ height: 28px;
78
+ padding: 0 6px;
79
+ border: none;
80
+ border-radius: 5px;
81
+ background: transparent;
82
+ color: #374151;
83
+ font-size: 13px;
84
+ cursor: pointer;
85
+ transition: background 0.15s, color 0.15s, box-shadow 0.15s;
86
+ white-space: nowrap;
87
+ }
88
+ .crt-btn:hover:not(:disabled) {
89
+ background: #e5e7eb;
90
+ color: #111827;
91
+ }
92
+ .crt-btn--active {
93
+ background: #dbeafe;
94
+ color: #1d4ed8;
95
+ box-shadow: inset 0 0 0 1px #bfdbfe;
96
+ }
97
+ .crt-btn:disabled {
98
+ opacity: 0.35;
99
+ cursor: not-allowed;
100
+ }
101
+
102
+ /* 圖片按鈕 */
103
+ .crt-btn--img {
104
+ background: #ede9fe;
105
+ color: #4b5563;
106
+ font-weight: 500;
107
+ }
108
+ .crt-btn--img:hover:not(:disabled) {
109
+ background: #ddd6fe;
110
+ color: #111827;
111
+ }
112
+
113
+ /* 連結按鈕 active 時藍色 */
114
+ .crt-btn--link-active {
115
+ background: #dbeafe;
116
+ color: #2563eb;
117
+ box-shadow: inset 0 0 0 1px #93c5fd;
118
+ }
119
+
120
+ /* 水平分隔線按鈕 */
121
+ .crt-btn--hr {
122
+ color: #9ca3af;
123
+ font-size: 16px;
124
+ }
125
+ .crt-btn--hr:hover:not(:disabled) {
126
+ color: #6b7280;
127
+ background: #f3f4f6;
128
+ }
129
+
130
+ /* 粗體 active — 深藍 */
131
+ .crt-btn--bold-active {
132
+ background: #dbeafe;
133
+ color: #1e40af;
134
+ box-shadow: inset 0 0 0 1px #bfdbfe;
135
+ font-weight: 700;
136
+ }
137
+
138
+ /* 斜體 active — 靛紫 */
139
+ .crt-btn--italic-active {
140
+ background: #ede9fe;
141
+ color: #6d28d9;
142
+ box-shadow: inset 0 0 0 1px #ddd6fe;
143
+ }
144
+
145
+ /* 底線 active — 天藍 */
146
+ .crt-btn--underline-active {
147
+ background: #e0f2fe;
148
+ color: #0369a1;
149
+ box-shadow: inset 0 0 0 1px #bae6fd;
150
+ }
151
+
152
+ /* 刪除線 active — 玫瑰 */
153
+ .crt-btn--strike-active {
154
+ background: #ffe4e6;
155
+ color: #be123c;
156
+ box-shadow: inset 0 0 0 1px #fecdd3;
157
+ }
158
+
159
+ /* Highlight active — 琥珀 */
160
+ .crt-btn--highlight-active {
161
+ background: #fef9c3;
162
+ color: #a16207;
163
+ box-shadow: inset 0 0 0 1px #fde68a;
164
+ }
165
+
166
+ /* 程式碼區塊 active — 石板 */
167
+ .crt-btn--code-active {
168
+ background: #f1f5f9;
169
+ color: #475569;
170
+ box-shadow: inset 0 0 0 1px #cbd5e1;
171
+ }
172
+
173
+ /* 引用 active — 橙棕 */
174
+ .crt-btn--bq-active {
175
+ background: #fff7ed;
176
+ color: #c2410c;
177
+ box-shadow: inset 0 0 0 1px #fed7aa;
178
+ }
179
+
180
+ /* 列表 active — 翠綠 */
181
+ .crt-btn--list-active {
182
+ background: #dcfce7;
183
+ color: #15803d;
184
+ box-shadow: inset 0 0 0 1px #bbf7d0;
185
+ }
186
+
187
+ /* 對齊按鈕 — 常態淡藍底 */
188
+ .crt-btn--align {
189
+ background: #f0f9ff;
190
+ min-width: 30px;
191
+ }
192
+ .crt-btn--align:hover:not(:disabled) {
193
+ background: #e0f2fe;
194
+ }
195
+
196
+ /* 對齊 active — 深藍 */
197
+ .crt-btn--align-active {
198
+ background: #bae6fd;
199
+ color: #0284c7;
200
+ box-shadow: inset 0 0 0 1px #7dd3fc;
201
+ }
202
+
203
+ /* 表格按鈕 */
204
+ .crt-btn--table {
205
+ color: #0f766e;
206
+ }
207
+ .crt-btn--table:hover:not(:disabled) {
208
+ background: #ccfbf1;
209
+ color: #0f766e;
210
+ }
211
+ .crt-select {
212
+ height: 28px;
213
+ padding: 0 4px;
214
+ border: 1px solid #d1d5db;
215
+ border-radius: 4px;
216
+ background: #fff;
217
+ font-size: 13px;
218
+ color: #374151;
219
+ cursor: pointer;
220
+ }
221
+ .crt-select--font {
222
+ max-width: 160px;
223
+ }
224
+ .crt-color-label:hover {
225
+ background: #e5e7eb;
226
+ }
227
+ .crt-color-input {
228
+ position: absolute;
229
+ width: 1px;
230
+ height: 1px;
231
+ opacity: 0;
232
+ cursor: pointer;
233
+ }
234
+
235
+ /* === Editor Content === */
236
+ .crt-editor-content {
237
+ flex: 1;
238
+ padding: 16px;
239
+ min-height: 200px;
240
+ outline: none;
241
+ overflow-y: auto;
242
+ }
243
+ .crt-editor-content .tiptap {
244
+ outline: none;
245
+ min-height: 180px;
246
+ font-size: 15px;
247
+ line-height: 1.7;
248
+ color: #111827;
249
+ }
250
+
251
+ /* 文繞圖 clearfix */
252
+ .crt-editor-content .tiptap::after {
253
+ content: '';
254
+ display: table;
255
+ clear: both;
256
+ }
257
+
258
+ /* 選取圖片 highlight */
259
+ .crt-editor-content .tiptap img.ProseMirror-selectednode {
260
+ outline: 2px solid #2563eb;
261
+ outline-offset: 2px;
262
+ }
263
+
264
+ /* Placeholder */
265
+ .crt-editor-content .tiptap p.is-editor-empty:first-child::before {
266
+ content: attr(data-placeholder);
267
+ color: #9ca3af;
268
+ float: left;
269
+ height: 0;
270
+ pointer-events: none;
271
+ }
272
+
273
+ /* Heading */
274
+ .crt-editor-content .tiptap h1 { font-size: 2em; font-weight: 700; margin: 0.5em 0;
275
+ }
276
+ .crt-editor-content .tiptap h2 { font-size: 1.6em; font-weight: 700; margin: 0.5em 0;
277
+ }
278
+ .crt-editor-content .tiptap h3 { font-size: 1.3em; font-weight: 700; margin: 0.5em 0;
279
+ }
280
+ .crt-editor-content .tiptap h4 { font-size: 1.15em; font-weight: 600; margin: 0.5em 0;
281
+ }
282
+ .crt-editor-content .tiptap h5 { font-size: 1em; font-weight: 600; margin: 0.5em 0;
283
+ }
284
+ .crt-editor-content .tiptap h6 { font-size: 0.9em; font-weight: 600; margin: 0.5em 0;
285
+ }
286
+
287
+ /* List */
288
+ .crt-editor-content .tiptap ul { list-style: disc; padding-left: 1.5em; margin: 0.5em 0;
289
+ }
290
+ .crt-editor-content .tiptap ol { list-style: decimal; padding-left: 1.5em; margin: 0.5em 0;
291
+ }
292
+
293
+ /* Blockquote */
294
+ .crt-editor-content .tiptap blockquote {
295
+ border-left: 4px solid #d1d5db;
296
+ padding: 0.6em 1em;
297
+ margin: 0.75em 0;
298
+ color: #6b7280;
299
+ border-radius: 0 4px 4px 0;
300
+ transition: border-left-color 0.2s, background-color 0.2s;
301
+ }
302
+
303
+ /* 引用顏色選擇器 */
304
+ .crt-bq-color-group {
305
+ display: flex;
306
+ align-items: center;
307
+ gap: 4px;
308
+ background: #fef9c3;
309
+ border: 1px solid #fde68a;
310
+ border-radius: 6px;
311
+ padding: 3px 6px;
312
+ }
313
+ .crt-bq-color-btn {
314
+ display: inline-flex;
315
+ align-items: center;
316
+ gap: 4px;
317
+ height: 28px;
318
+ padding: 0 8px;
319
+ border-radius: 4px;
320
+ cursor: pointer;
321
+ font-size: 12px;
322
+ color: #374151;
323
+ position: relative;
324
+ white-space: nowrap;
325
+ border: 1px solid #e5e7eb;
326
+ background: #fff;
327
+ }
328
+ .crt-bq-color-btn:hover {
329
+ background: #f3f4f6;
330
+ }
331
+ .crt-bq-color-preview {
332
+ display: inline-block;
333
+ width: 14px;
334
+ height: 14px;
335
+ border-radius: 2px;
336
+ border: 1px solid rgba(0,0,0,0.15);
337
+ flex-shrink: 0;
338
+ }
339
+ .crt-bq-color-text {
340
+ font-size: 12px;
341
+ }
342
+ .crt-bq-reset-btn {
343
+ height: 28px;
344
+ padding: 0 8px;
345
+ border-radius: 4px;
346
+ border: 1px solid #e5e7eb;
347
+ background: #fff;
348
+ font-size: 12px;
349
+ color: #6b7280;
350
+ cursor: pointer;
351
+ white-space: nowrap;
352
+ }
353
+ .crt-bq-reset-btn:hover {
354
+ background: #f3f4f6;
355
+ color: #374151;
356
+ }
357
+
358
+ /* Code */
359
+ .crt-editor-content .tiptap code {
360
+ background: #f3f4f6;
361
+ border-radius: 3px;
362
+ padding: 0.1em 0.3em;
363
+ font-size: 0.9em;
364
+ }
365
+ .crt-editor-content .tiptap pre {
366
+ background: #1e293b;
367
+ color: #f1f5f9;
368
+ border-radius: 6px;
369
+ padding: 1em;
370
+ overflow-x: auto;
371
+ margin: 0.75em 0;
372
+ }
373
+ .crt-editor-content .tiptap pre code {
374
+ background: none;
375
+ color: inherit;
376
+ padding: 0;
377
+ }
378
+
379
+ /* === Editor Content === */
380
+ .crt-editor-content {
381
+ flex: 1;
382
+ padding: 16px;
383
+ min-height: 200px;
384
+ outline: none;
385
+ overflow-y: auto;
386
+ }
387
+ .crt-editor-content .tiptap {
388
+ outline: none;
389
+ min-height: 180px;
390
+ font-size: 15px;
391
+ line-height: 1.7;
392
+ color: #111827;
393
+ }
394
+
395
+ /* 文繞圖 clearfix */
396
+ .crt-editor-content .tiptap::after {
397
+ content: '';
398
+ display: table;
399
+ clear: both;
400
+ }
401
+
402
+ /* 選取圖片 highlight */
403
+ .crt-editor-content .tiptap img.ProseMirror-selectednode {
404
+ outline: 2px solid #2563eb;
405
+ outline-offset: 2px;
406
+ }
407
+
408
+ /* Placeholder */
409
+ .crt-editor-content .tiptap p.is-editor-empty:first-child::before {
410
+ content: attr(data-placeholder);
411
+ color: #9ca3af;
412
+ float: left;
413
+ height: 0;
414
+ pointer-events: none;
415
+ }
416
+
417
+ /* Heading */
418
+ .crt-editor-content .tiptap h1 { font-size: 2em; font-weight: 700; margin: 0.5em 0;
419
+ }
420
+ .crt-editor-content .tiptap h2 { font-size: 1.6em; font-weight: 700; margin: 0.5em 0;
421
+ }
422
+ .crt-editor-content .tiptap h3 { font-size: 1.3em; font-weight: 700; margin: 0.5em 0;
423
+ }
424
+ .crt-editor-content .tiptap h4 { font-size: 1.15em; font-weight: 600; margin: 0.5em 0;
425
+ }
426
+ .crt-editor-content .tiptap h5 { font-size: 1em; font-weight: 600; margin: 0.5em 0;
427
+ }
428
+ .crt-editor-content .tiptap h6 { font-size: 0.9em; font-weight: 600; margin: 0.5em 0;
429
+ }
430
+
431
+ /* List */
432
+ .crt-editor-content .tiptap ul { list-style: disc; padding-left: 1.5em; margin: 0.5em 0;
433
+ }
434
+ .crt-editor-content .tiptap ol { list-style: decimal; padding-left: 1.5em; margin: 0.5em 0;
435
+ }
436
+
437
+ /* Blockquote */
438
+ .crt-editor-content .tiptap blockquote {
439
+ border-left: 4px solid #d1d5db;
440
+ padding: 0.6em 1em;
441
+ margin: 0.75em 0;
442
+ color: #6b7280;
443
+ border-radius: 0 4px 4px 0;
444
+ transition: border-left-color 0.2s, background-color 0.2s;
445
+ }
446
+
447
+ /* 引用顏色選擇器 */
448
+ .crt-bq-color-group {
449
+ display: flex;
450
+ align-items: center;
451
+ gap: 4px;
452
+ background: #fef9c3;
453
+ border: 1px solid #fde68a;
454
+ border-radius: 6px;
455
+ padding: 3px 6px;
456
+ }
457
+ .crt-bq-color-btn {
458
+ display: inline-flex;
459
+ align-items: center;
460
+ gap: 4px;
461
+ height: 28px;
462
+ padding: 0 8px;
463
+ border-radius: 4px;
464
+ cursor: pointer;
465
+ font-size: 12px;
466
+ color: #374151;
467
+ position: relative;
468
+ white-space: nowrap;
469
+ border: 1px solid #e5e7eb;
470
+ background: #fff;
471
+ }
472
+ .crt-bq-color-btn:hover {
473
+ background: #f3f4f6;
474
+ }
475
+ .crt-bq-color-preview {
476
+ display: inline-block;
477
+ width: 14px;
478
+ height: 14px;
479
+ border-radius: 2px;
480
+ border: 1px solid rgba(0,0,0,0.15);
481
+ flex-shrink: 0;
482
+ }
483
+ .crt-bq-color-text {
484
+ font-size: 12px;
485
+ }
486
+
487
+ /* === Editor Content === */
488
+ .crt-editor-content {
489
+ flex: 1;
490
+ padding: 16px;
491
+ min-height: 200px;
492
+ outline: none;
493
+ overflow-y: auto;
494
+ }
495
+ .crt-editor-content .tiptap {
496
+ outline: none;
497
+ min-height: 180px;
498
+ font-size: 15px;
499
+ line-height: 1.7;
500
+ color: #111827;
501
+ }
502
+
503
+ /* 文繞圖 clearfix */
504
+ .crt-editor-content .tiptap::after {
505
+ content: '';
506
+ display: table;
507
+ clear: both;
508
+ }
509
+
510
+ /* 選取圖片 highlight */
511
+ .crt-editor-content .tiptap img.ProseMirror-selectednode {
512
+ outline: 2px solid #2563eb;
513
+ outline-offset: 2px;
514
+ }
515
+
516
+ /* Placeholder */
517
+ .crt-editor-content .tiptap p.is-editor-empty:first-child::before {
518
+ content: attr(data-placeholder);
519
+ color: #9ca3af;
520
+ float: left;
521
+ height: 0;
522
+ pointer-events: none;
523
+ }
524
+
525
+ /* Heading */
526
+ .crt-editor-content .tiptap h1 { font-size: 2em; font-weight: 700; margin: 0.5em 0;
527
+ }
528
+ .crt-editor-content .tiptap h2 { font-size: 1.6em; font-weight: 700; margin: 0.5em 0;
529
+ }
530
+ .crt-editor-content .tiptap h3 { font-size: 1.3em; font-weight: 700; margin: 0.5em 0;
531
+ }
532
+ .crt-editor-content .tiptap h4 { font-size: 1.15em; font-weight: 600; margin: 0.5em 0;
533
+ }
534
+ .crt-editor-content .tiptap h5 { font-size: 1em; font-weight: 600; margin: 0.5em 0;
535
+ }
536
+ .crt-editor-content .tiptap h6 { font-size: 0.9em; font-weight: 600; margin: 0.5em 0;
537
+ }
538
+
539
+ /* List */
540
+ .crt-editor-content .tiptap ul { list-style: disc; padding-left: 1.5em; margin: 0.5em 0;
541
+ }
542
+ .crt-editor-content .tiptap ol { list-style: decimal; padding-left: 1.5em; margin: 0.5em 0;
543
+ }
544
+
545
+ /* Blockquote */
546
+ .crt-editor-content .tiptap blockquote {
547
+ border-left: 4px solid #d1d5db;
548
+ padding: 0.6em 1em;
549
+ margin: 0.75em 0;
550
+ color: #6b7280;
551
+ border-radius: 0 4px 4px 0;
552
+ transition: border-left-color 0.2s, background-color 0.2s;
553
+ }
554
+
555
+ /* Code */
556
+ .crt-editor-content .tiptap code {
557
+ background: #f3f4f6;
558
+ border-radius: 3px;
559
+ padding: 2px 6px;
560
+ font-family: 'Fira Code', 'Courier New', monospace;
561
+ font-size: 0.875em;
562
+ color: #e5007a;
563
+ background: #f3f4f6;
564
+ }
565
+ .crt-editor-content .tiptap pre {
566
+ background: #1e1e2e;
567
+ color: #cdd6f4;
568
+ border-radius: 6px;
569
+ padding: 1em 1.2em;
570
+ overflow-x: auto;
571
+ font-size: 0.875em;
572
+ line-height: 1.6;
573
+ margin: 0.75em 0;
574
+ }
575
+ .crt-editor-content .tiptap pre code {
576
+ background: none;
577
+ color: inherit;
578
+ padding: 0;
579
+ font-size: inherit;
580
+ }
581
+
582
+ /* Link */
583
+ .crt-editor-content .tiptap a {
584
+ color: #2563eb;
585
+ text-decoration: underline;
586
+ cursor: pointer;
587
+ }
588
+
589
+ /* Table */
590
+ .crt-editor-content .tiptap table {
591
+ border-collapse: collapse;
592
+ width: 100%;
593
+ margin: 0.75em 0;
594
+ }
595
+ .crt-editor-content .tiptap table th,
596
+ .crt-editor-content .tiptap table td {
597
+ border: 1px solid #d1d5db;
598
+ padding: 8px 12px;
599
+ min-width: 60px;
600
+ }
601
+ .crt-editor-content .tiptap table th {
602
+ background: #f3f4f6;
603
+ font-weight: 600;
604
+ }
605
+ .crt-editor-content .tiptap .selectedCell::after {
606
+ background: #dbeafe;
607
+ opacity: 0.5;
608
+ content: '';
609
+ position: absolute;
610
+ inset: 0;
611
+ pointer-events: none;
612
+ }
613
+
614
+ /* === Word Count === */
615
+ .crt-word-count {
616
+ text-align: right;
617
+ font-size: 12px;
618
+ color: #9ca3af;
619
+ padding: 4px 12px;
620
+ border-top: 1px solid #f3f4f6;
621
+ background: #f9fafb;
622
+ }
623
+
624
+ /* === Dialog === */
625
+ .crt-dialog-overlay {
626
+ position: fixed;
627
+ inset: 0;
628
+ background: rgba(0, 0, 0, 0.35);
629
+ display: flex;
630
+ align-items: center;
631
+ justify-content: center;
632
+ z-index: 9999;
633
+ }
634
+ .crt-dialog {
635
+ background: #fff;
636
+ border-radius: 10px;
637
+ padding: 24px;
638
+ width: 360px;
639
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
640
+ }
641
+ .crt-dialog-title {
642
+ font-size: 16px;
643
+ font-weight: 600;
644
+ margin: 0 0 14px;
645
+ color: #111827;
646
+ }
647
+ .crt-dialog-input {
648
+ width: 100%;
649
+ box-sizing: border-box;
650
+ border: 1px solid #d1d5db;
651
+ border-radius: 6px;
652
+ padding: 8px 12px;
653
+ font-size: 14px;
654
+ outline: none;
655
+ transition: border-color 0.15s;
656
+ }
657
+ .crt-dialog-input:focus {
658
+ border-color: #2563eb;
659
+ }
660
+ .crt-dialog-actions {
661
+ display: flex;
662
+ justify-content: flex-end;
663
+ gap: 8px;
664
+ margin-top: 16px;
665
+ }
666
+ .crt-dialog-btn {
667
+ padding: 7px 18px;
668
+ border-radius: 6px;
669
+ border: none;
670
+ font-size: 14px;
671
+ cursor: pointer;
672
+ transition: background 0.15s;
673
+ }
674
+ .crt-dialog-btn--cancel {
675
+ background: #f3f4f6;
676
+ color: #374151;
677
+ }
678
+ .crt-dialog-btn--cancel:hover {
679
+ background: #e5e7eb;
680
+ }
681
+ .crt-dialog-btn--confirm {
682
+ background: #2563eb;
683
+ color: #fff;
684
+ }
685
+ .crt-dialog-btn--confirm:hover {
686
+ background: #1d4ed8;
687
+ }
688
+
689
+ /* === Image Dialog 分頁 === */
690
+ .crt-dialog--image {
691
+ width: 440px;
692
+ }
693
+ .crt-img-tabs {
694
+ display: flex;
695
+ gap: 4px;
696
+ margin-bottom: 16px;
697
+ border-bottom: 2px solid #e5e7eb;
698
+ padding-bottom: 0;
699
+ }
700
+ .crt-img-tab {
701
+ padding: 7px 16px;
702
+ font-size: 14px;
703
+ border: none;
704
+ background: transparent;
705
+ color: #6b7280;
706
+ cursor: pointer;
707
+ border-bottom: 2px solid transparent;
708
+ margin-bottom: -2px;
709
+ border-radius: 4px 4px 0 0;
710
+ transition: color 0.15s, border-color 0.15s;
711
+ }
712
+ .crt-img-tab:hover {
713
+ color: #374151;
714
+ background: #f9fafb;
715
+ }
716
+ .crt-img-tab--active {
717
+ color: #2563eb;
718
+ border-bottom-color: #2563eb;
719
+ font-weight: 600;
720
+ }
721
+ .crt-img-tab-panel {
722
+ padding-top: 4px;
723
+ }
724
+ .crt-drop-zone {
725
+ border: 2px dashed #d1d5db;
726
+ border-radius: 10px;
727
+ padding: 32px 20px;
728
+ text-align: center;
729
+ cursor: pointer;
730
+ transition: border-color 0.15s, background 0.15s;
731
+ background: #f9fafb;
732
+ }
733
+ .crt-drop-zone:hover,
734
+ .crt-drop-zone--dragging {
735
+ border-color: #2563eb;
736
+ background: #eff6ff;
737
+ }
738
+ .crt-drop-zone-inner {
739
+ pointer-events: none;
740
+ display: flex;
741
+ flex-direction: column;
742
+ align-items: center;
743
+ gap: 6px;
744
+ }
745
+ .crt-drop-icon {
746
+ font-size: 36px;
747
+ line-height: 1;
748
+ display: block;
749
+ margin-bottom: 4px;
750
+ }
751
+ .crt-drop-hint {
752
+ margin: 0;
753
+ font-size: 14px;
754
+ color: #374151;
755
+ line-height: 1.5;
756
+ }
757
+ .crt-drop-hint--sub {
758
+ font-size: 12px;
759
+ color: #9ca3af;
760
+ }
761
+ .crt-upload-error {
762
+ color: #dc2626;
763
+ font-size: 13px;
764
+ margin: 8px 0 0;
765
+ }
766
+
767
+ /* === Toolbar 按鈕顏色 === */
768
+ .crt-btn--bold-active {
769
+ background: #dbeafe;
770
+ color: #1e40af;
771
+ box-shadow: inset 0 0 0 1px #bfdbfe;
772
+ font-weight: 700;
773
+ }
774
+ .crt-btn--italic-active {
775
+ background: #ede9fe;
776
+ color: #6d28d9;
777
+ box-shadow: inset 0 0 0 1px #ddd6fe;
778
+ }
779
+ .crt-btn--underline-active {
780
+ background: #e0f2fe;
781
+ color: #0369a1;
782
+ box-shadow: inset 0 0 0 1px #bae6fd;
783
+ }
784
+ .crt-btn--strike-active {
785
+ background: #ffe4e6;
786
+ color: #be123c;
787
+ box-shadow: inset 0 0 0 1px #fecdd3;
788
+ }
789
+ .crt-btn--highlight-active {
790
+ background: #fef9c3;
791
+ color: #a16207;
792
+ box-shadow: inset 0 0 0 1px #fde68a;
793
+ }
794
+ .crt-btn--code-active {
795
+ background: #f1f5f9;
796
+ color: #475569;
797
+ box-shadow: inset 0 0 0 1px #cbd5e1;
798
+ }
799
+ .crt-btn--bq-active {
800
+ background: #fff7ed;
801
+ color: #c2410c;
802
+ box-shadow: inset 0 0 0 1px #fed7aa;
803
+ }
804
+ .crt-btn--list-active {
805
+ background: #dcfce7;
806
+ color: #15803d;
807
+ box-shadow: inset 0 0 0 1px #bbf7d0;
808
+ }
809
+ .crt-btn--table {
810
+ color: #0f766e;
811
+ }
812
+ .crt-btn--table:hover:not(:disabled) {
813
+ background: #ccfbf1;
814
+ color: #0f766e;
815
+ }
816
+ .crt-btn--img {
817
+ background: #ede9fe;
818
+ color: #7c3aed;
819
+ font-weight: 500;
820
+ }
821
+ .crt-btn--img:hover:not(:disabled) {
822
+ background: #ddd6fe;
823
+ color: #6d28d9;
824
+ }
825
+ .crt-btn--link-active {
826
+ background: #dbeafe;
827
+ color: #2563eb;
828
+ box-shadow: inset 0 0 0 1px #93c5fd;
829
+ }
830
+ .crt-btn--hr {
831
+ color: #9ca3af;
832
+ font-size: 16px;
833
+ }
834
+ .crt-btn--hr:hover:not(:disabled) {
835
+ color: #6b7280;
836
+ background: #f3f4f6;
837
+ }
838
+
839
+ /* === Highlight Icon(螢光筆劃過 A)=== */
840
+ .crt-highlight-icon {
841
+ display: inline-block;
842
+ font-weight: 700;
843
+ font-size: 13px;
844
+ font-style: normal;
845
+ color: #374151;
846
+ background: linear-gradient(transparent 45%, #fde047 45%, #fde047 90%, transparent 90%);
847
+ padding: 0 2px;
848
+ line-height: 1.4;
849
+ }
850
+ .crt-btn--highlight-active .crt-highlight-icon {
851
+ background: linear-gradient(transparent 45%, #f59e0b 45%, #f59e0b 90%, transparent 90%);
852
+ color: #111827;
853
+ }
854
+
855
+ /* === Align Icon(CSS 線條模擬)=== */
856
+ .crt-align-icon {
857
+ display: flex;
858
+ flex-direction: column;
859
+ gap: 2.5px;
860
+ width: 16px;
861
+ pointer-events: none;
862
+ }
863
+ .crt-align-icon span {
864
+ display: block;
865
+ height: 2px;
866
+ background: currentColor;
867
+ border-radius: 1px;
868
+ width: 100%;
869
+ opacity: 0.75;
870
+ }
871
+
872
+ /* === 隱藏 file input === */
873
+ .crt-file-input {
874
+ display: none;
875
+ }
876
+ /*$vite$:1*/