File size: 18,744 Bytes
9186425
 
 
 
 
 
 
 
 
 
 
f36945f
a294e14
 
f36945f
9186425
 
f6180c8
 
 
 
9186425
 
 
 
 
 
 
 
 
 
 
6848520
 
9186425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c06298e
445b7ab
9186425
 
 
445b7ab
 
9186425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bedaaff
 
 
 
 
 
6848520
 
562142e
f36945f
c4401df
 
 
6848520
 
 
 
 
f36945f
f6180c8
6848520
f36945f
c4401df
 
 
 
 
 
 
f36945f
562142e
f36945f
c4401df
f36945f
562142e
c4401df
562142e
 
 
 
f6180c8
 
 
 
 
 
f36945f
f6180c8
 
 
 
 
 
6848520
 
f36945f
52fd957
 
 
6848520
 
 
c4401df
6848520
 
52fd957
 
 
6848520
 
 
374ce0c
6848520
562142e
 
 
 
 
 
 
 
c4401df
562142e
 
a294e14
562142e
 
a294e14
562142e
 
 
 
 
 
 
 
f36945f
 
 
 
 
 
a294e14
562142e
f36945f
562142e
d443c93
 
374ce0c
a294e14
 
 
 
 
 
 
 
d443c93
 
 
 
 
 
 
a294e14
 
 
c4401df
f36945f
 
 
 
 
 
 
374ce0c
f36945f
 
 
 
374ce0c
562142e
 
 
 
f36945f
 
 
 
 
a294e14
d443c93
f36945f
a294e14
374ce0c
 
a294e14
 
 
f36945f
 
d443c93
f36945f
a294e14
6848520
374ce0c
a294e14
f36945f
 
562142e
f36945f
 
 
 
 
 
 
 
562142e
f36945f
562142e
 
 
 
 
f36945f
562142e
 
 
 
 
 
f36945f
 
562142e
f36945f
562142e
 
c4401df
f36945f
 
 
 
 
374ce0c
 
6848520
 
 
374ce0c
6848520
 
 
 
 
 
0e5af6a
 
 
52fd957
 
 
 
d443c93
a294e14
 
 
c4401df
 
 
52fd957
 
 
 
 
0e5af6a
52fd957
 
0e5af6a
52fd957
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e5af6a
a294e14
c4401df
0e5af6a
 
 
 
 
 
 
 
 
c4401df
0e5af6a
c4401df
0e5af6a
 
c4401df
0e5af6a
c4401df
0e5af6a
 
 
c4401df
0e5af6a
c4401df
 
 
0e5af6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c4401df
0e5af6a
 
 
c4401df
0e5af6a
 
 
 
 
 
 
 
 
 
 
 
c4401df
0e5af6a
 
 
 
 
 
 
 
 
 
 
c4401df
0e5af6a
 
 
 
 
 
c4401df
0e5af6a
 
 
 
 
 
 
 
 
 
 
 
a294e14
 
c4401df
 
 
 
 
 
 
 
 
 
 
d443c93
c4401df
 
 
 
d443c93
 
 
c4401df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e5af6a
c4401df
 
d443c93
c4401df
52fd957
 
 
 
d443c93
 
 
 
 
 
 
 
 
 
 
52fd957
 
d443c93
52fd957
 
b71c4e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
:root {
    --chatbot-color-light: #000000;
    --chatbot-color-dark: #FFFFFF;
    --chatbot-background-color-light: #F3F3F3;
    --chatbot-background-color-dark: #121111;
    --message-user-background-color-light: #95EC69;
    --message-user-background-color-dark: #26B561;
    --message-bot-background-color-light: #FFFFFF;
    --message-bot-background-color-dark: #2C2C2C;
    --switch-checkbox-color-light: #e5e7eb;
    --switch-checkbox-color-dark: #515151;

    --menu-width: 320px;
    --menu-background-fill: transparent;
    --toolbox-width: 280px;
}

body.popup-open {
    overflow: hidden;
}

.hideK {
    display: none;
}

#app-title {
    font-weight: var(--prose-header-text-weight);
    font-size: var(--text-xxl);
    line-height: 1.3;
    text-align: left;
    margin-top: 6px;
    white-space: nowrap;
    flex-direction: row;
    display: inline-flex;
}
#description {
    text-align: center;
    margin: 32px 0 4px 0;
}

/* 高级页面 */
#advanced-warning {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: center;
}

#netsetting-warning hr {
    margin-top: 0.5em;
    margin-bottom: 1em;
}

