Girish Jeswani commited on
Commit
61fb852
·
1 Parent(s): 7064ea8

new input component

Browse files
phd-advisor-frontend/src/components/EnhancedChatInput.js ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { useState, useRef, useEffect } from 'react';
2
+ import { Send, Paperclip, FileText, X, Trash2, Download } from 'lucide-react';
3
+ import FileUpload from './FileUpload';
4
+
5
+ const EnhancedChatInput = ({
6
+ onSendMessage,
7
+ onFileUploaded,
8
+ uploadedDocuments = [],
9
+ isLoading,
10
+ placeholder = "Ask your advisors anything about your PhD journey..."
11
+ }) => {
12
+ const [inputMessage, setInputMessage] = useState('');
13
+ const [showUpload, setShowUpload] = useState(false);
14
+ const [showDocuments, setShowDocuments] = useState(false);
15
+ const [isUploading, setIsUploading] = useState(false);
16
+ const textareaRef = useRef(null);
17
+
18
+ const handleSend = () => {
19
+ if (!inputMessage.trim() || isLoading || isUploading) return;
20
+
21
+ onSendMessage(inputMessage);
22
+ setInputMessage('');
23
+ if (textareaRef.current) {
24
+ textareaRef.current.style.height = 'auto';
25
+ }
26
+ };
27
+
28
+ const handleKeyPress = (e) => {
29
+ if (e.key === 'Enter' && !e.shiftKey) {
30
+ e.preventDefault();
31
+ handleSend();
32
+ }
33
+ };
34
+
35
+ const handleFileUploaded = (file, response) => {
36
+ setIsUploading(false);
37
+ setShowUpload(false);
38
+
39
+ if (onFileUploaded) {
40
+ onFileUploaded(file, response);
41
+ }
42
+ };
43
+
44
+ const handleUploadStart = () => {
45
+ setIsUploading(true);
46
+ };
47
+
48
+ const toggleUpload = () => {
49
+ if (!isUploading) {
50
+ setShowUpload(!showUpload);
51
+ setShowDocuments(false); // Close documents panel when opening upload
52
+ }
53
+ };
54
+
55
+ const toggleDocuments = () => {
56
+ setShowDocuments(!showDocuments);
57
+ setShowUpload(false); // Close upload panel when opening documents
58
+ };
59
+
60
+ // Auto-resize textarea
61
+ useEffect(() => {
62
+ if (textareaRef.current) {
63
+ textareaRef.current.style.height = 'auto';
64
+ textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px';
65
+ }
66
+ }, [inputMessage]);
67
+
68
+ const formatFileSize = (bytes) => {
69
+ if (bytes === 0) return '0 Bytes';
70
+ const k = 1024;
71
+ const sizes = ['Bytes', 'KB', 'MB', 'GB'];
72
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
73
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
74
+ };
75
+
76
+ const getFileIcon = (type) => {
77
+ if (type.includes('pdf')) return '📄';
78
+ if (type.includes('word') || type.includes('document')) return '📝';
79
+ if (type.includes('text')) return '📃';
80
+ return '📄';
81
+ };
82
+
83
+ const formatUploadTime = (date) => {
84
+ return new Date(date).toLocaleString([], {
85
+ month: 'short',
86
+ day: 'numeric',
87
+ hour: '2-digit',
88
+ minute: '2-digit'
89
+ });
90
+ };
91
+
92
+ const isDisabled = isLoading || isUploading;
93
+ const canSend = inputMessage.trim() && !isDisabled;
94
+
95
+ return (
96
+ <div className="enhanced-chat-input-container">
97
+ {/* File Upload Area */}
98
+ {showUpload && (
99
+ <div className="floating-upload-section">
100
+ <FileUpload
101
+ onFileUploaded={handleFileUploaded}
102
+ isUploading={isUploading}
103
+ onUploadStart={handleUploadStart}
104
+ />
105
+ </div>
106
+ )}
107
+
108
+ {/* Documents Viewer Panel */}
109
+ {showDocuments && (
110
+ <div className="floating-documents-section">
111
+ <div className="documents-header">
112
+ <div className="documents-title">
113
+ <FileText size={16} />
114
+ <span>Uploaded Documents ({uploadedDocuments.length})</span>
115
+ </div>
116
+ <button
117
+ onClick={() => setShowDocuments(false)}
118
+ className="close-documents-btn"
119
+ >
120
+ <X size={16} />
121
+ </button>
122
+ </div>
123
+
124
+ <div className="documents-list">
125
+ {uploadedDocuments.length === 0 ? (
126
+ <div className="no-documents">
127
+ <FileText size={24} />
128
+ <p>No documents uploaded yet</p>
129
+ <span>Upload documents to reference them in your conversations</span>
130
+ </div>
131
+ ) : (
132
+ uploadedDocuments.map((doc) => (
133
+ <div key={doc.id} className="document-item">
134
+ <div className="document-icon">
135
+ {getFileIcon(doc.type)}
136
+ </div>
137
+ <div className="document-info">
138
+ <div className="document-name">{doc.name}</div>
139
+ <div className="document-details">
140
+ {formatFileSize(doc.size)} • {formatUploadTime(doc.uploadTime)}
141
+ </div>
142
+ </div>
143
+ <div className="document-actions">
144
+ <button
145
+ className="document-action-btn"
146
+ title="Remove document"
147
+ onClick={() => {
148
+ // TODO: Implement remove functionality
149
+ console.log('Remove document:', doc.id);
150
+ }}
151
+ >
152
+ <Trash2 size={14} />
153
+ </button>
154
+ </div>
155
+ </div>
156
+ ))
157
+ )}
158
+ </div>
159
+ </div>
160
+ )}
161
+
162
+ {/* Main Input Box */}
163
+ <div className="floating-input-box">
164
+ {/* Text Input Row */}
165
+ <div className="text-input-row">
166
+ <textarea
167
+ ref={textareaRef}
168
+ value={inputMessage}
169
+ onChange={(e) => setInputMessage(e.target.value)}
170
+ onKeyPress={handleKeyPress}
171
+ placeholder={placeholder}
172
+ className="main-textarea"
173
+ disabled={isDisabled}
174
+ rows={1}
175
+ />
176
+ </div>
177
+
178
+ {/* Controls Row */}
179
+ <div className="controls-row">
180
+ {/* Left - File Controls */}
181
+ <div className="file-controls">
182
+ <button
183
+ onClick={toggleUpload}
184
+ className={`add-docs-btn ${showUpload ? 'active' : ''}`}
185
+ disabled={isUploading}
186
+ type="button"
187
+ >
188
+ <Paperclip size={16} />
189
+ <span>Add documents</span>
190
+ </button>
191
+
192
+ {uploadedDocuments.length > 0 && (
193
+ <button
194
+ onClick={toggleDocuments}
195
+ className={`view-docs-btn ${showDocuments ? 'active' : ''}`}
196
+ type="button"
197
+ title={`View ${uploadedDocuments.length} uploaded document${uploadedDocuments.length !== 1 ? 's' : ''}`}
198
+ >
199
+ <FileText size={16} />
200
+ <span className="docs-count">{uploadedDocuments.length}</span>
201
+ </button>
202
+ )}
203
+ </div>
204
+
205
+ {/* Right - Send Button */}
206
+ <button
207
+ onClick={handleSend}
208
+ disabled={!canSend}
209
+ className={`send-button ${canSend ? 'enabled' : 'disabled'}`}
210
+ type="button"
211
+ >
212
+ <Send size={16} />
213
+ </button>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ );
218
+ };
219
+
220
+ export default EnhancedChatInput;
phd-advisor-frontend/src/styles/EnhancedChatInput.css ADDED
@@ -0,0 +1,654 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* src/styles/EnhancedChatInput.css - Complete Fixed File */
2
+
3
+ /* Main Container */
4
+ .enhanced-chat-input-container {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 12px;
8
+ width: 100%;
9
+ max-width: 768px;
10
+ margin: 0 auto;
11
+ padding: 0 16px;
12
+ }
13
+
14
+ /* Floating Upload Section */
15
+ .floating-upload-section {
16
+ background: var(--bg-primary);
17
+ border: 1px solid var(--border-primary);
18
+ border-radius: 16px;
19
+ padding: 20px;
20
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
21
+ backdrop-filter: blur(20px);
22
+ -webkit-backdrop-filter: blur(20px);
23
+ animation: slideUpFade 0.2s ease-out;
24
+ }
25
+
26
+ [data-theme="dark"] .floating-upload-section {
27
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
28
+ }
29
+
30
+ /* Floating Documents Section */
31
+ .floating-documents-section {
32
+ background: var(--bg-primary);
33
+ border: 1px solid var(--border-primary);
34
+ border-radius: 16px;
35
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
36
+ backdrop-filter: blur(20px);
37
+ -webkit-backdrop-filter: blur(20px);
38
+ animation: slideUpFade 0.2s ease-out;
39
+ overflow: hidden;
40
+ }
41
+
42
+ [data-theme="dark"] .floating-documents-section {
43
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
44
+ }
45
+
46
+ .documents-header {
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: space-between;
50
+ padding: 16px 20px;
51
+ border-bottom: 1px solid var(--border-primary);
52
+ background: var(--bg-secondary);
53
+ }
54
+
55
+ .documents-title {
56
+ display: flex;
57
+ align-items: center;
58
+ gap: 8px;
59
+ font-weight: 600;
60
+ color: var(--text-primary);
61
+ font-size: 14px;
62
+ }
63
+
64
+ .close-documents-btn {
65
+ background: none;
66
+ border: none;
67
+ color: var(--text-secondary);
68
+ cursor: pointer;
69
+ padding: 4px;
70
+ border-radius: 6px;
71
+ transition: all 0.2s ease;
72
+ }
73
+
74
+ .close-documents-btn:hover {
75
+ background: var(--bg-tertiary);
76
+ color: var(--text-primary);
77
+ }
78
+
79
+ .documents-list {
80
+ max-height: 300px;
81
+ overflow-y: auto;
82
+ padding: 8px;
83
+ }
84
+
85
+ .no-documents {
86
+ display: flex;
87
+ flex-direction: column;
88
+ align-items: center;
89
+ justify-content: center;
90
+ padding: 40px 20px;
91
+ text-align: center;
92
+ color: var(--text-secondary);
93
+ }
94
+
95
+ .no-documents svg {
96
+ color: var(--text-tertiary);
97
+ margin-bottom: 12px;
98
+ }
99
+
100
+ .no-documents p {
101
+ margin: 0 0 4px 0;
102
+ font-weight: 500;
103
+ color: var(--text-primary);
104
+ }
105
+
106
+ .no-documents span {
107
+ font-size: 13px;
108
+ color: var(--text-tertiary);
109
+ }
110
+
111
+ .document-item {
112
+ display: flex;
113
+ align-items: center;
114
+ gap: 12px;
115
+ padding: 12px;
116
+ border-radius: 8px;
117
+ transition: background-color 0.2s ease;
118
+ }
119
+
120
+ .document-item:hover {
121
+ background: var(--bg-secondary);
122
+ }
123
+
124
+ .document-icon {
125
+ font-size: 20px;
126
+ flex-shrink: 0;
127
+ }
128
+
129
+ .document-info {
130
+ flex: 1;
131
+ min-width: 0;
132
+ }
133
+
134
+ .document-name {
135
+ font-weight: 500;
136
+ color: var(--text-primary);
137
+ font-size: 14px;
138
+ white-space: nowrap;
139
+ overflow: hidden;
140
+ text-overflow: ellipsis;
141
+ }
142
+
143
+ .document-details {
144
+ font-size: 12px;
145
+ color: var(--text-secondary);
146
+ margin-top: 2px;
147
+ }
148
+
149
+ .document-actions {
150
+ display: flex;
151
+ gap: 4px;
152
+ }
153
+
154
+ .document-action-btn {
155
+ background: none;
156
+ border: none;
157
+ color: var(--text-tertiary);
158
+ cursor: pointer;
159
+ padding: 6px;
160
+ border-radius: 4px;
161
+ transition: all 0.2s ease;
162
+ }
163
+
164
+ .document-action-btn:hover {
165
+ background: var(--bg-tertiary);
166
+ color: var(--text-secondary);
167
+ }
168
+
169
+ .document-action-btn:hover:has(svg[data-icon="trash-2"]) {
170
+ background: #FEF2F2;
171
+ color: #DC2626;
172
+ }
173
+
174
+ [data-theme="dark"] .document-action-btn:hover:has(svg[data-icon="trash-2"]) {
175
+ background: #7F1D1D;
176
+ color: #FCA5A5;
177
+ }
178
+
179
+ /* Main Input Box */
180
+ .floating-input-box {
181
+ background: var(--bg-primary);
182
+ border: 1px solid var(--border-primary);
183
+ border-radius: 16px;
184
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
185
+ backdrop-filter: blur(20px);
186
+ -webkit-backdrop-filter: blur(20px);
187
+ overflow: hidden;
188
+ transition: all 0.2s ease;
189
+ }
190
+
191
+ [data-theme="dark"] .floating-input-box {
192
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
193
+ }
194
+
195
+ .floating-input-box:focus-within {
196
+ border-color: var(--accent-primary);
197
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16), 0 0 0 1px var(--accent-primary);
198
+ }
199
+
200
+ [data-theme="dark"] .floating-input-box:focus-within {
201
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-primary);
202
+ }
203
+
204
+ /* Text Input Row */
205
+ .text-input-row {
206
+ padding: 16px 20px 4px 20px;
207
+ }
208
+
209
+ .main-textarea {
210
+ width: 100%;
211
+ min-height: 24px;
212
+ max-height: 200px;
213
+ border: none;
214
+ outline: none;
215
+ background: transparent;
216
+ color: var(--text-primary);
217
+ font-size: 16px;
218
+ font-family: inherit;
219
+ line-height: 1.5;
220
+ resize: none;
221
+ overflow-y: auto;
222
+ scrollbar-width: thin;
223
+ }
224
+
225
+ .main-textarea::placeholder {
226
+ color: var(--text-secondary);
227
+ }
228
+
229
+ .main-textarea:disabled {
230
+ opacity: 0.6;
231
+ cursor: not-allowed;
232
+ }
233
+
234
+ /* Custom scrollbar for textarea */
235
+ .main-textarea::-webkit-scrollbar {
236
+ width: 4px;
237
+ }
238
+
239
+ .main-textarea::-webkit-scrollbar-track {
240
+ background: transparent;
241
+ }
242
+
243
+ .main-textarea::-webkit-scrollbar-thumb {
244
+ background: var(--border-primary);
245
+ border-radius: 2px;
246
+ }
247
+
248
+ .main-textarea::-webkit-scrollbar-thumb:hover {
249
+ background: var(--text-tertiary);
250
+ }
251
+
252
+ /* Controls Row */
253
+ .controls-row {
254
+ display: flex;
255
+ align-items: center;
256
+ justify-content: space-between;
257
+ padding: 8px 20px 16px 20px;
258
+ gap: 12px;
259
+ }
260
+
261
+ /* File Controls */
262
+ .file-controls {
263
+ display: flex;
264
+ align-items: center;
265
+ gap: 8px;
266
+ }
267
+
268
+ /* Add Documents Button */
269
+ .add-docs-btn {
270
+ display: flex;
271
+ align-items: center;
272
+ gap: 8px;
273
+ padding: 8px 12px;
274
+ background: transparent;
275
+ border: none;
276
+ border-radius: 8px;
277
+ color: var(--text-secondary);
278
+ font-size: 14px;
279
+ font-weight: 500;
280
+ cursor: pointer;
281
+ transition: all 0.2s ease;
282
+ position: relative;
283
+ }
284
+
285
+ .add-docs-btn:hover:not(:disabled) {
286
+ background: var(--bg-secondary);
287
+ color: var(--text-primary);
288
+ }
289
+
290
+ .add-docs-btn.active {
291
+ background: var(--feature-bg);
292
+ color: var(--accent-primary);
293
+ }
294
+
295
+ .add-docs-btn:disabled {
296
+ opacity: 0.5;
297
+ cursor: not-allowed;
298
+ }
299
+
300
+ .add-docs-btn span {
301
+ user-select: none;
302
+ }
303
+
304
+ /* View Documents Button */
305
+ .view-docs-btn {
306
+ display: flex;
307
+ align-items: center;
308
+ gap: 6px;
309
+ padding: 8px 10px;
310
+ background: var(--feature-bg);
311
+ border: 1px solid var(--accent-primary);
312
+ border-radius: 8px;
313
+ color: var(--accent-primary);
314
+ font-size: 12px;
315
+ font-weight: 600;
316
+ cursor: pointer;
317
+ transition: all 0.2s ease;
318
+ position: relative;
319
+ }
320
+
321
+ .view-docs-btn:hover {
322
+ background: var(--accent-primary);
323
+ color: white;
324
+ }
325
+
326
+ .view-docs-btn.active {
327
+ background: var(--accent-primary);
328
+ color: white;
329
+ }
330
+
331
+ .docs-count {
332
+ background: var(--accent-primary);
333
+ color: white;
334
+ border-radius: 10px;
335
+ padding: 2px 6px;
336
+ font-size: 10px;
337
+ font-weight: 700;
338
+ min-width: 16px;
339
+ text-align: center;
340
+ line-height: 1.2;
341
+ }
342
+
343
+ .view-docs-btn:hover .docs-count,
344
+ .view-docs-btn.active .docs-count {
345
+ background: white;
346
+ color: var(--accent-primary);
347
+ }
348
+
349
+ /* Send Button - FIXED FOR BOTH LIGHT AND DARK MODE */
350
+ .send-button {
351
+ display: flex;
352
+ align-items: center;
353
+ justify-content: center;
354
+ width: 36px;
355
+ height: 36px;
356
+ border-radius: 8px;
357
+ border: none;
358
+ cursor: pointer;
359
+ transition: all 0.2s ease;
360
+ position: relative;
361
+ flex-shrink: 0;
362
+ }
363
+
364
+ /* Enabled state - ensure visibility in both modes */
365
+ .send-button.enabled {
366
+ background: #3B82F6 !important; /* Blue background - force override */
367
+ color: #FFFFFF !important; /* White text/icon - force override */
368
+ box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
369
+ }
370
+
371
+ /* Force icon color to white when enabled */
372
+ .send-button.enabled svg {
373
+ color: #FFFFFF !important;
374
+ fill: #FFFFFF !important;
375
+ stroke: #FFFFFF !important;
376
+ width: 16px !important;
377
+ height: 16px !important;
378
+ }
379
+
380
+ .send-button.enabled:hover {
381
+ background: #2563EB !important; /* Darker blue on hover */
382
+ transform: translateY(-1px);
383
+ box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
384
+ }
385
+
386
+ .send-button.enabled:active {
387
+ transform: translateY(0);
388
+ box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
389
+ }
390
+
391
+ /* Disabled state */
392
+ .send-button.disabled {
393
+ background: #E5E7EB; /* Light gray background */
394
+ color: #9CA3AF; /* Gray text/icon */
395
+ cursor: not-allowed;
396
+ box-shadow: none;
397
+ }
398
+
399
+ [data-theme="dark"] .send-button.disabled {
400
+ background: #374151; /* Dark gray background in dark mode */
401
+ color: #6B7280; /* Gray text/icon in dark mode */
402
+ }
403
+
404
+ .send-button.disabled svg {
405
+ color: #9CA3AF !important;
406
+ fill: #9CA3AF !important;
407
+ stroke: #9CA3AF !important;
408
+ width: 16px !important;
409
+ height: 16px !important;
410
+ }
411
+
412
+ [data-theme="dark"] .send-button.disabled svg {
413
+ color: #6B7280 !important;
414
+ fill: #6B7280 !important;
415
+ stroke: #6B7280 !important;
416
+ }
417
+
418
+ /* Document Upload Notifications */
419
+ .document-upload-notification {
420
+ display: flex;
421
+ justify-content: center;
422
+ margin: 16px 0;
423
+ animation: slideUpFade 0.3s ease-out;
424
+ }
425
+
426
+ .upload-notification-content {
427
+ display: flex;
428
+ align-items: center;
429
+ gap: 8px;
430
+ padding: 12px 16px;
431
+ background: var(--feature-bg);
432
+ border: 1px solid var(--accent-primary);
433
+ border-radius: 12px;
434
+ color: var(--accent-primary);
435
+ font-size: 14px;
436
+ font-weight: 500;
437
+ max-width: 80%;
438
+ box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
439
+ }
440
+
441
+ [data-theme="dark"] .upload-notification-content {
442
+ box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
443
+ }
444
+
445
+ .upload-notification-content .upload-icon {
446
+ flex-shrink: 0;
447
+ }
448
+
449
+ /* Document Counter in Header */
450
+ .document-indicator {
451
+ display: flex;
452
+ align-items: center;
453
+ gap: 6px;
454
+ padding: 6px 12px;
455
+ background: var(--feature-bg);
456
+ border: 1px solid var(--accent-primary);
457
+ border-radius: 20px;
458
+ color: var(--accent-primary);
459
+ font-size: 13px;
460
+ font-weight: 600;
461
+ cursor: default;
462
+ transition: all 0.2s ease;
463
+ }
464
+
465
+ .document-indicator:hover {
466
+ background: var(--accent-primary);
467
+ color: white;
468
+ }
469
+
470
+ .doc-count {
471
+ background: var(--accent-primary);
472
+ color: white;
473
+ border-radius: 10px;
474
+ padding: 2px 6px;
475
+ font-size: 11px;
476
+ font-weight: 700;
477
+ min-width: 16px;
478
+ text-align: center;
479
+ line-height: 1.2;
480
+ }
481
+
482
+ .document-indicator:hover .doc-count {
483
+ background: white;
484
+ color: var(--accent-primary);
485
+ }
486
+
487
+ /* Reply Banner Styles */
488
+ .reply-banner {
489
+ background: var(--bg-primary);
490
+ border: 1px solid var(--border-primary);
491
+ border-radius: 12px;
492
+ padding: 12px 16px;
493
+ margin-bottom: 12px;
494
+ display: flex;
495
+ align-items: center;
496
+ justify-content: space-between;
497
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
498
+ max-width: 768px;
499
+ margin-left: auto;
500
+ margin-right: auto;
501
+ margin-bottom: 12px;
502
+ }
503
+
504
+ [data-theme="dark"] .reply-banner {
505
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
506
+ }
507
+
508
+ .reply-info {
509
+ display: flex;
510
+ align-items: center;
511
+ gap: 8px;
512
+ color: var(--text-secondary);
513
+ font-size: 14px;
514
+ }
515
+
516
+ .reply-info strong {
517
+ color: var(--accent-primary);
518
+ }
519
+
520
+ .cancel-reply {
521
+ background: none;
522
+ border: none;
523
+ color: var(--text-tertiary);
524
+ cursor: pointer;
525
+ padding: 4px;
526
+ border-radius: 6px;
527
+ transition: all 0.2s ease;
528
+ }
529
+
530
+ .cancel-reply:hover {
531
+ background: var(--bg-secondary);
532
+ color: var(--text-secondary);
533
+ }
534
+
535
+ /* Animations */
536
+ @keyframes slideUpFade {
537
+ from {
538
+ opacity: 0;
539
+ transform: translateY(10px);
540
+ }
541
+ to {
542
+ opacity: 1;
543
+ transform: translateY(0);
544
+ }
545
+ }
546
+
547
+ /* Mobile Responsive */
548
+ @media (max-width: 768px) {
549
+ .enhanced-chat-input-container {
550
+ padding: 0 12px;
551
+ }
552
+
553
+ .text-input-row {
554
+ padding: 14px 16px 4px 16px;
555
+ }
556
+
557
+ .controls-row {
558
+ padding: 8px 16px 14px 16px;
559
+ }
560
+
561
+ .main-textarea {
562
+ font-size: 16px; /* Prevents zoom on iOS */
563
+ }
564
+
565
+ .add-docs-btn {
566
+ padding: 6px 10px;
567
+ font-size: 13px;
568
+ }
569
+
570
+ .add-docs-btn span {
571
+ display: none; /* Hide text on mobile, show only icon */
572
+ }
573
+
574
+ .view-docs-btn {
575
+ padding: 6px 8px;
576
+ }
577
+
578
+ .send-button {
579
+ width: 32px;
580
+ height: 32px;
581
+ }
582
+
583
+ .floating-upload-section,
584
+ .floating-documents-section {
585
+ padding: 16px;
586
+ }
587
+
588
+ .documents-header {
589
+ padding: 12px 16px;
590
+ }
591
+
592
+ .documents-list {
593
+ max-height: 250px;
594
+ }
595
+
596
+ .upload-notification-content {
597
+ max-width: 95%;
598
+ padding: 10px 14px;
599
+ font-size: 13px;
600
+ }
601
+
602
+ .reply-banner {
603
+ margin: 0 12px 12px 12px;
604
+ }
605
+ }
606
+
607
+ /* Focus and accessibility */
608
+ .add-docs-btn:focus-visible,
609
+ .view-docs-btn:focus-visible,
610
+ .send-button:focus-visible {
611
+ outline: 2px solid var(--accent-primary);
612
+ outline-offset: 2px;
613
+ }
614
+
615
+ .main-textarea:focus {
616
+ outline: none; /* Handled by parent container */
617
+ }
618
+
619
+ /* Loading states */
620
+ .floating-input-box.loading {
621
+ opacity: 0.7;
622
+ pointer-events: none;
623
+ }
624
+
625
+ .main-textarea.loading {
626
+ cursor: wait;
627
+ }
628
+
629
+ /* High contrast mode support */
630
+ @media (prefers-contrast: high) {
631
+ .floating-input-box {
632
+ border-width: 2px;
633
+ }
634
+
635
+ .send-button.enabled {
636
+ border: 2px solid #3B82F6;
637
+ }
638
+ }
639
+
640
+ /* Reduced motion support */
641
+ @media (prefers-reduced-motion: reduce) {
642
+ .floating-input-box,
643
+ .add-docs-btn,
644
+ .view-docs-btn,
645
+ .send-button,
646
+ .floating-upload-section,
647
+ .floating-documents-section {
648
+ transition: none;
649
+ }
650
+
651
+ .slideUpFade {
652
+ animation: none;
653
+ }
654
+ }