AbhayVG commited on
Commit
d8b06b3
·
verified ·
1 Parent(s): 7c9af8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +78 -44
app.py CHANGED
@@ -228,66 +228,100 @@ st.markdown("""
228
  border: 1px solid #f5c2c7;
229
  }
230
 
231
- /* Chat input styling like mockup */
232
  .stChatInput {
233
- border-radius: 8px;
234
- border: 1px solid #d1d5db;
235
- background: #ffffff;
236
- padding: 0.75rem 1rem;
237
- font-size: 1rem;
238
  width: 100% !important;
239
  max-width: none !important;
 
 
 
240
  }
241
 
242
  .stChatInput:focus {
243
- border-color: #3b82f6;
244
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
 
245
  }
246
 
247
- /* Button */
248
- .stButton > button {
249
- background-color: #0d6efd;
250
- color: white;
251
- border-radius: 6px;
252
- padding: 0.5rem 1.25rem;
253
- border: none;
254
- font-weight: 600;
255
- transition: background-color 0.2s ease;
256
  }
257
 
258
- .stButton > button:hover {
259
- background-color: #0b5ed7;
 
 
 
 
 
 
 
 
260
  }
261
 
262
- /* Sidebar button styling - smaller, left-aligned */
263
- [data-testid="stSidebar"] .stButton > button {
264
- background-color: #f8fafc;
265
- color: #475569;
266
- border: 1px solid #e2e8f0;
267
- padding: 0.375rem 0.75rem;
268
- font-size: 0.65rem;
269
- font-weight: normal;
270
- text-align: left;
271
- white-space: normal;
272
- height: auto;
273
- line-height: 1.2;
274
- transition: all 0.2s ease;
275
- cursor: pointer;
276
- margin-bottom: 0.25rem;
277
- width: 100%;
278
- display: flex;
279
- justify-content: flex-start;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  }
281
 
282
- [data-testid="stSidebar"] .stButton > button:hover {
283
- background-color: #e0f2fe;
284
- border-color: #0ea5e9;
285
- color: #0c4a6e;
286
  }
287
 
288
- [data-testid="stSidebar"] .stButton > button:active {
289
- transform: translateY(0);
290
- box-shadow: none;
 
 
291
  }
292
 
293
  /* Code container styling */
 
228
  border: 1px solid #f5c2c7;
229
  }
230
 
231
+ /* Chat input styling - Fixed alignment */
232
  .stChatInput {
233
+ border-radius: 12px !important;
234
+ border: 2px solid #e5e7eb !important;
235
+ background: #ffffff !important;
236
+ padding: 0.75rem 1rem !important;
237
+ font-size: 1rem !important;
238
  width: 100% !important;
239
  max-width: none !important;
240
+ margin: 0 !important;
241
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
242
+ transition: all 0.2s ease !important;
243
  }
244
 
245
  .stChatInput:focus {
246
+ border-color: #3b82f6 !important;
247
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
248
+ outline: none !important;
249
  }
250
 
251
+ /* Chat input container */
252
+ .stChatInput > div {
253
+ padding: 0 !important;
254
+ margin: 0 !important;
 
 
 
 
 
255
  }
256
 
257
+ /* Chat input text area */
258
+ .stChatInput textarea {
259
+ border: none !important;
260
+ background: transparent !important;
261
+ padding: 0 !important;
262
+ margin: 0 !important;
263
+ font-size: 1rem !important;
264
+ line-height: 1.5 !important;
265
+ resize: none !important;
266
+ outline: none !important;
267
  }
268
 
269
+ /* Chat input placeholder */
270
+ .stChatInput textarea::placeholder {
271
+ color: #9ca3af !important;
272
+ font-style: normal !important;
273
+ }
274
+
275
+ /* Fix the main chat input container alignment */
276
+ [data-testid="stChatInput"] {
277
+ position: fixed !important;
278
+ bottom: 0 !important;
279
+ left: 0 !important;
280
+ right: 0 !important;
281
+ background: #ffffff !important;
282
+ border-top: 1px solid #e5e7eb !important;
283
+ padding: 1rem !important;
284
+ z-index: 1000 !important;
285
+ box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
286
+ }
287
+
288
+ /* Adjust main content to account for fixed chat input */
289
+ .main .block-container {
290
+ padding-bottom: 100px !important;
291
+ }
292
+
293
+ /* Alternative: If you prefer inline chat input (not fixed) */
294
+ /*
295
+ [data-testid="stChatInput"] {
296
+ background: #f8fafc !important;
297
+ border: 1px solid #e2e8f0 !important;
298
+ border-radius: 12px !important;
299
+ padding: 0.75rem !important;
300
+ margin: 1rem 0 !important;
301
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
302
+ }
303
+ */
304
+
305
+ /* Chat input button styling */
306
+ [data-testid="stChatInput"] button {
307
+ background: #3b82f6 !important;
308
+ color: white !important;
309
+ border: none !important;
310
+ border-radius: 8px !important;
311
+ padding: 0.5rem 1rem !important;
312
+ font-weight: 600 !important;
313
+ transition: background-color 0.2s ease !important;
314
  }
315
 
316
+ [data-testid="stChatInput"] button:hover {
317
+ background: #2563eb !important;
 
 
318
  }
319
 
320
+ /* Ensure proper spacing from sidebar */
321
+ @media (min-width: 768px) {
322
+ [data-testid="stChatInput"] {
323
+ margin-left: 21rem !important; /* Account for sidebar width */
324
+ }
325
  }
326
 
327
  /* Code container styling */