.view-only-textbox textarea {
    -webkit-text-fill-color: darkgray !important;
    cursor: not-allowed !important;
}

#footer {
    text-align: center;
}
#footer div {
    display: inline-block;
}
#footer .versions{
    font-size: 85%;
    opacity: 0.60;
}


#float-display {
    position: absolute;
    max-height: 30px;
}

.insert-block {
    position: relative;
    margin: 0;
    padding: 8px 12px;
    box-shadow: var(--block-shadow);
    border-width: var(--block-border-width);
    border-color: var(--block-border-color);
    border-radius: var(--block-radius);
    background: var(--block-background-fill);
    width: 100%;
    line-height: var(--line-sm);
    min-height: 2em;
}

/* status-display */
#status-display {
    display: flex;
    min-height: 2em;
    align-items: flex-end;
    justify-content: flex-end;
    transition: all 0.6s;
}
#status-display p {
    font-size: .85em;
    font-family: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", "Microsoft Yahei UI", "Microsoft Yahei", monospace;
    /* Windows下中文的monospace会fallback为新宋体,实在太丑,这里折中使用微软雅黑 */
    color: var(--body-text-color-subdued);
}


#submit-btn, #cancel-btn {
    height: 40px !important;
}
#submit-btn::before {
    content: url("data:image/svg+xml, %3Csvg width='21px' height='20px' viewBox='0 0 21 20' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='page' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='send' transform='translate(0.435849, 0.088463)' fill='%23FFFFFF' fill-rule='nonzero'%3E %3Cpath d='M0.579148261,0.0428666046 C0.301105539,-0.0961547561 -0.036517765,0.122307382 0.0032026237,0.420210298 L1.4927172,18.1553639 C1.5125774,18.4334066 1.79062012,18.5922882 2.04880264,18.4929872 L8.24518329,15.8913017 L11.6412765,19.7441794 C11.8597387,19.9825018 12.2370824,19.8832008 12.3165231,19.5852979 L13.9450591,13.4882182 L19.7839562,11.0255541 C20.0619989,10.8865327 20.0818591,10.4694687 19.7839562,10.3105871 L0.579148261,0.0428666046 Z M11.6138902,17.0883151 L9.85385903,14.7195502 L0.718169621,0.618812241 L12.69945,12.9346347 L11.6138902,17.0883151 Z' id='shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");
    height: 21px;
}
#cancel-btn::before {
    content: url("data:image/svg+xml,%3Csvg width='21px' height='21px' viewBox='0 0 21 21' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='pg' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M10.2072007,20.088463 C11.5727865,20.088463 12.8594566,19.8259823 14.067211,19.3010209 C15.2749653,18.7760595 16.3386126,18.0538087 17.2581528,17.1342685 C18.177693,16.2147282 18.8982283,15.1527965 19.4197586,13.9484733 C19.9412889,12.7441501 20.202054,11.4557644 20.202054,10.0833163 C20.202054,8.71773046 19.9395733,7.43106036 19.4146119,6.22330603 C18.8896505,5.01555169 18.1673997,3.95018885 17.2478595,3.0272175 C16.3283192,2.10424615 15.2646719,1.3837109 14.0569176,0.865611739 C12.8491633,0.34751258 11.5624932,0.088463 10.1969073,0.088463 C8.83132146,0.088463 7.54636692,0.34751258 6.34204371,0.865611739 C5.1377205,1.3837109 4.07407321,2.10424615 3.15110186,3.0272175 C2.22813051,3.95018885 1.5058797,5.01555169 0.984349419,6.22330603 C0.46281914,7.43106036 0.202054,8.71773046 0.202054,10.0833163 C0.202054,11.4557644 0.4645347,12.7441501 0.9894961,13.9484733 C1.5144575,15.1527965 2.23670831,16.2147282 3.15624854,17.1342685 C4.07578877,18.0538087 5.1377205,18.7760595 6.34204371,19.3010209 C7.54636692,19.8259823 8.83475258,20.088463 10.2072007,20.088463 Z M10.2072007,18.2562448 C9.07493099,18.2562448 8.01471483,18.0452309 7.0265522,17.6232031 C6.03838956,17.2011753 5.17031614,16.6161693 4.42233192,15.8681851 C3.6743477,15.1202009 3.09105726,14.2521274 2.67246059,13.2639648 C2.25386392,12.2758022 2.04456558,11.215586 2.04456558,10.0833163 C2.04456558,8.95104663 2.25386392,7.89083047 2.67246059,6.90266784 C3.09105726,5.9145052 3.6743477,5.04643178 4.42233192,4.29844756 C5.17031614,3.55046334 6.036674,2.9671729 7.02140552,2.54857623 C8.00613703,2.12997956 9.06463763,1.92068122 10.1969073,1.92068122 C11.329177,1.92068122 12.3911087,2.12997956 13.3827025,2.54857623 C14.3742962,2.9671729 15.2440852,3.55046334 15.9920694,4.29844756 C16.7400537,5.04643178 17.3233441,5.9145052 17.7419408,6.90266784 C18.1605374,7.89083047 18.3698358,8.95104663 18.3698358,10.0833163 C18.3698358,11.215586 18.1605374,12.2758022 17.7419408,13.2639648 C17.3233441,14.2521274 16.7400537,15.1202009 15.9920694,15.8681851 C15.2440852,16.6161693 14.3760118,17.2011753 13.3878492,17.6232031 C12.3996865,18.0452309 11.3394704,18.2562448 10.2072007,18.2562448 Z M7.65444721,13.6242324 L12.7496608,13.6242324 C13.0584616,13.6242324 13.3003556,13.5384544 13.4753427,13.3668984 C13.6503299,13.1953424 13.7378234,12.9585951 13.7378234,12.6566565 L13.7378234,7.49968276 C13.7378234,7.19774418 13.6503299,6.96099688 13.4753427,6.78944087 C13.3003556,6.61788486 13.0584616,6.53210685 12.7496608,6.53210685 L7.65444721,6.53210685 C7.33878414,6.53210685 7.09345904,6.61788486 6.91847191,6.78944087 C6.74348478,6.96099688 6.65599121,7.19774418 6.65599121,7.49968276 L6.65599121,12.6566565 C6.65599121,12.9585951 6.74348478,13.1953424 6.91847191,13.3668984 C7.09345904,13.5384544 7.33878414,13.6242324 7.65444721,13.6242324 Z' id='shape' fill='%23FF3B30' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");
    height: 21px;
}

