Spaces:
Build error
Build error
| /* Split Screen Layout for Chainlit Application */ | |
| /* Default state - NO split screen until document is clicked */ | |
| #root > div { | |
| width: 100vw ; | |
| height: 100vh ; | |
| position: relative ; | |
| } | |
| /* When split-screen is active */ | |
| #root > div.split-active { | |
| display: grid ; | |
| grid-template-columns: 60% 40% ; | |
| height: 100vh ; | |
| width: 100vw ; | |
| overflow: hidden ; | |
| } | |
| /* Document viewer - Hidden by default */ | |
| #document-viewer { | |
| display: none ; | |
| position: fixed ; | |
| right: 0 ; | |
| top: 0 ; | |
| width: 40% ; | |
| height: 100vh ; | |
| background: #1a1a1a ; | |
| border-left: 2px solid rgba(255, 255, 255, 0.1) ; | |
| overflow-y: auto ; | |
| z-index: 100 ; | |
| } | |
| /* Show document viewer when active */ | |
| #document-viewer.active { | |
| display: flex ; | |
| flex-direction: column ; | |
| } | |
| /* Adjust main content when viewer is active */ | |
| body.document-viewer-active main { | |
| max-width: calc(60vw - 40px) ; | |
| margin-right: 40vw ; | |
| } | |
| /* Document viewer header */ | |
| .document-header { | |
| background: #0d0d0d ; | |
| padding: 15px 20px ; | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.1) ; | |
| display: flex ; | |
| justify-content: space-between ; | |
| align-items: center ; | |
| } | |
| .document-header h3 { | |
| color: #ffffff ; | |
| margin: 0 ; | |
| font-size: 1.1rem ; | |
| font-weight: 500 ; | |
| } | |
| /* Close button */ | |
| .document-close-btn { | |
| padding: 6px 16px ; | |
| background: rgba(255, 71, 87, 0.9) ; | |
| color: white ; | |
| border: none ; | |
| border-radius: 4px ; | |
| cursor: pointer ; | |
| font-size: 14px ; | |
| transition: background 0.3s ease ; | |
| } | |
| .document-close-btn:hover { | |
| background: #ff4757 ; | |
| } | |
| /* Document tabs */ | |
| .document-tabs { | |
| display: flex ; | |
| background: #0d0d0d ; | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.1) ; | |
| overflow-x: auto ; | |
| } | |
| .document-tab { | |
| padding: 10px 20px ; | |
| background: transparent ; | |
| color: #888 ; | |
| border: none ; | |
| border-bottom: 2px solid transparent ; | |
| cursor: pointer ; | |
| transition: all 0.3s ease ; | |
| white-space: nowrap ; | |
| font-size: 14px ; | |
| } | |
| .document-tab:hover { | |
| background: rgba(255, 255, 255, 0.05) ; | |
| color: #ccc ; | |
| } | |
| .document-tab.active { | |
| border-bottom-color: #ff4757 ; | |
| color: #ffffff ; | |
| background: rgba(255, 71, 87, 0.1) ; | |
| } | |
| /* Document content area */ | |
| #document-content { | |
| flex: 1 ; | |
| background: #0d0d0d ; | |
| padding: 20px ; | |
| color: #e0e0e0 ; | |
| overflow-y: auto ; | |
| } | |
| /* Empty state message */ | |
| .document-empty-state { | |
| display: flex ; | |
| flex-direction: column ; | |
| align-items: center ; | |
| justify-content: center ; | |
| height: 100% ; | |
| color: #666 ; | |
| text-align: center ; | |
| padding: 40px ; | |
| } | |
| .document-empty-state h4 { | |
| color: #888 ; | |
| margin-bottom: 10px ; | |
| } | |
| /* Document content styling */ | |
| .document-content { | |
| background: #1a1a1a ; | |
| border: 1px solid rgba(255, 255, 255, 0.1) ; | |
| border-radius: 8px ; | |
| padding: 20px ; | |
| margin-bottom: 10px ; | |
| color: #e0e0e0 ; | |
| font-family: 'Monaco', 'Courier New', monospace ; | |
| white-space: pre-wrap ; | |
| word-wrap: break-word ; | |
| } | |
| /* Code blocks in document viewer */ | |
| .document-code { | |
| background: #0d0d0d ; | |
| border: 1px solid rgba(255, 255, 255, 0.1) ; | |
| border-radius: 6px ; | |
| padding: 16px ; | |
| overflow-x: auto ; | |
| font-family: 'Monaco', 'Courier New', monospace ; | |
| font-size: 14px ; | |
| line-height: 1.5 ; | |
| color: #e0e0e0 ; | |
| } | |
| /* Images in document viewer */ | |
| .document-image { | |
| max-width: 100% ; | |
| height: auto ; | |
| border-radius: 8px ; | |
| margin: 10px 0 ; | |
| } | |
| /* PDF viewer */ | |
| .pdf-viewer { | |
| width: 100% ; | |
| height: calc(100vh - 200px) ; | |
| border: 1px solid rgba(255, 255, 255, 0.1) ; | |
| border-radius: 8px ; | |
| background: white ; | |
| } | |
| /* Scrollbar styling */ | |
| #document-viewer::-webkit-scrollbar, | |
| #document-content::-webkit-scrollbar { | |
| width: 8px ; | |
| } | |
| #document-viewer::-webkit-scrollbar-track, | |
| #document-content::-webkit-scrollbar-track { | |
| background: #0d0d0d ; | |
| } | |
| #document-viewer::-webkit-scrollbar-thumb, | |
| #document-content::-webkit-scrollbar-thumb { | |
| background: #333 ; | |
| border-radius: 4px ; | |
| } | |
| #document-viewer::-webkit-scrollbar-thumb:hover, | |
| #document-content::-webkit-scrollbar-thumb:hover { | |
| background: #555 ; | |
| } | |
| /* Make clickable elements more obvious */ | |
| div[class*="MuiPaper-root"] img, | |
| div[class*="MuiPaper-root"] a[download], | |
| [data-testid*="image"], | |
| [data-testid*="file"], | |
| .message-content img, | |
| .message-content a[download] { | |
| cursor: pointer ; | |
| transition: all 0.2s ease ; | |
| position: relative ; | |
| } | |
| div[class*="MuiPaper-root"] img:hover, | |
| [data-testid*="image"]:hover, | |
| .message-content img:hover { | |
| transform: scale(1.02) ; | |
| box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3) ; | |
| } | |
| /* Add visual indicator for clickable files */ | |
| div[class*="MuiPaper-root"] a[download]::after, | |
| .message-content a[download]::after { | |
| content: " 📎 Click to view" ; | |
| font-size: 12px ; | |
| color: #ff4757 ; | |
| margin-left: 8px ; | |
| } | |
| /* Viewer button styling */ | |
| .viewer-button { | |
| position: absolute ; | |
| top: 5px ; | |
| right: 5px ; | |
| padding: 6px 12px ; | |
| background: #ff4757 ; | |
| color: white ; | |
| border: none ; | |
| border-radius: 6px ; | |
| font-size: 12px ; | |
| font-weight: 500 ; | |
| cursor: pointer ; | |
| z-index: 999 ; | |
| transition: all 0.3s ease ; | |
| box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3) ; | |
| min-width: 60px ; | |
| text-align: center ; | |
| } | |
| .viewer-button:hover { | |
| background: #ff3742 ; | |
| transform: translateY(-1px) ; | |
| box-shadow: 0 4px 12px rgba(255, 71, 87, 0.5) ; | |
| } | |
| /* Make file elements positioned for absolute buttons */ | |
| div[class*="MuiPaper-root"], | |
| .message-content > div, | |
| [data-testid*="element"], | |
| [data-testid*="file"], | |
| [data-testid*="pdf"] { | |
| position: relative ; | |
| } | |
| /* Mobile responsive */ | |
| @media (max-width: 768px) { | |
| #document-viewer { | |
| width: 100% ; | |
| z-index: 1000 ; | |
| } | |
| #document-viewer.active { | |
| position: fixed ; | |
| top: 0 ; | |
| left: 0 ; | |
| right: 0 ; | |
| bottom: 0 ; | |
| } | |
| body.document-viewer-active main { | |
| margin-right: 0 ; | |
| max-width: 100% ; | |
| } | |
| /* Mobile toggle button */ | |
| .mobile-doc-toggle { | |
| display: flex ; | |
| position: fixed ; | |
| bottom: 20px ; | |
| right: 20px ; | |
| width: 56px ; | |
| height: 56px ; | |
| border-radius: 50% ; | |
| background: #ff4757 ; | |
| color: white ; | |
| border: none ; | |
| box-shadow: 0 4px 12px rgba(0,0,0,0.3) ; | |
| cursor: pointer ; | |
| z-index: 999 ; | |
| align-items: center ; | |
| justify-content: center ; | |
| font-size: 24px ; | |
| } | |
| } | |
| /* Loading animation */ | |
| .document-loading { | |
| display: flex ; | |
| justify-content: center ; | |
| align-items: center ; | |
| padding: 40px ; | |
| color: #888 ; | |
| } | |
| .document-loading::after { | |
| content: '...' ; | |
| animation: dots 1.5s infinite ; | |
| } | |
| @keyframes dots { | |
| 0%, 20% { content: '.' ; } | |
| 40% { content: '..' ; } | |
| 60%, 100% { content: '...' ; } | |
| } | |
| /* Ensure main chat area remains usable */ | |
| main { | |
| transition: margin-right 0.3s ease ; | |
| } | |
| /* Pin icon for keeping documents */ | |
| .document-pin { | |
| margin-left: auto ; | |
| padding: 4px 8px ; | |
| background: transparent ; | |
| border: 1px solid #666 ; | |
| border-radius: 4px ; | |
| color: #888 ; | |
| cursor: pointer ; | |
| font-size: 12px ; | |
| transition: all 0.3s ease ; | |
| } | |
| .document-pin:hover { | |
| border-color: #ff4757 ; | |
| color: #ff4757 ; | |
| } | |
| .document-pin.pinned { | |
| background: #ff4757 ; | |
| color: white ; | |
| border-color: #ff4757 ; | |
| } |