Spaces:
Running
on
Zero
Running
on
Zero
/* Add global page margins */ | |
.gradio-container { | |
padding-left: 12rem ; | |
padding-right: 12rem ; | |
} | |
/* Context boxes styling - make them same size */ | |
#basic_context_box, | |
#basic_sources_in_context_box { | |
height: 400px ; | |
} | |
#basic_context_box textarea { | |
height: 370px ; | |
min-height: 370px ; | |
max-height: 370px ; | |
resize: none ; | |
overflow-y: auto ; | |
box-sizing: border-box ; | |
} | |
/* HighlightedTextbox - clean approach */ | |
#basic_sources_in_context_box { | |
height: 400px ; | |
overflow: hidden ; | |
} | |
/* Target multiple possible content containers */ | |
#basic_sources_in_context_box > div:last-child, | |
#basic_sources_in_context_box .highlighted-textbox, | |
#basic_sources_in_context_box [data-testid="highlighted-textbox"], | |
#basic_sources_in_context_box .textbox { | |
height: 370px ; | |
max-height: 370px ; | |
overflow-y: auto ; | |
padding: 10px ; | |
box-sizing: border-box ; | |
} | |
/* Response box - adjusted height to account for button with smaller spacing */ | |
#basic_response_box { | |
height: 415px ; | |
overflow: hidden ; | |
} | |
/* Target the content area more specifically - fill entire space */ | |
#basic_response_box > div:last-child, | |
#basic_response_box .highlighted-text, | |
#basic_response_box [data-testid="highlighted-text"] { | |
height: 405px ; | |
max-height: 405px ; | |
overflow-y: auto ; | |
padding: 5px ; | |
margin: 0 ; | |
box-sizing: border-box ; | |
} | |
/* Full response traceback button styling - smaller spacing and consistent font */ | |
#basic_response_box + button, | |
button[value="π Traceback Entire Response"] { | |
margin: 5px 0 ; | |
width: 100% ; | |
flex-shrink: 0 ; | |
font-size: var(--text-lg) ; | |
font-weight: var(--weight-semibold) ; | |
} | |
/* Ensure the right column content fits properly with button */ | |
.gradio-row.equal-height .gradio-column:last-child { | |
padding-bottom: 0 ; | |
} | |
/* Ensure consistent column heights */ | |
.gradio-row.equal-height { | |
display: flex ; | |
align-items: stretch ; | |
} | |
.gradio-row.equal-height > .gradio-column { | |
display: flex ; | |
flex-direction: column ; | |
} | |
/* Lower section column height matching */ | |
.gradio-row.equal-height .gradio-column { | |
min-height: 450px ; | |
height: 450px ; | |
display: flex ; | |
flex-direction: column ; | |
} | |
/* Lower left instruction box sizing */ | |
.gradio-row.equal-height .gradio-column:first-child .gradio-textbox:first-child textarea { | |
height: 80px ; | |
min-height: 80px ; | |
max-height: 80px ; | |
resize: none ; | |
} | |
/* Lower left response input box sizing - increased to match right side */ | |
.gradio-row.equal-height .gradio-column:first-child .gradio-textbox:last-child textarea { | |
height: 210px ; | |
min-height: 210px ; | |
max-height: 210px ; | |
resize: none ; | |
overflow-y: auto ; | |
} | |
/* Button spacing - reduced for better layout */ | |
.gradio-row.equal-height .gradio-button { | |
margin: 5px 0 ; | |
flex-shrink: 0 ; | |
} | |
/* Fix tabs container height */ | |
.gradio-tabs { | |
height: 400px ; | |
} | |
.gradio-tabitem { | |
height: 370px ; | |
} | |
/* Clean fallback rules */ | |
.gradio-row.equal-height [class*="gradio-"] { | |
box-sizing: border-box ; | |
} | |
/* Ensure inner content fills containers properly */ | |
#basic_response_box div, | |
#basic_sources_in_context_box div { | |
height: inherit ; | |
margin: 0 ; | |
} | |
/* Force full height on content elements */ | |
#basic_response_box .highlighted-text > div, | |
#basic_sources_in_context_box .highlighted-textbox > div { | |
height: 100% ; | |
min-height: 100% ; | |
margin: 0 ; | |
padding: 0 ; | |
} | |
/* Remove any default spacing on response box */ | |
#basic_response_box .label-wrap { | |
margin-bottom: 2px ; | |
} | |
#basic_response_box .block { | |
padding: 0 ; | |
margin: 0 ; | |
} | |
.example-title { | |
text-align: left ; | |
font-size: 1.5rem ; | |
font-weight: bold ; | |
} | |
/* Custom app title styling with Monochrome theme colors */ | |
.app-title { | |
text-align: center ; | |
margin: 2rem 0 ; | |
} | |
.app-title .highlight { | |
background: #ff6b35 ; | |
color: white ; | |
padding: 2px 9px ; | |
border-radius: 10px ; | |
font-weight: 700 ; | |
font-size: 3rem ; | |
margin-right: 4px ; | |
display: inline-block ; | |
} | |
.app-title .brand { | |
color: #333333 ; | |
font-weight: 700 ; | |
font-size: 3rem ; | |
margin-right: 12px ; | |
} | |
.app-title .subtitle { | |
color: #666666 ; | |
font-weight: 400 ; | |
font-size: 1.6rem ; | |
display: block ; | |
margin-top: 12px ; | |
} | |
/* Larger font for app description */ | |
.app-description p { | |
font-size: 1.25rem ; /* Increased from default */ | |
color: #555555 ; | |
line-height: 1.6 ; | |
} | |
.app-description-2 p { | |
font-size: 1.25rem ; /* Increased from default */ | |
color: #555555 ; | |
line-height: 1.6 ; | |
} | |
/* Attribution highlighting styles - use Gradio theme colors */ | |
.gradio-container .highlighted-text mark, | |
.gradio-container mark, | |
.highlighted-text mark, | |
mark { | |
border-radius: 3px ; | |
padding: 1px 3px ; | |
font-weight: 600 ; | |
margin: 0 ; | |
display: inline ; | |
line-height: inherit ; | |
border: none ; | |
box-decoration-break: clone ; | |
-webkit-box-decoration-break: clone ; | |
} | |
/* Ensure highlighting works in response boxes */ | |
.gradio-container #basic_response_box mark, | |
.gradio-container #basic_sources_box mark { | |
font-family: inherit ; | |
font-size: inherit ; | |
} | |
/* Set consistent height for both context boxes */ | |
.gradio-container #basic_context_box, | |
.gradio-container #basic_sources_in_context_box { | |
height: 500px ; | |
} | |
/* Ensure the left textbox and its textarea respect the height constraint */ | |
.gradio-container #basic_context_box { | |
max-height: 500px ; | |
} | |
.gradio-container #basic_context_box textarea { | |
height: 460px ; | |
max-height: 460px ; | |
overflow-y: auto ; | |
resize: none ; | |
} | |
/* Make highlighted context tab look exactly like regular context tab */ | |
.gradio-container #basic_sources_in_context_box { | |
background: var(--input-background-fill) ; | |
border: 1px solid var(--input-border-color) ; | |
border-radius: var(--input-radius) ; | |
color: var(--body-text-color) ; | |
font-family: var(--font) ; | |
font-size: var(--text-sm) ; | |
line-height: var(--line-sm) ; | |
padding: var(--input-padding) ; | |
height: 600px ; | |
overflow: hidden ; | |
} | |
/* Set height for response box container */ | |
.gradio-container #basic_response_box { | |
height: 600px ; | |
overflow: hidden ; | |
} | |
/* Apply scrolling only to the inner content areas */ | |
.gradio-container #basic_sources_in_context_box .highlight, | |
.gradio-container #basic_sources_in_context_box > div > div { | |
max-height: 600px ; | |
overflow-y: auto ; | |
} | |
.gradio-container #basic_response_box .highlight, | |
.gradio-container #basic_response_box > div > div { | |
max-height: 600px ; | |
overflow-y: auto ; | |
} | |
/* Add a separator between the two context boxes */ | |
#basic_context_box { | |
border-right: 1px solid var(--border-color-primary) ; | |
} | |
/* Ensure all text is visible with proper color */ | |
.gradio-container #basic_sources_in_context_box, | |
.gradio-container #basic_sources_in_context_box * { | |
color: var(--body-text-color) ; | |
} | |
/* Keep highlighting functionality working */ | |
.gradio-container #basic_sources_in_context_box mark { | |
color: var(--body-text-color) ; | |
font-weight: 600 ; | |
border-radius: 4px ; | |
padding: 2px 4px ; | |
margin: 0 1px ; | |
} | |
/* Only customize example buttons - let Gradio theme handle everything else */ | |
/* Example buttons container */ | |
.example-button-container { | |
display: grid ; | |
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) ; | |
gap: 16px ; | |
margin: 0px 0 ; | |
padding: 0 ; | |
} | |
/* Example button styling */ | |
.example-button button, | |
button.example-button { | |
width: 100% ; | |
height: 180px ; | |
border-radius: 8px ; | |
border: 0px solid transparent ; | |
cursor: pointer ; | |
transition: all 0.2s ease ; | |
overflow: hidden ; | |
box-shadow: none ; | |
font-size: 1.4rem ; | |
font-weight: 700 ; | |
color: white ; | |
text-align: center ; | |
padding: 20px ; | |
position: relative ; | |
background-size: cover ; | |
background-position: center ; | |
background-repeat: no-repeat ; | |
text-shadow: | |
0 2px 6px rgba(0, 0, 0, 0.7), | |
1px 1px 2px rgba(0, 0, 0, 0.8) ; | |
} | |
/* Light overlay for better image visibility - now uses ::after */ | |
.example-button button::after, | |
button.example-button::after { | |
content: '' ; | |
position: absolute ; | |
top: 0 ; | |
left: 0 ; | |
right: 0 ; | |
bottom: 0 ; | |
background: rgba(0, 0, 0, 0.1) ; | |
z-index: 1 ; | |
transition: background 0.2s ease ; | |
pointer-events: none ; | |
} | |
/* Text content above overlay */ | |
.example-button button span, | |
button.example-button span { | |
position: relative ; | |
z-index: 3 ; | |
text-shadow: | |
0 2px 6px rgba(0, 0, 0, 0.7), | |
1px 1px 2px rgba(0, 0, 0, 0.8) ; | |
font-weight: 700 ; | |
letter-spacing: 0.5px ; | |
} | |
/* Make sure button text itself is also above blur */ | |
.example-button button, | |
button.example-button { | |
z-index: 0 ; | |
position: relative ; | |
} | |
.example-button button *, | |
button.example-button * { | |
position: relative ; | |
z-index: 3 ; | |
} | |
/* Hover effects */ | |
.example-button button:hover, | |
button.example-button:hover { | |
transform: translateY(-2px) ; | |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) ; | |
} | |
.example-button button:hover::after, | |
button.example-button:hover::after { | |
background: rgba(0, 0, 0, 0.05) ; | |
} | |
/* Specific button backgrounds with solid colors and textures */ | |
.example-paper button, button.example-paper { | |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) ; | |
} | |
.example-paper button::before, button.example-paper::before { | |
content: '' ; | |
position: absolute ; | |
top: 0 ; | |
left: 0 ; | |
right: 0 ; | |
bottom: 0 ; | |
background: repeating-linear-gradient( | |
45deg, | |
transparent, | |
transparent 2px, | |
rgba(255,255,255,0.1) 2px, | |
rgba(255,255,255,0.1) 4px | |
) | ;|
z-index: 1 ; | |
} | |
.example-movie button, button.example-movie { | |
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) ; | |
} | |
.example-movie button::before, button.example-movie::before { | |
content: '' ; | |
position: absolute ; | |
top: 0 ; | |
left: 0 ; | |
right: 0 ; | |
bottom: 0 ; | |
background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 2px, transparent 2px), | |
radial-gradient(circle at 80% 50%, rgba(255,255,255,0.15) 2px, transparent 2px) ; | |
background-size: 20px 20px ; | |
z-index: 1 ; | |
} | |
.example-code button, button.example-code { | |
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) ; | |
} | |
.example-code button::before, button.example-code::before { | |
content: '' ; | |
position: absolute ; | |
top: 0 ; | |
left: 0 ; | |
right: 0 ; | |
bottom: 0 ; | |
background: repeating-linear-gradient( | |
90deg, | |
transparent, | |
transparent 8px, | |
rgba(255,255,255,0.1) 8px, | |
rgba(255,255,255,0.1) 10px | |
) | ;|
z-index: 1 ; | |
} | |
.example-paper-alt button, button.example-paper-alt { | |
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) ; | |
} | |
.example-paper-alt button::before, button.example-paper-alt::before { | |
content: '' ; | |
position: absolute ; | |
top: 0 ; | |
left: 0 ; | |
right: 0 ; | |
bottom: 0 ; | |
background: repeating-conic-gradient( | |
from 0deg at 50% 50%, | |
transparent 0deg, | |
rgba(255,255,255,0.1) 30deg, | |
transparent 60deg | |
) | ;|
background-size: 30px 30px ; | |
z-index: 1 ; | |
} | |
.example-movie-alt button, button.example-movie-alt { | |
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) ; | |
} | |
.example-movie-alt button::before, button.example-movie-alt::before { | |
content: '' ; | |
position: absolute ; | |
top: 0 ; | |
left: 0 ; | |
right: 0 ; | |
bottom: 0 ; | |
background: repeating-linear-gradient( | |
-45deg, | |
transparent, | |
transparent 3px, | |
rgba(255,255,255,0.15) 3px, | |
rgba(255,255,255,0.15) 6px | |
) | ;|
z-index: 1 ; | |
} | |
.example-code-alt button, button.example-code-alt { | |
background: linear-gradient(135deg, #a8e6cf 0%, #ffd3a5 100%) ; | |
} | |
.example-code-alt button::before, button.example-code-alt::before { | |
content: '' ; | |
position: absolute ; | |
top: 0 ; | |
left: 0 ; | |
right: 0 ; | |
bottom: 0 ; | |
background: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.12) 1px, transparent 1px), | |
radial-gradient(circle at 75% 75%, rgba(255,255,255,0.12) 1px, transparent 1px) ; | |
background-size: 15px 15px ; | |
z-index: 1 ; | |
} | |
/* Mobile responsiveness for example buttons and title */ | |
@media (max-width: 768px) { | |
.gradio-container { | |
padding-left: 1rem ; | |
padding-right: 1rem ; | |
} | |
.example-button-container { | |
grid-template-columns: 1fr ; | |
gap: 10px ; | |
} | |
.example-button button, | |
button.example-button { | |
height: 160px ; | |
font-size: 1.2rem ; | |
padding: 15px ; | |
} | |
/* Mobile title sizing */ | |
.app-title .highlight, | |
.app-title .brand { | |
font-size: 2.2rem ; | |
} | |
.app-title .subtitle { | |
font-size: 1.4rem ; | |
} | |
} | |
/* Tablet responsiveness for example buttons only */ | |
@media (max-width: 1024px) and (min-width: 769px) { | |
.example-button-container { | |
grid-template-columns: repeat(2, 1fr) ; | |
} | |
} |