#chatbot-buttons button {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* masks */
.chuanhu-mask, .chuanhu-side-mask {
    /* background-color: gray; */
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    /* background-color: transparent; */
}
.chuanhu-mask {
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.mask-blur {
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.chuanhu-side-mask {
    background-color: rgba(0, 0, 0, 0);
}
.chuanhu-top-mask {
    /* background-color: rgba(0, 0, 0, 0.0); */
    z-index: 10001;
}


#popup-wrapper {
    display: none;
    position: fixed;
    overflow: auto;
    top: 0;
    left: 0;
    z-index: 99999;
}
#popup-wrapper.showBox {
    display: grid;
    place-items: center;
}

#chuanhu-popup {
    display: none;
    z-index: 99999;
    width: 680px;
    height: 400px;
    padding: 0;
}
#chuanhu-popup.showBox {
    display: block;
    box-shadow: 0 2px 64px 4px rgba(0, 0, 0, 0.2);
}

#chuanhu-popup > .gradio-box {
    padding: 0;
}
.hideBox {
    display: none;
}


#chuanhu-header {
    position: fixed;
    top: 0;
    z-index: 1000;
    left: 0;
    right: 0;
    /* padding: 6px 64px; */
    background: var(--background-fill-primary);
    border-bottom: 1px solid var(--border-color-primary);

    @media screen and (max-width: 639px) {
        padding: 6px 16px;
    }
    @media screen and (min-width: 640px) {
        padding: 6px 24px;
    }
    /* @media screen and (min-width: 1024px) {
        padding: 6px 96px;
    } */
}
#chuanhu-header.under-box {
    z-index: 995 !important;
}

#chuanhu-body {
    flex-wrap: nowrap;
    gap: 0;
    overflow: hidden;
    display: inline-flex;
    justify-content: space-between;
    /* margin-top: 54px; */
    /* height: calc(100vh - 72px); */
    position: absolute;
    top: 65px;
    height: calc(100vh - 65px);
}

#chuanhu-area {
    flex: unset;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: center;
    overflow: hidden;
    flex-direction: row;
    padding-inline: 24px;
    /* margin: 16px; */
    /* border-radius: 24px; */
    background: var(--chatbot-background-color-light);
}
.dark #chuanhu-area {
    background: var(--chatbot-background-color-dark);
}
#chatbot-area {
    max-width: 1024px;
}
/* default invisible */
#menu-area, #toolbox-area {
    height: 0;
    width: 0;
    transition: width 0.3s ease;
    visibility: hidden;
    flex: unset;
    min-width: unset !important;
    display: flex;
    flex-shrink: 0;
    overflow: hidden;
    flex-wrap: nowrap;
}
#menu-area {
    border-radius: 0;
    background: var(--menu-background-fill);
}
#menu-area > div {
    width: var(--menu-width);
}
#menu-area.showSide {
    width: var(--menu-width);
    max-width: var(--menu-width);
    height: calc(100vh - 65px);
    visibility: visible;
    /* margin-right: 16px; */
}

