Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,6 @@ st.set_page_config(
|
|
37 |
)
|
38 |
|
39 |
# Custom CSS for beautiful styling
|
40 |
-
st.markdown("""
|
41 |
<style>
|
42 |
/* Clean app background */
|
43 |
.stApp {
|
@@ -49,7 +48,7 @@ st.markdown("""
|
|
49 |
/* Reduce main container padding */
|
50 |
.main .block-container {
|
51 |
padding-top: 0.5rem;
|
52 |
-
padding-bottom:
|
53 |
max-width: 100%;
|
54 |
}
|
55 |
|
@@ -228,69 +227,76 @@ st.markdown("""
|
|
228 |
border: 1px solid #f5c2c7;
|
229 |
}
|
230 |
|
231 |
-
/*
|
232 |
-
|
233 |
-
|
234 |
-
|
|
|
|
|
235 |
background: #ffffff !important;
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
max-width: none !important;
|
240 |
-
|
241 |
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
|
242 |
-
transition: all 0.2s ease !important;
|
243 |
}
|
244 |
|
245 |
-
|
246 |
-
border-
|
247 |
-
|
248 |
-
|
|
|
|
|
249 |
}
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
margin: 0 !important;
|
255 |
}
|
256 |
|
257 |
-
|
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 |
-
|
270 |
-
.stChatInput textarea::placeholder {
|
271 |
color: #9ca3af !important;
|
272 |
font-style: normal !important;
|
273 |
}
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
z-index: 1000 !important;
|
285 |
-
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
|
286 |
}
|
287 |
|
288 |
-
|
289 |
-
|
290 |
-
padding-bottom: 100px !important;
|
291 |
}
|
292 |
|
293 |
-
/* Alternative:
|
294 |
/*
|
295 |
[data-testid="stChatInput"] {
|
296 |
background: #f8fafc !important;
|
@@ -302,26 +308,50 @@ st.markdown("""
|
|
302 |
}
|
303 |
*/
|
304 |
|
305 |
-
/*
|
306 |
-
|
307 |
-
background: #
|
308 |
-
color: white
|
309 |
-
border:
|
310 |
-
|
311 |
-
|
312 |
-
font-weight: 600
|
313 |
-
transition: background-color 0.2s ease
|
314 |
}
|
315 |
|
316 |
-
|
317 |
-
background: #
|
318 |
}
|
319 |
|
320 |
-
/*
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
}
|
326 |
|
327 |
/* Code container styling */
|
|
|
37 |
)
|
38 |
|
39 |
# Custom CSS for beautiful styling
|
|
|
40 |
<style>
|
41 |
/* Clean app background */
|
42 |
.stApp {
|
|
|
48 |
/* Reduce main container padding */
|
49 |
.main .block-container {
|
50 |
padding-top: 0.5rem;
|
51 |
+
padding-bottom: 120px !important; /* Increased for fixed chat input */
|
52 |
max-width: 100%;
|
53 |
}
|
54 |
|
|
|
227 |
border: 1px solid #f5c2c7;
|
228 |
}
|
229 |
|
230 |
+
/* FIXED CHAT INPUT STYLING */
|
231 |
+
[data-testid="stChatInput"] {
|
232 |
+
position: fixed !important;
|
233 |
+
bottom: 0 !important;
|
234 |
+
left: 0 !important;
|
235 |
+
right: 0 !important;
|
236 |
background: #ffffff !important;
|
237 |
+
border-top: 1px solid #e5e7eb !important;
|
238 |
+
padding: 1rem !important;
|
239 |
+
z-index: 1000 !important;
|
240 |
+
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
|
241 |
+
}
|
242 |
+
|
243 |
+
/* Adjust for sidebar on larger screens */
|
244 |
+
@media (min-width: 768px) {
|
245 |
+
[data-testid="stChatInput"] {
|
246 |
+
margin-left: 21rem !important;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
[data-testid="stChatInput"] > div {
|
251 |
max-width: none !important;
|
252 |
+
width: 100% !important;
|
|
|
|
|
253 |
}
|
254 |
|
255 |
+
[data-testid="stChatInput"] .stChatInputContainer {
|
256 |
+
border-radius: 12px !important;
|
257 |
+
border: 2px solid #e5e7eb !important;
|
258 |
+
background: #ffffff !important;
|
259 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
|
260 |
+
overflow: hidden !important;
|
261 |
}
|
262 |
|
263 |
+
[data-testid="stChatInput"] .stChatInputContainer:focus-within {
|
264 |
+
border-color: #3b82f6 !important;
|
265 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
|
|
|
266 |
}
|
267 |
|
268 |
+
[data-testid="stChatInput"] textarea {
|
|
|
269 |
border: none !important;
|
270 |
background: transparent !important;
|
271 |
+
padding: 0.75rem 1rem !important;
|
|
|
272 |
font-size: 1rem !important;
|
273 |
line-height: 1.5 !important;
|
274 |
resize: none !important;
|
275 |
outline: none !important;
|
276 |
+
font-family: 'Segoe UI', sans-serif !important;
|
277 |
}
|
278 |
|
279 |
+
[data-testid="stChatInput"] textarea::placeholder {
|
|
|
280 |
color: #9ca3af !important;
|
281 |
font-style: normal !important;
|
282 |
}
|
283 |
|
284 |
+
[data-testid="stChatInput"] button {
|
285 |
+
background: #3b82f6 !important;
|
286 |
+
color: white !important;
|
287 |
+
border: none !important;
|
288 |
+
border-radius: 8px !important;
|
289 |
+
padding: 0.5rem 1rem !important;
|
290 |
+
font-weight: 600 !important;
|
291 |
+
margin-left: 0.5rem !important;
|
292 |
+
transition: background-color 0.2s ease !important;
|
|
|
|
|
293 |
}
|
294 |
|
295 |
+
[data-testid="stChatInput"] button:hover {
|
296 |
+
background: #2563eb !important;
|
|
|
297 |
}
|
298 |
|
299 |
+
/* Alternative: Inline chat input (comment out fixed version above and uncomment below) */
|
300 |
/*
|
301 |
[data-testid="stChatInput"] {
|
302 |
background: #f8fafc !important;
|
|
|
308 |
}
|
309 |
*/
|
310 |
|
311 |
+
/* Button */
|
312 |
+
.stButton > button {
|
313 |
+
background-color: #0d6efd;
|
314 |
+
color: white;
|
315 |
+
border-radius: 6px;
|
316 |
+
padding: 0.5rem 1.25rem;
|
317 |
+
border: none;
|
318 |
+
font-weight: 600;
|
319 |
+
transition: background-color 0.2s ease;
|
320 |
}
|
321 |
|
322 |
+
.stButton > button:hover {
|
323 |
+
background-color: #0b5ed7;
|
324 |
}
|
325 |
|
326 |
+
/* Sidebar button styling - smaller, left-aligned */
|
327 |
+
[data-testid="stSidebar"] .stButton > button {
|
328 |
+
background-color: #f8fafc;
|
329 |
+
color: #475569;
|
330 |
+
border: 1px solid #e2e8f0;
|
331 |
+
padding: 0.375rem 0.75rem;
|
332 |
+
font-size: 0.65rem;
|
333 |
+
font-weight: normal;
|
334 |
+
text-align: left;
|
335 |
+
white-space: normal;
|
336 |
+
height: auto;
|
337 |
+
line-height: 1.2;
|
338 |
+
transition: all 0.2s ease;
|
339 |
+
cursor: pointer;
|
340 |
+
margin-bottom: 0.25rem;
|
341 |
+
width: 100%;
|
342 |
+
display: flex;
|
343 |
+
justify-content: flex-start;
|
344 |
+
}
|
345 |
+
|
346 |
+
[data-testid="stSidebar"] .stButton > button:hover {
|
347 |
+
background-color: #e0f2fe;
|
348 |
+
border-color: #0ea5e9;
|
349 |
+
color: #0c4a6e;
|
350 |
+
}
|
351 |
+
|
352 |
+
[data-testid="stSidebar"] .stButton > button:active {
|
353 |
+
transform: translateY(0);
|
354 |
+
box-shadow: none;
|
355 |
}
|
356 |
|
357 |
/* Code container styling */
|