oliver-aizip kai-aizip commited on
Commit
ee2fb63
·
verified ·
1 Parent(s): f85a3ff

Support nigh mode and mobile view (#3)

Browse files

- Support nigh mode and mobile view (d16a2f7c1b80bff8fb5cb1f2eb1e52ac4ec847e4)


Co-authored-by: Kai <kai-aizip@users.noreply.huggingface.co>

Files changed (1) hide show
  1. static/styles.css +254 -188
static/styles.css CHANGED
@@ -1,37 +1,65 @@
1
- /* Base styles */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  body, .gradio-container {
3
- background-color: #ffffff;
4
  font-size: 15px;
5
  overflow-x: hidden !important;
 
6
  }
7
 
8
- /* Main color variables for a simpler, more subdued theme */
9
- :root {
10
- --primary: #FF7D1E; /* Main orange accent - used sparingly */
11
- --primary-light: #FFF8F2; /* Very subtle orange tint */
12
- --primary-selected: #FFE8D5; /* More visible but still subtle orange for selections */
13
- --accent: #6B7280; /* Neutral gray for most UI elements */
14
- --text-dark: #333333; /* Dark text */
15
- --text-medium: #666666; /* Medium text */
16
- --border-light: #E6E6E6; /* Light border */
17
- --background-light: #F9F9F9; /* Light background */
18
- --highlight: #FFFBEB; /* Subtle highlight color */
19
- --model-a-color: #92B4F4; /* Model A color (blue) */
20
- --model-b-color: #F8ADA7; /* Model B color (red) */
21
- }
22
-
23
- /* Tab styling */
24
  .tabs {
25
  margin-top: 0 !important;
26
  }
27
 
28
- /* Style for tab buttons */
29
  .tab-nav {
30
  background-color: var(--background-light) !important;
31
  padding: 5px 10px !important;
32
  border-radius: 8px 8px 0 0 !important;
33
  border-bottom: 1px solid var(--border-light) !important;
34
  }
 
35
  .tab-nav button {
36
  font-size: 1.1em !important;
37
  font-weight: 600 !important;
@@ -43,30 +71,31 @@ body, .gradio-container {
43
  color: var(--text-medium) !important;
44
  transition: all 0.3s ease !important;
45
  }
 
46
  .tab-nav button.selected {
47
- background-color: white !important;
48
  color: var(--primary) !important;
49
  border-bottom: 2px solid var(--primary) !important;
50
  }
 
51
  .tab-nav button:hover:not(.selected) {
52
- background-color: rgba(255,255,255,0.5) !important;
53
  color: var(--text-dark) !important;
54
  }
55
 
56
- /* Tab content area */
57
  .tabitem {
58
  border: none !important;
59
  padding: 20px 10px !important;
60
  }
61
 
62
- /* Style the row containing the Query title */
63
  #query-title-row {
64
  margin: 0 !important;
65
  padding: 0 10px !important;
66
  display: flex !important;
67
  align-items: center !important;
68
- overflow: hidden !important;
69
- height: 40px !important;
 
70
  }
71
 
72
  #query-title-row h3 {
@@ -74,15 +103,16 @@ body, .gradio-container {
74
  padding: 0 !important;
75
  font-size: 1.2em !important;
76
  font-weight: 600 !important;
77
- line-height: 1.2 !important;
78
  flex-grow: 0 !important;
79
  flex-shrink: 0 !important;
80
- white-space: nowrap !important;
81
  overflow: visible !important;
82
  color: var(--text-dark) !important;
 
 
83
  }
84
 
85
- /* New query container layout with button next to box */
86
  #query-container {
87
  display: flex !important;
88
  align-items: stretch !important;
@@ -91,36 +121,61 @@ body, .gradio-container {
91
  overflow: visible !important;
92
  }
93
 
94
- /* Style the query box - optimized for long queries */
95
  .query-box-row {
96
- background-color: #F0F7FF !important; /* Light blue background */
97
  padding: 12px 15px !important;
98
  border-radius: 6px !important;
99
- border: 1px solid #D1E3F8 !important; /* Light blue border */
100
  margin: 0 !important;
101
  align-items: flex-start !important;
102
- flex: 1 1 50% !important;
103
- max-width: 50% !important;
104
  overflow: visible !important;
105
  display: flex !important;
106
  min-height: 50px !important;
107
  height: auto !important;
108
  }
109
 
110
- /* Context description styling - simple version */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  .context-description {
112
  background-color: transparent !important;
113
  padding: 0 15px !important;
114
  margin: 0 0 15px 0 !important;
115
  font-style: normal !important;
116
- color: var(--text-medium) !important; /* Lighter text color */
117
- font-size: 1.05em !important; /* Slightly larger */
118
  }
119
 
120
  .context-topic {
121
  display: inline-flex !important;
122
  align-items: center !important;
123
- background-color: transparent !important; /* No background */
124
  padding: 0 !important;
125
  border-radius: 0 !important;
126
  box-shadow: none !important;
@@ -128,11 +183,10 @@ body, .gradio-container {
128
 
129
  .topic-label {
130
  font-weight: 600 !important;
131
- color: var(--text-medium) !important; /* Lighter text color */
132
  margin-right: 6px !important;
133
  }
134
 
135
- /* Style the Get Random Question button */
136
  .query-button {
137
  padding: 0 20px !important;
138
  border-radius: 6px !important;
@@ -148,7 +202,7 @@ body, .gradio-container {
148
  min-height: 50px !important;
149
  white-space: nowrap !important;
150
  transition: all 0.2s ease !important;
151
- box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
152
  }
153
 
154
  .query-button:hover {
@@ -157,7 +211,6 @@ body, .gradio-container {
157
  border-color: var(--primary) !important;
158
  }
159
 
160
- /* Context header row with title and toggle button */
161
  #context-header-row {
162
  display: flex !important;
163
  justify-content: space-between !important;
@@ -166,7 +219,6 @@ body, .gradio-container {
166
  padding: 0 10px !important;
167
  }
168
 
169
- /* Context title styling */
170
  .context-title {
171
  margin: 0 !important;
172
  padding: 0 !important;
@@ -175,7 +227,6 @@ body, .gradio-container {
175
  color: var(--text-dark) !important;
176
  }
177
 
178
- /* Style for the context toggle button */
179
  .context-toggle-button {
180
  background-color: var(--background-light) !important;
181
  color: var(--text-medium) !important;
@@ -200,40 +251,11 @@ body, .gradio-container {
200
  border-color: var(--primary) !important;
201
  }
202
 
203
- /* Style the Markdown component displaying the query text */
204
- .query-text {
205
- padding: 0 !important;
206
- margin: 0 !important;
207
- background-color: transparent !important;
208
- border: none !important;
209
- overflow: visible !important;
210
- width: 100% !important;
211
- }
212
-
213
- /* Style the actual query text */
214
- .query-text p {
215
- font-size: 1.2em !important;
216
- font-weight: 600 !important;
217
- color: #2E5AAC !important; /* Blue for query text */
218
- line-height: 1.4 !important;
219
- margin: 0 !important;
220
- padding: 0 !important;
221
- background-color: transparent !important;
222
- border: none !important;
223
- overflow-wrap: break-word !important;
224
- word-wrap: break-word !important;
225
- word-break: normal !important;
226
- hyphens: auto !important;
227
- white-space: normal !important;
228
- }
229
-
230
- /* Container for context items */
231
  .context-items-container {
232
  border-radius: 6px;
233
  overflow: hidden;
234
  }
235
 
236
- /* Style for individual context items */
237
  .context-item {
238
  border: 1px solid var(--border-light);
239
  background-color: var(--background-light);
@@ -242,24 +264,21 @@ body, .gradio-container {
242
  margin-bottom: 8px;
243
  font-size: 1em;
244
  line-height: 1.5;
245
- box-shadow: 0 1px 2px rgba(0,0,0,0.03);
246
  }
247
 
248
- /* Style for primary context items */
249
  .primary-context {
250
- border-left: 3px solid #FFF0F0 !important; /* Light red border */
251
  }
252
 
253
- /* Style for chunk headers */
254
  .chunk-header {
255
  font-weight: 600;
256
- color: #2E5AAC;
257
  margin-bottom: 8px;
258
  padding-bottom: 5px;
259
- border-bottom: 1px solid #D1E3F8;
260
  }
261
 
262
- /* Style for highlighted text within context items */
263
  .highlight {
264
  background-color: #FFECB3 !important;
265
  padding: 0.1em 0.3em !important;
@@ -268,58 +287,27 @@ body, .gradio-container {
268
  color: #664500 !important;
269
  }
270
 
271
- /* Markdown table styling */
272
- .md-table {
273
- width: 100% !important;
274
- border-collapse: collapse !important;
275
- margin: 10px 0 !important;
276
- font-size: 0.95em !important;
277
- }
278
-
279
- .md-table th {
280
- background-color: #F0F7FF !important;
281
- color: #2E5AAC !important;
282
- font-weight: 600 !important;
283
- text-align: left !important;
284
- padding: 10px !important;
285
- border: 1px solid #D1E3F8 !important;
286
- }
287
-
288
- .md-table td {
289
- padding: 8px 10px !important;
290
- border: 1px solid #E6E6E6 !important;
291
- vertical-align: top !important;
292
- }
293
-
294
- .md-table tr:nth-child(even) {
295
- background-color: #F9F9F9 !important;
296
- }
297
-
298
- .md-table tr:hover {
299
- background-color: #F0F7FF !important;
300
- }
301
-
302
- /* Style for the insufficient context alert */
303
  .insufficient-alert {
304
- border: 2px solid #f78989;
305
- background-color: #fff0f0;
306
- color: #b92020;
307
  padding: 12px;
308
  border-radius: 6px;
309
  margin-bottom: 12px;
310
  font-size: 1em;
311
  }
 
312
  .insufficient-alert strong {
313
  display: block;
314
  margin-bottom: 5px;
315
  font-size: 1.05em;
316
  }
 
317
  .insufficient-alert p {
318
  margin: 0;
319
  font-size: 1em;
320
  }
321
 
322
- /* Style for section headings */
323
  .section-heading {
324
  color: var(--text-dark) !important;
325
  margin: 5px 0 2px 0 !important;
@@ -328,41 +316,102 @@ body, .gradio-container {
328
  font-size: 1.2em !important;
329
  }
330
 
331
- /* Style the group displaying model summaries */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  .summary-card {
333
- border: 1px solid var(--border-light);
334
- padding: 12px !important;
335
- border-radius: 6px;
336
- height: 100%;
337
- box-shadow: 0 1px 3px rgba(0,0,0,0.03);
338
  background-color: var(--background-light) !important;
 
 
 
 
 
 
 
 
339
  }
340
 
341
- /* Apply specific background colors to summary cards */
342
  .summary-card-a {
343
- border-left: 3px solid #92B4F4 !important; /* Lighter blue accent */
344
  }
 
345
  .summary-card-b {
346
- border-left: 3px solid #F8ADA7 !important; /* Light red accent */
347
  }
348
 
349
- /* Style the Textbox itself inside the summary card */
350
- .summary-card textarea {
351
- font-size: 1em !important;
352
- line-height: 1.4 !important;
353
- background-color: rgba(255,255,255,0.7) !important;
 
 
354
  }
355
- /* Style the Textbox label */
356
- .summary-card .gr-input-label {
357
- display: block !important;
358
- padding: 0 0 5px 0 !important;
359
  margin: 0 !important;
360
- font-size: 1.05em !important;
 
 
 
 
 
 
 
 
361
  font-weight: 600 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  color: var(--text-dark) !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  }
364
 
365
- /* Style the voting buttons */
366
  .vote-button {
367
  flex-grow: 1;
368
  margin: 0 5px !important;
@@ -378,57 +427,50 @@ body, .gradio-container {
378
  margin-bottom: 5px !important;
379
  }
380
 
381
- /* Hover effect for A/B/Tie buttons */
382
  .vote-button:hover:not(.vote-button-neither) {
383
  background-color: var(--primary-light) !important;
384
  border-color: var(--primary) !important;
385
  color: var(--primary) !important;
386
  }
387
 
388
- /* Hover effect for Neither button */
389
  .vote-button-neither:hover {
390
- background-color: #fff0f0 !important;
391
- border-color: #f78989 !important;
392
- color: #b92020 !important;
393
  }
394
 
395
- /* Style for selected buttons with persistent selection state */
396
  .vote-button.selected:not(.vote-button-neither) {
397
  border-width: 2px !important;
398
  border-style: solid !important;
399
- border-color: #FF7D1E !important;
400
- background-color: #FFF2E6 !important;
401
- color: #FF7D1E !important;
402
  font-weight: 600 !important;
403
- box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
404
  }
405
 
406
- /* Special neither button styling when selected */
407
  .vote-button-neither.selected {
408
  border-width: 2px !important;
409
  border-style: solid !important;
410
- border-color: #f78989 !important;
411
- background-color: #fff0f0 !important;
412
- color: #b92020 !important;
413
  font-weight: 600 !important;
414
- box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
415
  }
416
 
417
- /* Ensure selection state persists when hovered */
418
  .vote-button.selected:hover:not(.vote-button-neither) {
419
- border-color: #FF7D1E !important;
420
- background-color: #FFF2E6 !important;
421
- color: #FF7D1E !important;
422
  }
423
 
424
- /* Ensure neither selection state persists when hovered */
425
  .vote-button-neither.selected:hover {
426
- border-color: #f78989 !important;
427
- background-color: #fff0f0 !important;
428
- color: #b92020 !important;
429
  }
430
 
431
- /* Style the feedback section */
432
  .feedback-section {
433
  padding: 3px 0 !important;
434
  background-color: transparent !important;
@@ -439,7 +481,6 @@ body, .gradio-container {
439
  box-shadow: none !important;
440
  }
441
 
442
- /* Improved feedback checkbox styling */
443
  .feedback-section .gr-check-radio {
444
  font-size: 1.05em !important;
445
  }
@@ -449,21 +490,18 @@ body, .gradio-container {
449
  color: var(--text-dark) !important;
450
  }
451
 
452
- /* Checkbox larger size and color customization */
453
  .feedback-section input[type="checkbox"] {
454
  width: 18px !important;
455
  height: 18px !important;
456
  margin-right: 6px !important;
457
  }
458
 
459
- /* Make the checkbox checked color stronger */
460
  .feedback-section input[type="checkbox"]:checked {
461
- accent-color: #FF8C38 !important;
462
- border-color: #FF8C38 !important;
463
- background-color: #FF8C38 !important;
464
  }
465
 
466
- /* Style for model reveals */
467
  .model-reveal {
468
  font-size: 1.3em !important;
469
  padding: 8px 0 !important;
@@ -473,17 +511,14 @@ body, .gradio-container {
473
  border-radius: 6px !important;
474
  }
475
 
476
- /* Style for model A reveal */
477
  .model-a-reveal {
478
- background-color: #F0F7FF !important;
479
  }
480
 
481
- /* Style for model B reveal */
482
  .model-b-reveal {
483
- background-color: #FFF0F0 !important;
484
  }
485
 
486
- /* Style the control buttons area */
487
  .control-buttons button {
488
  margin: 0 10px !important;
489
  font-size: 1em !important;
@@ -492,7 +527,6 @@ body, .gradio-container {
492
  transition: all 0.2s ease !important;
493
  }
494
 
495
- /* Make headings slightly larger */
496
  h3 {
497
  font-size: 1.2em !important;
498
  font-weight: 600 !important;
@@ -500,14 +534,14 @@ h3 {
500
  padding: 0 !important;
501
  color: var(--text-dark) !important;
502
  }
503
- /* Adjust main title size */
504
  h1 {
505
  font-size: 1.6em !important;
506
  color: var(--primary) !important;
507
  margin: 10px 0 5px 0 !important;
508
  padding: 0 !important;
509
  }
510
- /* Adjust main description size */
511
  #main-interface-area > p:first-of-type {
512
  font-size: 1em !important;
513
  margin: 0 0 8px 0 !important;
@@ -516,7 +550,6 @@ h1 {
516
  color: var(--text-medium) !important;
517
  }
518
 
519
- /* Adjust CheckboxGroup label/choices size */
520
  .feedback-section .gr-input-label {
521
  font-size: 1.1em !important;
522
  font-weight: 600 !important;
@@ -524,7 +557,6 @@ h1 {
524
  color: var(--text-dark) !important;
525
  }
526
 
527
- /* Adjust DataFrame font size */
528
  .gr-dataframe table {
529
  font-size: 0.95em !important;
530
  border-collapse: separate !important;
@@ -532,23 +564,25 @@ h1 {
532
  border-radius: 6px !important;
533
  overflow: hidden !important;
534
  }
 
535
  .gr-dataframe th, .gr-dataframe td {
536
  padding: 8px 10px !important;
537
  border: none !important;
538
  border-bottom: 1px solid var(--border-light) !important;
539
  }
 
540
  .gr-dataframe th {
541
  background-color: var(--background-light) !important;
542
  color: var(--text-dark) !important;
543
  font-weight: 600 !important;
544
  }
545
 
546
- /* Reduce space caused by Markdown wrappers */
547
  .gradio-container .prose {
548
  line-height: 1.4 !important;
549
  margin: 0 !important;
550
  padding: 0 !important;
551
  }
 
552
  hr {
553
  margin: 5px 0 !important;
554
  border: none !important;
@@ -556,12 +590,10 @@ hr {
556
  background-color: var(--border-light) !important;
557
  }
558
 
559
- /* Fix for any scrollbar issues */
560
  .gradio-row {
561
  overflow: visible !important;
562
  }
563
 
564
- /* Submit button styling */
565
  #submit-button {
566
  background-color: var(--primary) !important;
567
  color: white !important;
@@ -570,17 +602,16 @@ hr {
570
  font-weight: 600 !important;
571
  font-size: 1.2em !important;
572
  transition: all 0.2s ease !important;
573
- box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
574
  border: none !important;
575
  margin-top: 15px !important;
576
  }
577
 
578
  #submit-button:hover {
579
  background-color: #E56E0F !important;
580
- box-shadow: 0 2px 4px rgba(0,0,0,0.12) !important;
581
  }
582
 
583
- /* Try another button styling */
584
  #try-another-btn {
585
  background-color: var(--primary) !important;
586
  color: white !important;
@@ -588,16 +619,15 @@ hr {
588
  border-radius: 6px !important;
589
  font-weight: 600 !important;
590
  transition: all 0.2s ease !important;
591
- box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
592
  border: none !important;
593
  }
594
 
595
  #try-another-btn:hover {
596
  background-color: #E56E0F !important;
597
- box-shadow: 0 2px 4px rgba(0,0,0,0.12) !important;
598
  }
599
 
600
- /* Reduce vertical spacing */
601
  .gradio-column > *, .gradio-row > * {
602
  margin-top: 0 !important;
603
  margin-bottom: 0 !important;
@@ -612,17 +642,14 @@ hr {
612
  padding-bottom: 0 !important;
613
  }
614
 
615
- /* Reduce container padding */
616
  .gradio-container {
617
  padding: 0 !important;
618
  }
619
 
620
- /* Custom compact spacing for specific sections */
621
  #main-interface-area > div {
622
  margin-bottom: 4px !important;
623
  }
624
 
625
- /* Media query for responsive behavior on smaller screens */
626
  @media screen and (max-width: 768px) {
627
  #query-container {
628
  flex-direction: column !important;
@@ -637,4 +664,43 @@ hr {
637
  .query-button {
638
  width: 100% !important;
639
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
640
  }
 
1
+ :root {
2
+ --primary: #FF7D1E;
3
+ --primary-light: #FFF8F2;
4
+ --primary-selected: #FFE8D5;
5
+ --accent: #6B7280;
6
+ --text-dark: #333333;
7
+ --text-medium: #666666;
8
+ --border-light: #E6E6E6;
9
+ --background-light: #F9F9F9;
10
+ --background-main: #FFFFFF;
11
+ --highlight: #FFFBEB;
12
+ --model-a-color: #92B4F4;
13
+ --model-b-color: #F8ADA7;
14
+ --query-background: #F0F7FF;
15
+ --query-border: #D1E3F8;
16
+ --query-text: #2E5AAC;
17
+ --insufficient-alert-bg: #fff0f0;
18
+ --insufficient-alert-border: #f78989;
19
+ --insufficient-alert-text: #b92020;
20
+ }
21
+
22
+ @media (prefers-color-scheme: dark) {
23
+ :root {
24
+ --primary: #FF9542;
25
+ --primary-light: #3D3026;
26
+ --primary-selected: #4D3927;
27
+ --accent: #9CA3AF;
28
+ --text-dark: #E6E6E6;
29
+ --text-medium: #BBBBBB;
30
+ --border-light: #444444;
31
+ --background-light: #2A2A2A;
32
+ --background-main: #1A1A1A;
33
+ --highlight: #3D3825;
34
+ --model-a-color: #5A85C7;
35
+ --model-b-color: #C47A74;
36
+ --query-background: #2A3F5C;
37
+ --query-border: #3A5277;
38
+ --query-text: #A9C2E8;
39
+ --insufficient-alert-bg: #3D2525;
40
+ --insufficient-alert-border: #913F3F;
41
+ --insufficient-alert-text: #FF8A8A;
42
+ }
43
+ }
44
+
45
  body, .gradio-container {
46
+ background-color: var(--background-main);
47
  font-size: 15px;
48
  overflow-x: hidden !important;
49
+ color: var(--text-dark);
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  .tabs {
53
  margin-top: 0 !important;
54
  }
55
 
 
56
  .tab-nav {
57
  background-color: var(--background-light) !important;
58
  padding: 5px 10px !important;
59
  border-radius: 8px 8px 0 0 !important;
60
  border-bottom: 1px solid var(--border-light) !important;
61
  }
62
+
63
  .tab-nav button {
64
  font-size: 1.1em !important;
65
  font-weight: 600 !important;
 
71
  color: var(--text-medium) !important;
72
  transition: all 0.3s ease !important;
73
  }
74
+
75
  .tab-nav button.selected {
76
+ background-color: var(--background-main) !important;
77
  color: var(--primary) !important;
78
  border-bottom: 2px solid var(--primary) !important;
79
  }
80
+
81
  .tab-nav button:hover:not(.selected) {
82
+ background-color: rgba(255, 255, 255, 0.1) !important;
83
  color: var(--text-dark) !important;
84
  }
85
 
 
86
  .tabitem {
87
  border: none !important;
88
  padding: 20px 10px !important;
89
  }
90
 
 
91
  #query-title-row {
92
  margin: 0 !important;
93
  padding: 0 10px !important;
94
  display: flex !important;
95
  align-items: center !important;
96
+ overflow: visible !important;
97
+ min-height: 40px !important;
98
+ white-space: normal !important;
99
  }
100
 
101
  #query-title-row h3 {
 
103
  padding: 0 !important;
104
  font-size: 1.2em !important;
105
  font-weight: 600 !important;
106
+ line-height: 1.3 !important;
107
  flex-grow: 0 !important;
108
  flex-shrink: 0 !important;
109
+ white-space: normal !important;
110
  overflow: visible !important;
111
  color: var(--text-dark) !important;
112
+ width: auto !important;
113
+ display: inline-block !important;
114
  }
115
 
 
116
  #query-container {
117
  display: flex !important;
118
  align-items: stretch !important;
 
121
  overflow: visible !important;
122
  }
123
 
 
124
  .query-box-row {
125
+ background-color: var(--query-background) !important;
126
  padding: 12px 15px !important;
127
  border-radius: 6px !important;
128
+ border: 1px solid var(--query-border) !important;
129
  margin: 0 !important;
130
  align-items: flex-start !important;
131
+ flex: 1 1 70% !important;
132
+ max-width: 70% !important;
133
  overflow: visible !important;
134
  display: flex !important;
135
  min-height: 50px !important;
136
  height: auto !important;
137
  }
138
 
139
+ .query-text {
140
+ padding: 0 !important;
141
+ margin: 0 !important;
142
+ background-color: transparent !important;
143
+ border: none !important;
144
+ overflow: visible !important;
145
+ width: 100% !important;
146
+ display: block !important;
147
+ }
148
+
149
+ .query-text p {
150
+ font-size: 1.2em !important;
151
+ font-weight: 600 !important;
152
+ color: var(--query-text) !important;
153
+ line-height: 1.4 !important;
154
+ margin: 0 !important;
155
+ padding: 0 !important;
156
+ background-color: transparent !important;
157
+ border: none !important;
158
+ overflow-wrap: break-word !important;
159
+ word-wrap: break-word !important;
160
+ word-break: normal !important;
161
+ hyphens: auto !important;
162
+ white-space: normal !important;
163
+ overflow: visible !important;
164
+ }
165
+
166
  .context-description {
167
  background-color: transparent !important;
168
  padding: 0 15px !important;
169
  margin: 0 0 15px 0 !important;
170
  font-style: normal !important;
171
+ color: var(--text-medium) !important;
172
+ font-size: 1.05em !important;
173
  }
174
 
175
  .context-topic {
176
  display: inline-flex !important;
177
  align-items: center !important;
178
+ background-color: transparent !important;
179
  padding: 0 !important;
180
  border-radius: 0 !important;
181
  box-shadow: none !important;
 
183
 
184
  .topic-label {
185
  font-weight: 600 !important;
186
+ color: var(--text-medium) !important;
187
  margin-right: 6px !important;
188
  }
189
 
 
190
  .query-button {
191
  padding: 0 20px !important;
192
  border-radius: 6px !important;
 
202
  min-height: 50px !important;
203
  white-space: nowrap !important;
204
  transition: all 0.2s ease !important;
205
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
206
  }
207
 
208
  .query-button:hover {
 
211
  border-color: var(--primary) !important;
212
  }
213
 
 
214
  #context-header-row {
215
  display: flex !important;
216
  justify-content: space-between !important;
 
219
  padding: 0 10px !important;
220
  }
221
 
 
222
  .context-title {
223
  margin: 0 !important;
224
  padding: 0 !important;
 
227
  color: var(--text-dark) !important;
228
  }
229
 
 
230
  .context-toggle-button {
231
  background-color: var(--background-light) !important;
232
  color: var(--text-medium) !important;
 
251
  border-color: var(--primary) !important;
252
  }
253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  .context-items-container {
255
  border-radius: 6px;
256
  overflow: hidden;
257
  }
258
 
 
259
  .context-item {
260
  border: 1px solid var(--border-light);
261
  background-color: var(--background-light);
 
264
  margin-bottom: 8px;
265
  font-size: 1em;
266
  line-height: 1.5;
267
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
268
  }
269
 
 
270
  .primary-context {
271
+ border-left: 3px solid var(--model-a-color) !important;
272
  }
273
 
 
274
  .chunk-header {
275
  font-weight: 600;
276
+ color: var(--query-text);
277
  margin-bottom: 8px;
278
  padding-bottom: 5px;
279
+ border-bottom: 1px solid var(--query-border);
280
  }
281
 
 
282
  .highlight {
283
  background-color: #FFECB3 !important;
284
  padding: 0.1em 0.3em !important;
 
287
  color: #664500 !important;
288
  }
289
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  .insufficient-alert {
291
+ border: 2px solid var(--insufficient-alert-border);
292
+ background-color: var(--insufficient-alert-bg);
293
+ color: var(--insufficient-alert-text);
294
  padding: 12px;
295
  border-radius: 6px;
296
  margin-bottom: 12px;
297
  font-size: 1em;
298
  }
299
+
300
  .insufficient-alert strong {
301
  display: block;
302
  margin-bottom: 5px;
303
  font-size: 1.05em;
304
  }
305
+
306
  .insufficient-alert p {
307
  margin: 0;
308
  font-size: 1em;
309
  }
310
 
 
311
  .section-heading {
312
  color: var(--text-dark) !important;
313
  margin: 5px 0 2px 0 !important;
 
316
  font-size: 1.2em !important;
317
  }
318
 
319
+ /* COMPLETELY NEW APPROACH FOR SUMMARY CARDS */
320
+ /* Make the summary card row flex */
321
+ #main-interface-area > div:nth-child(7) > div {
322
+ display: flex !important;
323
+ flex-direction: row !important;
324
+ align-items: stretch !important;
325
+ }
326
+
327
+ /* Style each column in the summary row */
328
+ #main-interface-area > div:nth-child(7) > div > div {
329
+ flex: 1 !important;
330
+ display: flex !important;
331
+ flex-direction: column !important;
332
+ }
333
+
334
+ /* Reset all padding/margin for summary cards */
335
  .summary-card {
336
+ border: 1px solid var(--border-light) !important;
337
+ border-radius: 6px !important;
 
 
 
338
  background-color: var(--background-light) !important;
339
+ box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
340
+ margin: 0 !important;
341
+ padding: 12px !important;
342
+ display: flex !important;
343
+ flex-direction: column !important;
344
+ height: auto !important;
345
+ min-height: 200px !important;
346
+ overflow: visible !important;
347
  }
348
 
 
349
  .summary-card-a {
350
+ border-left: 3px solid var(--model-a-color) !important;
351
  }
352
+
353
  .summary-card-b {
354
+ border-left: 3px solid var(--model-b-color) !important;
355
  }
356
 
357
+ /* Style the form inside summary cards */
358
+ .summary-card .gr-form {
359
+ margin: 0 !important;
360
+ padding: 0 !important;
361
+ flex: 1 !important;
362
+ display: flex !important;
363
+ flex-direction: column !important;
364
  }
365
+
366
+ /* Style the inner div of the form */
367
+ .summary-card .gr-form > div {
 
368
  margin: 0 !important;
369
+ padding: 0 !important;
370
+ flex: 1 !important;
371
+ display: flex !important;
372
+ flex-direction: column !important;
373
+ }
374
+
375
+ /* Style the label */
376
+ .summary-card .gr-input-label {
377
+ font-size: 1.1em !important;
378
  font-weight: 600 !important;
379
+ margin: 0 0 5px 0 !important;
380
+ padding: 0 !important;
381
+ color: var(--text-dark) !important;
382
+ }
383
+
384
+ /* Style the textbox container */
385
+ .summary-card .gr-textbox {
386
+ border: none !important;
387
+ background: transparent !important;
388
+ padding: 0 !important;
389
+ margin: 0 !important;
390
+ flex: 1 !important;
391
+ }
392
+
393
+ /* Style the textarea */
394
+ .summary-card textarea {
395
+ background-color: transparent !important;
396
+ border: none !important;
397
  color: var(--text-dark) !important;
398
+ font-size: 1em !important;
399
+ line-height: 1.4 !important;
400
+ height: auto !important;
401
+ min-height: 150px !important;
402
+ padding: 0 !important;
403
+ margin: 0 !important;
404
+ width: 100% !important;
405
+ resize: none !important;
406
+ overflow-y: visible !important;
407
+ }
408
+
409
+ /* Force scrollbars when needed */
410
+ .summary-card-wrapper {
411
+ height: 100% !important;
412
+ overflow-y: auto !important;
413
  }
414
 
 
415
  .vote-button {
416
  flex-grow: 1;
417
  margin: 0 5px !important;
 
427
  margin-bottom: 5px !important;
428
  }
429
 
 
430
  .vote-button:hover:not(.vote-button-neither) {
431
  background-color: var(--primary-light) !important;
432
  border-color: var(--primary) !important;
433
  color: var(--primary) !important;
434
  }
435
 
 
436
  .vote-button-neither:hover {
437
+ background-color: var(--insufficient-alert-bg) !important;
438
+ border-color: var(--insufficient-alert-border) !important;
439
+ color: var(--insufficient-alert-text) !important;
440
  }
441
 
 
442
  .vote-button.selected:not(.vote-button-neither) {
443
  border-width: 2px !important;
444
  border-style: solid !important;
445
+ border-color: var(--primary) !important;
446
+ background-color: var(--primary-light) !important;
447
+ color: var(--primary) !important;
448
  font-weight: 600 !important;
449
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
450
  }
451
 
 
452
  .vote-button-neither.selected {
453
  border-width: 2px !important;
454
  border-style: solid !important;
455
+ border-color: var(--insufficient-alert-border) !important;
456
+ background-color: var(--insufficient-alert-bg) !important;
457
+ color: var(--insufficient-alert-text) !important;
458
  font-weight: 600 !important;
459
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
460
  }
461
 
 
462
  .vote-button.selected:hover:not(.vote-button-neither) {
463
+ border-color: var(--primary) !important;
464
+ background-color: var(--primary-light) !important;
465
+ color: var(--primary) !important;
466
  }
467
 
 
468
  .vote-button-neither.selected:hover {
469
+ border-color: var(--insufficient-alert-border) !important;
470
+ background-color: var(--insufficient-alert-bg) !important;
471
+ color: var(--insufficient-alert-text) !important;
472
  }
473
 
 
474
  .feedback-section {
475
  padding: 3px 0 !important;
476
  background-color: transparent !important;
 
481
  box-shadow: none !important;
482
  }
483
 
 
484
  .feedback-section .gr-check-radio {
485
  font-size: 1.05em !important;
486
  }
 
490
  color: var(--text-dark) !important;
491
  }
492
 
 
493
  .feedback-section input[type="checkbox"] {
494
  width: 18px !important;
495
  height: 18px !important;
496
  margin-right: 6px !important;
497
  }
498
 
 
499
  .feedback-section input[type="checkbox"]:checked {
500
+ accent-color: var(--primary) !important;
501
+ border-color: var(--primary) !important;
502
+ background-color: var(--primary) !important;
503
  }
504
 
 
505
  .model-reveal {
506
  font-size: 1.3em !important;
507
  padding: 8px 0 !important;
 
511
  border-radius: 6px !important;
512
  }
513
 
 
514
  .model-a-reveal {
515
+ background-color: rgba(146, 180, 244, 0.2) !important;
516
  }
517
 
 
518
  .model-b-reveal {
519
+ background-color: rgba(248, 173, 167, 0.2) !important;
520
  }
521
 
 
522
  .control-buttons button {
523
  margin: 0 10px !important;
524
  font-size: 1em !important;
 
527
  transition: all 0.2s ease !important;
528
  }
529
 
 
530
  h3 {
531
  font-size: 1.2em !important;
532
  font-weight: 600 !important;
 
534
  padding: 0 !important;
535
  color: var(--text-dark) !important;
536
  }
537
+
538
  h1 {
539
  font-size: 1.6em !important;
540
  color: var(--primary) !important;
541
  margin: 10px 0 5px 0 !important;
542
  padding: 0 !important;
543
  }
544
+
545
  #main-interface-area > p:first-of-type {
546
  font-size: 1em !important;
547
  margin: 0 0 8px 0 !important;
 
550
  color: var(--text-medium) !important;
551
  }
552
 
 
553
  .feedback-section .gr-input-label {
554
  font-size: 1.1em !important;
555
  font-weight: 600 !important;
 
557
  color: var(--text-dark) !important;
558
  }
559
 
 
560
  .gr-dataframe table {
561
  font-size: 0.95em !important;
562
  border-collapse: separate !important;
 
564
  border-radius: 6px !important;
565
  overflow: hidden !important;
566
  }
567
+
568
  .gr-dataframe th, .gr-dataframe td {
569
  padding: 8px 10px !important;
570
  border: none !important;
571
  border-bottom: 1px solid var(--border-light) !important;
572
  }
573
+
574
  .gr-dataframe th {
575
  background-color: var(--background-light) !important;
576
  color: var(--text-dark) !important;
577
  font-weight: 600 !important;
578
  }
579
 
 
580
  .gradio-container .prose {
581
  line-height: 1.4 !important;
582
  margin: 0 !important;
583
  padding: 0 !important;
584
  }
585
+
586
  hr {
587
  margin: 5px 0 !important;
588
  border: none !important;
 
590
  background-color: var(--border-light) !important;
591
  }
592
 
 
593
  .gradio-row {
594
  overflow: visible !important;
595
  }
596
 
 
597
  #submit-button {
598
  background-color: var(--primary) !important;
599
  color: white !important;
 
602
  font-weight: 600 !important;
603
  font-size: 1.2em !important;
604
  transition: all 0.2s ease !important;
605
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
606
  border: none !important;
607
  margin-top: 15px !important;
608
  }
609
 
610
  #submit-button:hover {
611
  background-color: #E56E0F !important;
612
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
613
  }
614
 
 
615
  #try-another-btn {
616
  background-color: var(--primary) !important;
617
  color: white !important;
 
619
  border-radius: 6px !important;
620
  font-weight: 600 !important;
621
  transition: all 0.2s ease !important;
622
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
623
  border: none !important;
624
  }
625
 
626
  #try-another-btn:hover {
627
  background-color: #E56E0F !important;
628
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
629
  }
630
 
 
631
  .gradio-column > *, .gradio-row > * {
632
  margin-top: 0 !important;
633
  margin-bottom: 0 !important;
 
642
  padding-bottom: 0 !important;
643
  }
644
 
 
645
  .gradio-container {
646
  padding: 0 !important;
647
  }
648
 
 
649
  #main-interface-area > div {
650
  margin-bottom: 4px !important;
651
  }
652
 
 
653
  @media screen and (max-width: 768px) {
654
  #query-container {
655
  flex-direction: column !important;
 
664
  .query-button {
665
  width: 100% !important;
666
  }
667
+
668
+ .vote-button {
669
+ font-size: 0.9em !important;
670
+ padding: 10px 8px !important;
671
+ }
672
+
673
+ .summary-card {
674
+ margin-bottom: 15px !important;
675
+ }
676
+
677
+ #main-interface-area > div:nth-child(7) > div {
678
+ flex-direction: column !important;
679
+ }
680
+
681
+ @media screen and (max-width: 480px) {
682
+ #main-interface-area > div:nth-child(10) > div {
683
+ display: grid !important;
684
+ grid-template-columns: 1fr 1fr !important;
685
+ gap: 8px !important;
686
+ }
687
+
688
+ .vote-button {
689
+ margin: 0 !important;
690
+ padding: 8px 5px !important;
691
+ }
692
+ }
693
+ }
694
+
695
+ /* Fix for specificity to override Gradio defaults */
696
+ body textarea.gr-box,
697
+ body .gr-box textarea {
698
+ font-size: 1em !important;
699
+ line-height: 1.4 !important;
700
+ color: var(--text-dark) !important;
701
+ background-color: transparent !important;
702
+ border: none !important;
703
+ box-shadow: none !important;
704
+ height: auto !important;
705
+ min-height: 150px !important;
706
  }