#toolbox-area > div {
    width: var(--toolbox-width);
}
#toolbox-area.showSide {
    width: var(--toolbox-width);
    height: calc(100vh - 65px);
    visibility: visible;
    /* margin-left: 16px; */
}

/* When screen width <= 768 */
@media screen and (max-width: 767px) {
    #menu-area {
        position: fixed;
        transition: left 0.3s ease, visibility 0.1s ease;
        left: calc(0px - var(--menu-width));
        z-index: 9999;
        overflow: unset;
    }
    #menu-area.showSide {
        left: 0;
    }

    #toolbox-area {
        position: fixed;
        width: 100vw;
        transition: top 0.3s ease, visibility 0.1s ease;
        /* right: calc(0px - var(--toolbox-width)); */
        z-index: 10008;
        overflow: unset;
        top: 100vh;
        margin: 0;
    }
    #toolbox-area > div {
        width: 100vw;
        height: calc( 90vh - 48px );
    }
    #toolbox-area.showSide {
        width: 100vw;
        right: 0;
        top: calc( 10vh + 48px );
        margin: 0;
        box-shadow: 0 2px 64px 4px rgba(0, 0, 0, 0.2);
    }
    /* #menu-area.showSide, #toolbox-area.showSide {
        z-index: 9999;
    } */
}

/* .chuanhu-history-panel ul.options {
    position: relative;
    box-shadow: unset;
    overflow: hidden;
} */
.chuanhu-history-panel {
    height: 500px;
    overflow: auto;
    box-shadow: var(--shadow-drop-lg);
}

#chuanhu-popup > .gradio-box {
    height: 100%;
}
#chuanhu-popup > .gradio-box > .gradio-row:first-of-type {
    padding: 24px !important;
    border-bottom: 1.8px solid var(--border-color-primary);
}
#toolbox-area > .gradio-box > .gradio-row:first-of-type * ,
#chuanhu-popup > .gradio-box > .gradio-row:first-of-type * {
    margin: 0;
}

#toolbox-area > .gradio-box > .gradio-row > .close-btn,
#chuanhu-popup > .gradio-box > .gradio-row > .close-btn {
    max-width: 28px;
    display: flex;
    justify-content: flex-end;
}


#chuanhu-popup > .gradio-box > .gradio-tabs {
    display: block;
    height: 322px;
    /* margin: 16px 24px; */
}

#chuanhu-popup > .gradio-box > .gradio-tabs > div.tabitem {
    border: none;
    border-radius: 0;
    overflow: auto;
    height: 100%;
    padding: 16px 24px;
}
#chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav {
    float: left;
    display: block;
    border: none;
    padding: 16px;
    width: 180px;
    height: 100%;
    overflow: auto;
    background: var(--background-fill-secondary);
    border-bottom-left-radius: var(--block-radius);
    border-right: 1px solid var(--border-color-primary);
}
#chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav > button {
    display: block;
    border: none;
    border-radius: 6px;
    text-align: left;
    white-space: initial;
    width: 100%;
    /* height: 32px; */
    padding: 7px 12px;
}
#chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav > button.selected {
    background-color: var(--button-primary-background-fill);
    /* font-weight: bold; */
    color: var(--button-primary-text-color);
}

