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