Spaces:
Running
on
Zero
Running
on
Zero
/* Base styles */ | |
body, .gradio-container { | |
background-color: #ffffff; | |
font-size: 15px; | |
overflow-x: hidden ; | |
} | |
/* Main color variables for a simpler, more subdued theme */ | |
:root { | |
--primary: #FF7D1E; /* Main orange accent - used sparingly */ | |
--primary-light: #FFF8F2; /* Very subtle orange tint */ | |
--primary-selected: #FFE8D5; /* More visible but still subtle orange for selections */ | |
--accent: #6B7280; /* Neutral gray for most UI elements */ | |
--text-dark: #333333; /* Dark text */ | |
--text-medium: #666666; /* Medium text */ | |
--border-light: #E6E6E6; /* Light border */ | |
--background-light: #F9F9F9; /* Light background */ | |
--highlight: #FFFBEB; /* Subtle highlight color */ | |
--model-a-color: #92B4F4; /* Model A color (blue) */ | |
--model-b-color: #F8ADA7; /* Model B color (red) */ | |
} | |
/* Tab styling */ | |
.tabs { | |
margin-top: 0 ; | |
} | |
/* Style for tab buttons */ | |
.tab-nav { | |
background-color: var(--background-light) ; | |
padding: 5px 10px ; | |
border-radius: 8px 8px 0 0 ; | |
border-bottom: 1px solid var(--border-light) ; | |
} | |
.tab-nav button { | |
font-size: 1.1em ; | |
font-weight: 600 ; | |
padding: 10px 25px ; | |
margin: 0 5px ; | |
border-radius: 6px 6px 0 0 ; | |
border: none ; | |
background-color: transparent ; | |
color: var(--text-medium) ; | |
transition: all 0.3s ease ; | |
} | |
.tab-nav button.selected { | |
background-color: white ; | |
color: var(--primary) ; | |
border-bottom: 2px solid var(--primary) ; | |
} | |
.tab-nav button:hover:not(.selected) { | |
background-color: rgba(255,255,255,0.5) ; | |
color: var(--text-dark) ; | |
} | |
/* Tab content area */ | |
.tabitem { | |
border: none ; | |
padding: 20px 10px ; | |
} | |
/* Style the row containing the Query title */ | |
#query-title-row { | |
margin: 0 ; | |
padding: 0 10px ; | |
display: flex ; | |
align-items: center ; | |
overflow: hidden ; | |
height: 40px ; | |
} | |
#query-title-row h3 { | |
margin: 0 ; | |
padding: 0 ; | |
font-size: 1.2em ; | |
font-weight: 600 ; | |
line-height: 1.2 ; | |
flex-grow: 0 ; | |
flex-shrink: 0 ; | |
white-space: nowrap ; | |
overflow: visible ; | |
color: var(--text-dark) ; | |
} | |
/* New query container layout with button next to box */ | |
#query-container { | |
display: flex ; | |
align-items: stretch ; | |
gap: 10px ; | |
margin: 0 10px 8px 10px ; | |
overflow: visible ; | |
} | |
/* Style the query box - optimized for long queries */ | |
.query-box-row { | |
background-color: #F0F7FF ; /* Light blue background */ | |
padding: 12px 15px ; | |
border-radius: 6px ; | |
border: 1px solid #D1E3F8 ; /* Light blue border */ | |
margin: 0 ; | |
align-items: flex-start ; | |
flex: 1 1 50% ; | |
max-width: 50% ; | |
overflow: visible ; | |
display: flex ; | |
min-height: 50px ; | |
height: auto ; | |
} | |
/* Context description styling - simple version */ | |
.context-description { | |
background-color: transparent ; | |
padding: 0 15px ; | |
margin: 0 0 15px 0 ; | |
font-style: normal ; | |
color: var(--text-medium) ; /* Lighter text color */ | |
font-size: 1.05em ; /* Slightly larger */ | |
} | |
.context-topic { | |
display: inline-flex ; | |
align-items: center ; | |
background-color: transparent ; /* No background */ | |
padding: 0 ; | |
border-radius: 0 ; | |
box-shadow: none ; | |
} | |
.topic-label { | |
font-weight: 600 ; | |
color: var(--text-medium) ; /* Lighter text color */ | |
margin-right: 6px ; | |
} | |
/* Style the Get Random Question button */ | |
.query-button { | |
padding: 0 20px ; | |
border-radius: 6px ; | |
font-weight: 500 ; | |
flex: 0 0 auto ; | |
display: flex ; | |
align-items: center ; | |
justify-content: center ; | |
background-color: var(--background-light) ; | |
color: var(--text-medium) ; | |
border: 1px solid var(--border-light) ; | |
font-size: 0.95em ; | |
min-height: 50px ; | |
white-space: nowrap ; | |
transition: all 0.2s ease ; | |
box-shadow: 0 1px 2px rgba(0,0,0,0.05) ; | |
} | |
.query-button:hover { | |
background-color: var(--primary-light) ; | |
color: var(--primary) ; | |
border-color: var(--primary) ; | |
} | |
/* Context header row with title and toggle button */ | |
#context-header-row { | |
display: flex ; | |
justify-content: space-between ; | |
align-items: center ; | |
margin-bottom: 8px ; | |
padding: 0 10px ; | |
} | |
/* Context title styling */ | |
.context-title { | |
margin: 0 ; | |
padding: 0 ; | |
font-size: 1.2em ; | |
font-weight: 600 ; | |
color: var(--text-dark) ; | |
} | |
/* Style for the context toggle button */ | |
.context-toggle-button { | |
background-color: var(--background-light) ; | |
color: var(--text-medium) ; | |
padding: 5px 10px ; | |
border-radius: 4px ; | |
border: 1px solid var(--border-light) ; | |
font-size: 0.85em ; | |
font-weight: 500 ; | |
cursor: pointer ; | |
transition: all 0.2s ease ; | |
margin: 0 ; | |
height: 30px ; | |
line-height: 1 ; | |
width: auto ; | |
min-width: 0 ; | |
max-width: 150px ; | |
} | |
.context-toggle-button:hover { | |
background-color: var(--primary-light) ; | |
color: var(--primary) ; | |
border-color: var(--primary) ; | |
} | |
/* Style the Markdown component displaying the query text */ | |
.query-text { | |
padding: 0 ; | |
margin: 0 ; | |
background-color: transparent ; | |
border: none ; | |
overflow: visible ; | |
width: 100% ; | |
} | |
/* Style the actual query text */ | |
.query-text p { | |
font-size: 1.2em ; | |
font-weight: 600 ; | |
color: #2E5AAC ; /* Blue for query text */ | |
line-height: 1.4 ; | |
margin: 0 ; | |
padding: 0 ; | |
background-color: transparent ; | |
border: none ; | |
overflow-wrap: break-word ; | |
word-wrap: break-word ; | |
word-break: normal ; | |
hyphens: auto ; | |
white-space: normal ; | |
} | |
/* Container for context items */ | |
.context-items-container { | |
border-radius: 6px; | |
overflow: hidden; | |
} | |
/* Style for individual context items */ | |
.context-item { | |
border: 1px solid var(--border-light); | |
background-color: var(--background-light); | |
padding: 12px; | |
border-radius: 6px; | |
margin-bottom: 8px; | |
font-size: 1em; | |
line-height: 1.5; | |
box-shadow: 0 1px 2px rgba(0,0,0,0.03); | |
} | |
/* Style for primary context items */ | |
.primary-context { | |
border-left: 3px solid #FFF0F0 ; /* Light red border */ | |
} | |
/* Style for chunk headers */ | |
.chunk-header { | |
font-weight: 600; | |
color: #2E5AAC; | |
margin-bottom: 8px; | |
padding-bottom: 5px; | |
border-bottom: 1px solid #D1E3F8; | |
} | |
/* Style for highlighted text within context items */ | |
.highlight { | |
background-color: #FFECB3 ; | |
padding: 0.1em 0.3em ; | |
border-radius: 3px ; | |
font-weight: 600 ; | |
color: #664500 ; | |
} | |
/* Markdown table styling */ | |
.md-table { | |
width: 100% ; | |
border-collapse: collapse ; | |
margin: 10px 0 ; | |
font-size: 0.95em ; | |
} | |
.md-table th { | |
background-color: #F0F7FF ; | |
color: #2E5AAC ; | |
font-weight: 600 ; | |
text-align: left ; | |
padding: 10px ; | |
border: 1px solid #D1E3F8 ; | |
} | |
.md-table td { | |
padding: 8px 10px ; | |
border: 1px solid #E6E6E6 ; | |
vertical-align: top ; | |
} | |
.md-table tr:nth-child(even) { | |
background-color: #F9F9F9 ; | |
} | |
.md-table tr:hover { | |
background-color: #F0F7FF ; | |
} | |
/* Style for the insufficient context alert */ | |
.insufficient-alert { | |
border: 2px solid #f78989; | |
background-color: #fff0f0; | |
color: #b92020; | |
padding: 12px; | |
border-radius: 6px; | |
margin-bottom: 12px; | |
font-size: 1em; | |
} | |
.insufficient-alert strong { | |
display: block; | |
margin-bottom: 5px; | |
font-size: 1.05em; | |
} | |
.insufficient-alert p { | |
margin: 0; | |
font-size: 1em; | |
} | |
/* Style for section headings */ | |
.section-heading { | |
color: var(--text-dark) ; | |
margin: 5px 0 2px 0 ; | |
padding: 0 ; | |
font-weight: 600 ; | |
font-size: 1.2em ; | |
} | |
/* Style the group displaying model summaries */ | |
.summary-card { | |
border: 1px solid var(--border-light); | |
padding: 12px ; | |
border-radius: 6px; | |
height: 100%; | |
box-shadow: 0 1px 3px rgba(0,0,0,0.03); | |
background-color: var(--background-light) ; | |
} | |
/* Apply specific background colors to summary cards */ | |
.summary-card-a { | |
border-left: 3px solid #92B4F4 ; /* Lighter blue accent */ | |
} | |
.summary-card-b { | |
border-left: 3px solid #F8ADA7 ; /* Light red accent */ | |
} | |
/* Style the Textbox itself inside the summary card */ | |
.summary-card textarea { | |
font-size: 1em ; | |
line-height: 1.4 ; | |
background-color: rgba(255,255,255,0.7) ; | |
} | |
/* Style the Textbox label */ | |
.summary-card .gr-input-label { | |
display: block ; | |
padding: 0 0 5px 0 ; | |
margin: 0 ; | |
font-size: 1.05em ; | |
font-weight: 600 ; | |
color: var(--text-dark) ; | |
} | |
/* Style the voting buttons */ | |
.vote-button { | |
flex-grow: 1; | |
margin: 0 5px ; | |
font-size: 1.05em ; | |
padding: 12px 15px ; | |
border-radius: 6px ; | |
transition: all 0.2s ease ; | |
background-color: var(--background-light) ; | |
border: 1px solid var(--border-light) ; | |
min-height: 50px ; | |
font-weight: 500 ; | |
color: var(--text-dark) ; | |
margin-bottom: 5px ; | |
} | |
/* Hover effect for A/B/Tie buttons */ | |
.vote-button:hover:not(.vote-button-neither) { | |
background-color: var(--primary-light) ; | |
border-color: var(--primary) ; | |
color: var(--primary) ; | |
} | |
/* Hover effect for Neither button */ | |
.vote-button-neither:hover { | |
background-color: #fff0f0 ; | |
border-color: #f78989 ; | |
color: #b92020 ; | |
} | |
/* Style for selected buttons with persistent selection state */ | |
.vote-button.selected:not(.vote-button-neither) { | |
border-width: 2px ; | |
border-style: solid ; | |
border-color: #FF7D1E ; | |
background-color: #FFF2E6 ; | |
color: #FF7D1E ; | |
font-weight: 600 ; | |
box-shadow: 0 1px 3px rgba(0,0,0,0.1) ; | |
} | |
/* Special neither button styling when selected */ | |
.vote-button-neither.selected { | |
border-width: 2px ; | |
border-style: solid ; | |
border-color: #f78989 ; | |
background-color: #fff0f0 ; | |
color: #b92020 ; | |
font-weight: 600 ; | |
box-shadow: 0 1px 3px rgba(0,0,0,0.1) ; | |
} | |
/* Ensure selection state persists when hovered */ | |
.vote-button.selected:hover:not(.vote-button-neither) { | |
border-color: #FF7D1E ; | |
background-color: #FFF2E6 ; | |
color: #FF7D1E ; | |
} | |
/* Ensure neither selection state persists when hovered */ | |
.vote-button-neither.selected:hover { | |
border-color: #f78989 ; | |
background-color: #fff0f0 ; | |
color: #b92020 ; | |
} | |
/* Style the feedback section */ | |
.feedback-section { | |
padding: 3px 0 ; | |
background-color: transparent ; | |
margin-top: 3px ; | |
margin-bottom: 3px ; | |
font-size: 1em; | |
border: none ; | |
box-shadow: none ; | |
} | |
/* Improved feedback checkbox styling */ | |
.feedback-section .gr-check-radio { | |
font-size: 1.05em ; | |
} | |
.feedback-section .gr-check-radio span { | |
font-size: 1.05em ; | |
color: var(--text-dark) ; | |
} | |
/* Checkbox larger size and color customization */ | |
.feedback-section input[type="checkbox"] { | |
width: 18px ; | |
height: 18px ; | |
margin-right: 6px ; | |
} | |
/* Make the checkbox checked color stronger */ | |
.feedback-section input[type="checkbox"]:checked { | |
accent-color: #FF8C38 ; | |
border-color: #FF8C38 ; | |
background-color: #FF8C38 ; | |
} | |
/* Style for model reveals */ | |
.model-reveal { | |
font-size: 1.3em ; | |
padding: 8px 0 ; | |
text-align: center ; | |
margin-top: 5px ; | |
font-weight: 600 ; | |
border-radius: 6px ; | |
} | |
/* Style for model A reveal */ | |
.model-a-reveal { | |
background-color: #F0F7FF ; | |
} | |
/* Style for model B reveal */ | |
.model-b-reveal { | |
background-color: #FFF0F0 ; | |
} | |
/* Style the control buttons area */ | |
.control-buttons button { | |
margin: 0 10px ; | |
font-size: 1em ; | |
border-radius: 6px ; | |
padding: 8px 16px ; | |
transition: all 0.2s ease ; | |
} | |
/* Make headings slightly larger */ | |
h3 { | |
font-size: 1.2em ; | |
font-weight: 600 ; | |
margin: 5px 0 2px 0 ; | |
padding: 0 ; | |
color: var(--text-dark) ; | |
} | |
/* Adjust main title size */ | |
h1 { | |
font-size: 1.6em ; | |
color: var(--primary) ; | |
margin: 10px 0 5px 0 ; | |
padding: 0 ; | |
} | |
/* Adjust main description size */ | |
#main-interface-area > p:first-of-type { | |
font-size: 1em ; | |
margin: 0 0 8px 0 ; | |
padding: 0 ; | |
line-height: 1.4 ; | |
color: var(--text-medium) ; | |
} | |
/* Adjust CheckboxGroup label/choices size */ | |
.feedback-section .gr-input-label { | |
font-size: 1.1em ; | |
font-weight: 600 ; | |
margin-bottom: 0.6em ; | |
color: var(--text-dark) ; | |
} | |
/* Adjust DataFrame font size */ | |
.gr-dataframe table { | |
font-size: 0.95em ; | |
border-collapse: separate ; | |
border-spacing: 0 ; | |
border-radius: 6px ; | |
overflow: hidden ; | |
} | |
.gr-dataframe th, .gr-dataframe td { | |
padding: 8px 10px ; | |
border: none ; | |
border-bottom: 1px solid var(--border-light) ; | |
} | |
.gr-dataframe th { | |
background-color: var(--background-light) ; | |
color: var(--text-dark) ; | |
font-weight: 600 ; | |
} | |
/* Reduce space caused by Markdown wrappers */ | |
.gradio-container .prose { | |
line-height: 1.4 ; | |
margin: 0 ; | |
padding: 0 ; | |
} | |
hr { | |
margin: 5px 0 ; | |
border: none ; | |
height: 1px ; | |
background-color: var(--border-light) ; | |
} | |
/* Fix for any scrollbar issues */ | |
.gradio-row { | |
overflow: visible ; | |
} | |
/* Submit button styling */ | |
#submit-button { | |
background-color: var(--primary) ; | |
color: white ; | |
padding: 12px 30px ; | |
border-radius: 6px ; | |
font-weight: 600 ; | |
font-size: 1.2em ; | |
transition: all 0.2s ease ; | |
box-shadow: 0 1px 2px rgba(0,0,0,0.08) ; | |
border: none ; | |
margin-top: 15px ; | |
} | |
#submit-button:hover { | |
background-color: #E56E0F ; | |
box-shadow: 0 2px 4px rgba(0,0,0,0.12) ; | |
} | |
/* Try another button styling */ | |
#try-another-btn { | |
background-color: var(--primary) ; | |
color: white ; | |
padding: 10px 25px ; | |
border-radius: 6px ; | |
font-weight: 600 ; | |
transition: all 0.2s ease ; | |
box-shadow: 0 1px 2px rgba(0,0,0,0.08) ; | |
border: none ; | |
} | |
#try-another-btn:hover { | |
background-color: #E56E0F ; | |
box-shadow: 0 2px 4px rgba(0,0,0,0.12) ; | |
} | |
/* Reduce vertical spacing */ | |
.gradio-column > *, .gradio-row > * { | |
margin-top: 0 ; | |
margin-bottom: 0 ; | |
padding-top: 0 ; | |
padding-bottom: 0 ; | |
} | |
.gradio-markdown { | |
margin-top: 0 ; | |
margin-bottom: 0 ; | |
padding-top: 0 ; | |
padding-bottom: 0 ; | |
} | |
/* Reduce container padding */ | |
.gradio-container { | |
padding: 0 ; | |
} | |
/* Custom compact spacing for specific sections */ | |
#main-interface-area > div { | |
margin-bottom: 4px ; | |
} | |
/* Media query for responsive behavior on smaller screens */ | |
@media screen and (max-width: 768px) { | |
#query-container { | |
flex-direction: column ; | |
} | |
.query-box-row { | |
flex: 1 1 100% ; | |
max-width: 100% ; | |
margin-bottom: 10px ; | |
} | |
.query-button { | |
width: 100% ; | |
} | |
} |