/* 小屏幕的tab样式 */
@media screen and (max-width: 767px) {
    
    #popup-wrapper.showBox {
        place-items: end;
    }
    #chuanhu-popup {
        width: 100vw;
        height: calc( 90vh - 48px );
        border-radius: inherit inherit 0 0;
    }
    #toolbox-area > .gradio-box > .gradio-row:first-of-type,
    #chuanhu-popup > .gradio-box > .gradio-row:first-of-type {
        padding: 18px 24px 0 !important;
        border-bottom: 0;
    }
    #toolbox-area > .gradio-box > .gradio-tabs,
    #chuanhu-popup > .gradio-box > .gradio-tabs {
        height: auto;
        width: 100vw;
        overflow: hidden;
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tabitem,
    #chuanhu-popup > .gradio-box > .gradio-tabs > div.tabitem {
        height: calc( 90vh - 48px - 46px - 45px );
        overflow-x: auto;
        border: none;
    }
    /* 下面是弃用方案:横条按钮tab */
    /* 
    #chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav {
        display: flex;
        margin: 0;
        padding: 12px 16px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-direction: row;
        flex-wrap: nowrap;
        border-radius: 8px;
        gap: 12px;
        width: 100%;
        height: auto;
        background: none;
    }
    #chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav > button {
        display: inline-block;
        border-style: none;
        border-radius: 6px;
        white-space: nowrap;
        width: auto;
        padding: 7px 32px;
        text-align: center;
        background: var(--background-fill-secondary);
    }
    */
    #toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav,
    #chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav {
        display: flex;
        margin: 0;
        padding: 6px 16px 0;
        overflow-x: auto;
        overflow-y: hidden;
        flex-direction: row;
        flex-wrap: nowrap;
        border-radius: 0;
        gap: 12px;
        width: 100%;
        height: auto;
        background: none;
        border-bottom: 1px solid var(--border-color-primary);
        align-items: baseline;
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav > button,
    #chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav > button {
        display: inline-block;
        position: relative;
        padding: 7px 6px;
        border: none;
        white-space: nowrap;
        width: auto;
        text-align: center;
        background: none;
        transition: font-size 0.3s ease-in-out;
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav > button.selected,
    #chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav > button.selected {
        background-color: unset !important;
        font-weight: bold;
        font-size: large;
        color: var(--body-text-color);
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav > button.selected::after,
    #chuanhu-popup > .gradio-box > .gradio-tabs > div.tab-nav > button.selected::after {
        content: "";
        background-color: var(--primary-600);
        height: 4px;
        width: 32%;
        border-radius: 4px;
        position: absolute;
        left: 50%;
        bottom: 1px;
        transform: translateX(-50%);
    }
}

/* 下面是大屏幕的 toolbox tab 样式 */
@media screen and (min-width: 768px) {
    #toolbox-area {
        border-left: 1px solid var(--border-color-primary);
    }
    #toolbox-area > .gradio-box > .gradio-row > .close-btn {
        display: none;
    }
    #toolbox-area > .gradio-box > .gradio-row:first-of-type {
        display: none;
    }
    #toolbox-area > .gradio-box > .gradio-tabs{
        height: 100%;
        width: var(--toolbox-width);
        overflow: hidden;
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tabitem {
        height: calc(100% - 40px);
        overflow-y: auto;
        border-style: none;
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav {
        display: flex;
        margin: 0;
        padding: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-direction: row;
        flex-wrap: nowrap;
        border-radius: 10px;
        gap: 4px;
        width: 100%;
        height: auto;
        background: var(--button-secondary-background-fill);
        border-bottom: 1px solid var(--border-color-primary);
        border:none;
        align-items: baseline;
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav > button {
        display: inline-block;
        position: relative;
        padding: 7px 12px;
        border: none;
        white-space: nowrap;
        width: auto;
        text-align: center;
        background: var(--button-secondary-background-fill);
        transition: font-size 0.3s ease-in-out;
    }
    #toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav > button.selected {
        background-color: var(--primary-600);
        font-weight: bold;
        /* font-size: large; */
        color: white;
    }
}

#toolbox-area > .gradio-box {
    padding: 0;
    height: 100%;
}
/* #chuanhu-popup ul.options {
    transform: translate(-50%, -50%);
} */

#chuanhu-history {
    height: calc(100vh - 65px - 65px);
    overflow-y: auto;
}
#chuanhu-func-nav {
    position: absolute;
    bottom: 0;
    /* background: black; */
    height: 64px;
    overflow: hidden;
}

#history-select-wrap {
    height: 600px;
    overflow: auto;
    overflow-x: hidden;
}

/* .main-body {
    flex-wrap: nowrap;
    gap: 0;
    overflow: hidden;
    display: inline-flex;
    /* margin-top: 54px; */
    /* height: calc(100vh - 72px); */
    /* position: absolute;
    top: 48px;
} */
/* 
.hide-body {
    display: none;
    top: -100vh;
    
}
#train-body {
    transition: top 0.3s ease-in-out, display 0.3s ease;
}

#chuanhu-body.hide-body {
    display: none;
    top: calc(100vh + 48px);
}
#chuanhu-body {
    transition: top 0.3s ease-in-out, display 0.3s ease;
}  */