File size: 9,647 Bytes
e37b775
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
/* 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;
}