Spaces:
Running
Running
| /* Minimal essential styling */ | |
| /* Processing status container */ | |
| .processing-status-container { | |
| margin: 10px 0; | |
| padding: 8px 12px; | |
| border-left: 3px solid #5c6bc0; | |
| font-size: 0.9rem; | |
| } | |
| /* Result card styling */ | |
| .previous-results-container { | |
| margin-bottom: 20px; | |
| color: #000000 ; | |
| background-color: #ffffff ; | |
| } | |
| /* Let Streamlit handle text colors based on background */ | |
| /* Reset forced white text to use Streamlit defaults */ | |
| .result-card { | |
| border: 1px solid #e0e0e0; | |
| border-radius: 4px; | |
| padding: 15px; | |
| margin-bottom: 15px; | |
| } | |
| .result-header { | |
| display: flex; | |
| justify-content: space-between; | |
| margin-bottom: 10px; | |
| padding-bottom: 5px; | |
| border-bottom: 1px solid #e0e0e0; | |
| } | |
| .result-filename { | |
| font-weight: bold; | |
| font-size: 1.1rem; | |
| } | |
| .result-date { | |
| font-size: 0.9rem; | |
| color: #666; | |
| } | |
| .result-metadata { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 8px; | |
| margin-bottom: 10px; | |
| } | |
| .result-tag { | |
| background-color: #e3f2fd; | |
| border-radius: 16px; | |
| padding: 3px 10px; | |
| font-size: 0.85rem; | |
| color: #1565c0; | |
| } | |
| .selected-result-container { | |
| border: 1px solid #e0e0e0; | |
| border-radius: 4px; | |
| padding: 20px; | |
| margin: 15px 0; | |
| } | |
| .selected-result-title { | |
| font-size: 1.3rem; | |
| font-weight: bold; | |
| margin-bottom: 15px; | |
| } | |
| /* Fix for image preprocessing preview */ | |
| .stExpander { | |
| overflow: hidden ; | |
| } | |
| .stExpander img { | |
| max-width: 100% ; | |
| height: auto ; | |
| object-fit: contain ; | |
| } | |
| /* Additional fixes for image preprocessing preview in expanders */ | |
| .streamlit-expanderContent { | |
| overflow: hidden ; | |
| } | |
| .streamlit-expanderContent img { | |
| max-width: 95% ; | |
| height: auto ; | |
| object-fit: contain ; | |
| } | |
| /* Metadata container styling */ | |
| .metadata-container { | |
| background-color: #f8f9fa; | |
| border-radius: 4px; | |
| padding: 12px; | |
| margin-bottom: 20px; | |
| margin-top: -10px ; /* Negative margin to reduce gap with header */ | |
| border-left: 3px solid #4285f4; | |
| } | |
| /* Direct child styling to prevent nested containers */ | |
| .element-container > .metadata-container { | |
| margin-top: 0 ; | |
| } | |
| /* Fix spacing for headings above metadata container */ | |
| .element-container h3 + div .metadata-container, | |
| .element-container h1 + div .metadata-container, | |
| .element-container h2 + div .metadata-container, | |
| .stHeading + div div { | |
| margin-top: 0 ; | |
| } | |
| /* Fix for subheader and metadata container spacing */ | |
| .stHeading ~ div { | |
| margin-top: -10px ; | |
| } | |
| /* Remove excess space between metadata heading and content */ | |
| .stMarkdown + div div.element-container, | |
| .stMarkdown + div, | |
| .stHeading + div, | |
| .stHeading + div div.element-container, | |
| header + div.stMarkdown + div, | |
| [data-testid="stHeader"] + div, | |
| .stHeading + * { | |
| margin-top: 0 ; | |
| padding-top: 0 ; | |
| } | |
| /* PDF container fixes */ | |
| .stExpander .streamlit-expanderContent { | |
| max-width: 100% ; | |
| overflow: visible ; | |
| } | |
| /* Fix placement of fullscreen buttons, especially in expanders */ | |
| .element-container .stImage .stExpander button[title="View fullscreen"] { | |
| position: absolute ; | |
| top: 5px ; | |
| right: 5px ; | |
| } | |
| /* Fix PDF preview container */ | |
| .stPdfViewerContent, | |
| .stPdfViewer, | |
| .stPdfViewerPagesContainer { | |
| width: 100% ; | |
| max-width: 100% ; | |
| overflow: visible ; | |
| } | |
| /* Fix for expandable content */ | |
| .stExpander > div[data-testid="stExpander"] { | |
| max-width: 100% ; | |
| overflow: visible ; | |
| } | |
| /* Fix positioning for fullscreen buttons in image containers */ | |
| .stImage button[title="View fullscreen"] { | |
| position: absolute ; | |
| top: 5px ; | |
| right: 5px ; | |
| z-index: 1000 ; | |
| visibility: visible ; | |
| opacity: 1 ; | |
| width: 28px ; | |
| height: 28px ; | |
| padding: 0 ; | |
| margin: 0 ; | |
| background-color: rgba(255, 255, 255, 0.7) ; | |
| border-radius: 4px ; | |
| display: flex ; | |
| align-items: center ; | |
| justify-content: center ; | |
| } | |
| /* Fix fullscreen button styling */ | |
| button[title="View fullscreen"], | |
| button.streamlit-expanderHeader { | |
| z-index: 999 ; | |
| visibility: visible ; | |
| opacity: 1 ; | |
| border-radius: 4px ; | |
| position: absolute ; | |
| top: 5px ; | |
| right: 5px ; | |
| width: 28px ; | |
| height: 28px ; | |
| padding: 0 ; | |
| margin: 0 ; | |
| background-color: rgba(255, 255, 255, 0.7) ; | |
| display: flex ; | |
| align-items: center ; | |
| justify-content: center ; | |
| } | |
| /* Make text visible in Previous Results tab - ensure high contrast */ | |
| .previous-results-container h3, | |
| .previous-results-container p, | |
| .previous-results-container .result-filename, | |
| .previous-results-container .result-date, | |
| .previous-results-container .result-tag { | |
| color: #000000 ; | |
| text-shadow: none ; | |
| } | |
| /* No Results styling with proper contrast */ | |
| .previous-results-container[style*="text-align: center"] { | |
| background-color: #f0f2f6 ; | |
| border-radius: 8px ; | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) ; | |
| } | |
| /* Additional image fixes for all containers */ | |
| .document-content img, | |
| .markdown-text-container img, | |
| .page-text-content img, | |
| .image-container img, | |
| .streamlit-expanderContent img { | |
| max-width: 100% ; | |
| height: auto ; | |
| object-fit: contain ; | |
| } | |
| /* Responsive design rules */ | |
| /* Specific rules for mobile/small screens */ | |
| @media (max-width: 768px) { | |
| .stExpander img, | |
| .document-content img, | |
| .markdown-text-container img, | |
| .page-text-content img, | |
| .image-container img, | |
| .streamlit-expanderContent img { | |
| max-width: 95% ; | |
| } | |
| /* Improve responsive layout for example documents */ | |
| .stImage, | |
| .css-6qob1r, | |
| .css-zq5wmm, | |
| .css-fg4pbf, | |
| [data-testid="column"], | |
| [data-testid="stHorizontalBlock"] > div { | |
| margin-bottom: 20px ; | |
| padding: 0 10px ; | |
| } | |
| .stImage img { | |
| width: 100% ; | |
| max-width: 100% ; | |
| height: auto ; | |
| object-fit: contain ; | |
| } | |
| .stColumnContainer, | |
| .css-jjjwqm, | |
| .css-fg4pbf, | |
| [data-testid="column"] { | |
| gap: 20px ; | |
| margin-bottom: 20px ; | |
| } | |
| /* Force separate columns on mid-sized screens */ | |
| [data-testid="stHorizontalBlock"] { | |
| flex-wrap: wrap ; | |
| } | |
| [data-testid="stHorizontalBlock"] > div { | |
| min-width: 45% ; | |
| flex: 1 1 45% ; | |
| } | |
| } | |
| /* Modern Streamlit styling - better responsive behavior */ | |
| .block-container { | |
| padding-top: 2rem ; | |
| padding-bottom: 2rem ; | |
| } | |
| /* Specific rules for very small screens (mobile) */ | |
| @media (max-width: 640px) { | |
| /* Force single column on very small screens */ | |
| .row-widget.stHorizontal > div, | |
| div[data-testid="stHorizontalBlock"] > div { | |
| flex-direction: column ; | |
| width: 100% ; | |
| } | |
| /* Critical fix for column display to prevent overlapping */ | |
| [data-testid="column"] { | |
| width: 100% ; | |
| flex: 1 1 100% ; | |
| padding: 0 ; | |
| min-width: 100% ; | |
| max-width: 100% ; | |
| float: none ; | |
| clear: both ; | |
| display: block ; | |
| } | |
| /* Enforce correct column layout for Streamlit's container elements */ | |
| div[data-testid="stHorizontalBlock"] { | |
| flex-direction: column ; | |
| display: block ; | |
| } | |
| /* Make images more visible on small screens */ | |
| .row-widget.stImage img, | |
| [data-testid="stImage"] > img { | |
| max-width: 100% ; | |
| width: 100% ; | |
| margin-bottom: 15px ; | |
| } | |
| /* Fix example documents grid layout */ | |
| .stImage { | |
| display: block ; | |
| margin-left: auto ; | |
| margin-right: auto ; | |
| width: 100% ; | |
| } | |
| } | |
| /* Fix image display in grid layout */ | |
| .row-widget.stImage, | |
| .css-z5fcl4 { | |
| text-align: center ; | |
| margin-bottom: 15px ; | |
| padding: 0 ; | |
| } | |
| .row-widget.stImage img, | |
| .css-z5fcl4 img { | |
| max-height: 250px ; | |
| object-fit: contain ; | |
| border-radius: 4px ; | |
| border: 1px solid rgba(0, 0, 0, 0.1) ; | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) ; | |
| } | |
| /* Better caption styling for images */ | |
| .css-z5fcl4 .caption, | |
| .caption, | |
| [data-testid="caption"], | |
| .css-1b0udgb, | |
| .css-183lzff { | |
| margin-top: 5px ; | |
| font-weight: 500 ; | |
| text-align: center ; | |
| font-size: 0.9rem ; | |
| } |