Navada25 commited on
Commit
e37b775
·
verified ·
1 Parent(s): bd43db3

Update public/split_screen.css for document viewer

Browse files
Files changed (1) hide show
  1. public/split_screen.css +351 -0
public/split_screen.css ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Split Screen Layout for Chainlit Application */
2
+
3
+ /* Default state - NO split screen until document is clicked */
4
+ #root > div {
5
+ width: 100vw !important;
6
+ height: 100vh !important;
7
+ position: relative !important;
8
+ }
9
+
10
+ /* When split-screen is active */
11
+ #root > div.split-active {
12
+ display: grid !important;
13
+ grid-template-columns: 60% 40% !important;
14
+ height: 100vh !important;
15
+ width: 100vw !important;
16
+ overflow: hidden !important;
17
+ }
18
+
19
+ /* Document viewer - Hidden by default */
20
+ #document-viewer {
21
+ display: none !important;
22
+ position: fixed !important;
23
+ right: 0 !important;
24
+ top: 0 !important;
25
+ width: 40% !important;
26
+ height: 100vh !important;
27
+ background: #1a1a1a !important;
28
+ border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
29
+ overflow-y: auto !important;
30
+ z-index: 100 !important;
31
+ }
32
+
33
+ /* Show document viewer when active */
34
+ #document-viewer.active {
35
+ display: flex !important;
36
+ flex-direction: column !important;
37
+ }
38
+
39
+ /* Adjust main content when viewer is active */
40
+ body.document-viewer-active main {
41
+ max-width: calc(60vw - 40px) !important;
42
+ margin-right: 40vw !important;
43
+ }
44
+
45
+ /* Document viewer header */
46
+ .document-header {
47
+ background: #0d0d0d !important;
48
+ padding: 15px 20px !important;
49
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
50
+ display: flex !important;
51
+ justify-content: space-between !important;
52
+ align-items: center !important;
53
+ }
54
+
55
+ .document-header h3 {
56
+ color: #ffffff !important;
57
+ margin: 0 !important;
58
+ font-size: 1.1rem !important;
59
+ font-weight: 500 !important;
60
+ }
61
+
62
+ /* Close button */
63
+ .document-close-btn {
64
+ padding: 6px 16px !important;
65
+ background: rgba(255, 71, 87, 0.9) !important;
66
+ color: white !important;
67
+ border: none !important;
68
+ border-radius: 4px !important;
69
+ cursor: pointer !important;
70
+ font-size: 14px !important;
71
+ transition: background 0.3s ease !important;
72
+ }
73
+
74
+ .document-close-btn:hover {
75
+ background: #ff4757 !important;
76
+ }
77
+
78
+ /* Document tabs */
79
+ .document-tabs {
80
+ display: flex !important;
81
+ background: #0d0d0d !important;
82
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
83
+ overflow-x: auto !important;
84
+ }
85
+
86
+ .document-tab {
87
+ padding: 10px 20px !important;
88
+ background: transparent !important;
89
+ color: #888 !important;
90
+ border: none !important;
91
+ border-bottom: 2px solid transparent !important;
92
+ cursor: pointer !important;
93
+ transition: all 0.3s ease !important;
94
+ white-space: nowrap !important;
95
+ font-size: 14px !important;
96
+ }
97
+
98
+ .document-tab:hover {
99
+ background: rgba(255, 255, 255, 0.05) !important;
100
+ color: #ccc !important;
101
+ }
102
+
103
+ .document-tab.active {
104
+ border-bottom-color: #ff4757 !important;
105
+ color: #ffffff !important;
106
+ background: rgba(255, 71, 87, 0.1) !important;
107
+ }
108
+
109
+ /* Document content area */
110
+ #document-content {
111
+ flex: 1 !important;
112
+ background: #0d0d0d !important;
113
+ padding: 20px !important;
114
+ color: #e0e0e0 !important;
115
+ overflow-y: auto !important;
116
+ }
117
+
118
+ /* Empty state message */
119
+ .document-empty-state {
120
+ display: flex !important;
121
+ flex-direction: column !important;
122
+ align-items: center !important;
123
+ justify-content: center !important;
124
+ height: 100% !important;
125
+ color: #666 !important;
126
+ text-align: center !important;
127
+ padding: 40px !important;
128
+ }
129
+
130
+ .document-empty-state h4 {
131
+ color: #888 !important;
132
+ margin-bottom: 10px !important;
133
+ }
134
+
135
+ /* Document content styling */
136
+ .document-content {
137
+ background: #1a1a1a !important;
138
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
139
+ border-radius: 8px !important;
140
+ padding: 20px !important;
141
+ margin-bottom: 10px !important;
142
+ color: #e0e0e0 !important;
143
+ font-family: 'Monaco', 'Courier New', monospace !important;
144
+ white-space: pre-wrap !important;
145
+ word-wrap: break-word !important;
146
+ }
147
+
148
+ /* Code blocks in document viewer */
149
+ .document-code {
150
+ background: #0d0d0d !important;
151
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
152
+ border-radius: 6px !important;
153
+ padding: 16px !important;
154
+ overflow-x: auto !important;
155
+ font-family: 'Monaco', 'Courier New', monospace !important;
156
+ font-size: 14px !important;
157
+ line-height: 1.5 !important;
158
+ color: #e0e0e0 !important;
159
+ }
160
+
161
+ /* Images in document viewer */
162
+ .document-image {
163
+ max-width: 100% !important;
164
+ height: auto !important;
165
+ border-radius: 8px !important;
166
+ margin: 10px 0 !important;
167
+ }
168
+
169
+ /* PDF viewer */
170
+ .pdf-viewer {
171
+ width: 100% !important;
172
+ height: calc(100vh - 200px) !important;
173
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
174
+ border-radius: 8px !important;
175
+ background: white !important;
176
+ }
177
+
178
+ /* Scrollbar styling */
179
+ #document-viewer::-webkit-scrollbar,
180
+ #document-content::-webkit-scrollbar {
181
+ width: 8px !important;
182
+ }
183
+
184
+ #document-viewer::-webkit-scrollbar-track,
185
+ #document-content::-webkit-scrollbar-track {
186
+ background: #0d0d0d !important;
187
+ }
188
+
189
+ #document-viewer::-webkit-scrollbar-thumb,
190
+ #document-content::-webkit-scrollbar-thumb {
191
+ background: #333 !important;
192
+ border-radius: 4px !important;
193
+ }
194
+
195
+ #document-viewer::-webkit-scrollbar-thumb:hover,
196
+ #document-content::-webkit-scrollbar-thumb:hover {
197
+ background: #555 !important;
198
+ }
199
+
200
+ /* Make clickable elements more obvious */
201
+ div[class*="MuiPaper-root"] img,
202
+ div[class*="MuiPaper-root"] a[download],
203
+ [data-testid*="image"],
204
+ [data-testid*="file"],
205
+ .message-content img,
206
+ .message-content a[download] {
207
+ cursor: pointer !important;
208
+ transition: all 0.2s ease !important;
209
+ position: relative !important;
210
+ }
211
+
212
+ div[class*="MuiPaper-root"] img:hover,
213
+ [data-testid*="image"]:hover,
214
+ .message-content img:hover {
215
+ transform: scale(1.02) !important;
216
+ box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3) !important;
217
+ }
218
+
219
+ /* Add visual indicator for clickable files */
220
+ div[class*="MuiPaper-root"] a[download]::after,
221
+ .message-content a[download]::after {
222
+ content: " 📎 Click to view" !important;
223
+ font-size: 12px !important;
224
+ color: #ff4757 !important;
225
+ margin-left: 8px !important;
226
+ }
227
+
228
+ /* Viewer button styling */
229
+ .viewer-button {
230
+ position: absolute !important;
231
+ top: 5px !important;
232
+ right: 5px !important;
233
+ padding: 6px 12px !important;
234
+ background: #ff4757 !important;
235
+ color: white !important;
236
+ border: none !important;
237
+ border-radius: 6px !important;
238
+ font-size: 12px !important;
239
+ font-weight: 500 !important;
240
+ cursor: pointer !important;
241
+ z-index: 999 !important;
242
+ transition: all 0.3s ease !important;
243
+ box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3) !important;
244
+ min-width: 60px !important;
245
+ text-align: center !important;
246
+ }
247
+
248
+ .viewer-button:hover {
249
+ background: #ff3742 !important;
250
+ transform: translateY(-1px) !important;
251
+ box-shadow: 0 4px 12px rgba(255, 71, 87, 0.5) !important;
252
+ }
253
+
254
+ /* Make file elements positioned for absolute buttons */
255
+ div[class*="MuiPaper-root"],
256
+ .message-content > div,
257
+ [data-testid*="element"],
258
+ [data-testid*="file"],
259
+ [data-testid*="pdf"] {
260
+ position: relative !important;
261
+ }
262
+
263
+ /* Mobile responsive */
264
+ @media (max-width: 768px) {
265
+ #document-viewer {
266
+ width: 100% !important;
267
+ z-index: 1000 !important;
268
+ }
269
+
270
+ #document-viewer.active {
271
+ position: fixed !important;
272
+ top: 0 !important;
273
+ left: 0 !important;
274
+ right: 0 !important;
275
+ bottom: 0 !important;
276
+ }
277
+
278
+ body.document-viewer-active main {
279
+ margin-right: 0 !important;
280
+ max-width: 100% !important;
281
+ }
282
+
283
+ /* Mobile toggle button */
284
+ .mobile-doc-toggle {
285
+ display: flex !important;
286
+ position: fixed !important;
287
+ bottom: 20px !important;
288
+ right: 20px !important;
289
+ width: 56px !important;
290
+ height: 56px !important;
291
+ border-radius: 50% !important;
292
+ background: #ff4757 !important;
293
+ color: white !important;
294
+ border: none !important;
295
+ box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
296
+ cursor: pointer !important;
297
+ z-index: 999 !important;
298
+ align-items: center !important;
299
+ justify-content: center !important;
300
+ font-size: 24px !important;
301
+ }
302
+ }
303
+
304
+ /* Loading animation */
305
+ .document-loading {
306
+ display: flex !important;
307
+ justify-content: center !important;
308
+ align-items: center !important;
309
+ padding: 40px !important;
310
+ color: #888 !important;
311
+ }
312
+
313
+ .document-loading::after {
314
+ content: '...' !important;
315
+ animation: dots 1.5s infinite !important;
316
+ }
317
+
318
+ @keyframes dots {
319
+ 0%, 20% { content: '.' !important; }
320
+ 40% { content: '..' !important; }
321
+ 60%, 100% { content: '...' !important; }
322
+ }
323
+
324
+ /* Ensure main chat area remains usable */
325
+ main {
326
+ transition: margin-right 0.3s ease !important;
327
+ }
328
+
329
+ /* Pin icon for keeping documents */
330
+ .document-pin {
331
+ margin-left: auto !important;
332
+ padding: 4px 8px !important;
333
+ background: transparent !important;
334
+ border: 1px solid #666 !important;
335
+ border-radius: 4px !important;
336
+ color: #888 !important;
337
+ cursor: pointer !important;
338
+ font-size: 12px !important;
339
+ transition: all 0.3s ease !important;
340
+ }
341
+
342
+ .document-pin:hover {
343
+ border-color: #ff4757 !important;
344
+ color: #ff4757 !important;
345
+ }
346
+
347
+ .document-pin.pinned {
348
+ background: #ff4757 !important;
349
+ color: white !important;
350
+ border-color: #ff4757 !important;
351
+ }