Spaces:
Sleeping
Sleeping
Commit
·
e0f19d4
1
Parent(s):
36792c1
Updated
Browse files- static/main.css +51 -38
static/main.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*
|
| 2 |
* {
|
| 3 |
margin: 0;
|
| 4 |
padding: 0;
|
|
@@ -6,46 +6,47 @@
|
|
| 6 |
font-family: 'Segoe UI', sans-serif;
|
| 7 |
}
|
| 8 |
|
| 9 |
-
|
| 10 |
-
height: 100%;
|
| 11 |
-
width: 100%;
|
| 12 |
background: #f0f2f5;
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
|
| 16 |
-
/* Chat
|
| 17 |
.chat-container {
|
| 18 |
-
position: fixed; /* Lock in place */
|
| 19 |
-
top: 0;
|
| 20 |
-
left: 0;
|
| 21 |
width: 100%;
|
| 22 |
-
|
| 23 |
background: #fff;
|
| 24 |
-
border-radius:
|
|
|
|
| 25 |
display: flex;
|
| 26 |
flex-direction: column;
|
| 27 |
-
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
-
/*
|
| 31 |
.chat-header {
|
| 32 |
background-color: #10a37f;
|
| 33 |
-
padding:
|
| 34 |
text-align: center;
|
| 35 |
color: white;
|
| 36 |
-
font-size: 1.2rem; /* Reduced size */
|
| 37 |
-
font-weight: bold;
|
| 38 |
}
|
| 39 |
|
| 40 |
-
/* Chat
|
| 41 |
.chat-box {
|
| 42 |
-
flex: 1; /* Fill remaining space */
|
| 43 |
padding: 20px;
|
| 44 |
display: flex;
|
| 45 |
flex-direction: column;
|
| 46 |
gap: 15px;
|
| 47 |
background-color: #fafafa;
|
| 48 |
-
overflow-y: auto; /* Scroll
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
|
| 51 |
/* Messages */
|
|
@@ -54,13 +55,13 @@ html, body {
|
|
| 54 |
padding: 12px 18px;
|
| 55 |
border-radius: 16px;
|
| 56 |
font-size: 1rem;
|
| 57 |
-
line-height: 1.5;
|
| 58 |
white-space: pre-wrap;
|
| 59 |
-
word-
|
| 60 |
overflow-wrap: break-word;
|
| 61 |
-
transform: translateY(20px);
|
| 62 |
opacity: 0;
|
| 63 |
-
|
|
|
|
| 64 |
}
|
| 65 |
|
| 66 |
/* User messages */
|
|
@@ -77,18 +78,28 @@ html, body {
|
|
| 77 |
color: #000;
|
| 78 |
}
|
| 79 |
|
| 80 |
-
/*
|
| 81 |
-
.message ol,
|
| 82 |
-
.message ul {
|
| 83 |
-
margin: 0 0 0 1.
|
| 84 |
-
padding-left: 1.
|
| 85 |
}
|
| 86 |
|
| 87 |
-
.message li {
|
| 88 |
-
margin-bottom: 0.
|
|
|
|
| 89 |
}
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
.chat-input {
|
| 93 |
display: flex;
|
| 94 |
padding: 15px;
|
|
@@ -96,17 +107,19 @@ html, body {
|
|
| 96 |
background-color: #fff;
|
| 97 |
}
|
| 98 |
|
| 99 |
-
.chat-input
|
| 100 |
flex: 1;
|
| 101 |
padding: 12px;
|
| 102 |
border: 1px solid #ccc;
|
| 103 |
border-radius: 20px;
|
| 104 |
outline: none;
|
| 105 |
-
resize: none;
|
| 106 |
min-height: 40px;
|
| 107 |
-
max-height:
|
|
|
|
| 108 |
}
|
| 109 |
|
|
|
|
| 110 |
.chat-input button {
|
| 111 |
padding: 10px 18px;
|
| 112 |
margin-left: 10px;
|
|
@@ -121,8 +134,8 @@ html, body {
|
|
| 121 |
background-color: #0e8f6a;
|
| 122 |
}
|
| 123 |
|
| 124 |
-
/*
|
| 125 |
-
.spinner {
|
| 126 |
border: 4px solid #f3f3f3;
|
| 127 |
border-top: 4px solid #10a37f;
|
| 128 |
border-radius: 50%;
|
|
@@ -138,9 +151,9 @@ html, body {
|
|
| 138 |
100% { transform: rotate(360deg); }
|
| 139 |
}
|
| 140 |
|
| 141 |
-
@keyframes
|
| 142 |
to {
|
| 143 |
-
transform: translateY(0);
|
| 144 |
opacity: 1;
|
|
|
|
| 145 |
}
|
| 146 |
}
|
|
|
|
| 1 |
+
/* Reset and base styling */
|
| 2 |
* {
|
| 3 |
margin: 0;
|
| 4 |
padding: 0;
|
|
|
|
| 6 |
font-family: 'Segoe UI', sans-serif;
|
| 7 |
}
|
| 8 |
|
| 9 |
+
body {
|
|
|
|
|
|
|
| 10 |
background: #f0f2f5;
|
| 11 |
+
padding: 20px;
|
| 12 |
+
display: flex;
|
| 13 |
+
justify-content: center;
|
| 14 |
+
height: 100vh; /* Full viewport */
|
| 15 |
+
overflow: hidden; /* Prevent body scroll */
|
| 16 |
}
|
| 17 |
|
| 18 |
+
/* Chat container */
|
| 19 |
.chat-container {
|
|
|
|
|
|
|
|
|
|
| 20 |
width: 100%;
|
| 21 |
+
max-width: 600px;
|
| 22 |
background: #fff;
|
| 23 |
+
border-radius: 12px;
|
| 24 |
+
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
|
| 25 |
display: flex;
|
| 26 |
flex-direction: column;
|
| 27 |
+
height: 100%;
|
| 28 |
+
overflow: hidden; /* Lock container */
|
| 29 |
}
|
| 30 |
|
| 31 |
+
/* Header */
|
| 32 |
.chat-header {
|
| 33 |
background-color: #10a37f;
|
| 34 |
+
padding: 12px;
|
| 35 |
text-align: center;
|
| 36 |
color: white;
|
| 37 |
+
font-size: 1.2rem; /* Reduced title size */
|
|
|
|
| 38 |
}
|
| 39 |
|
| 40 |
+
/* Chat scrollable area */
|
| 41 |
.chat-box {
|
|
|
|
| 42 |
padding: 20px;
|
| 43 |
display: flex;
|
| 44 |
flex-direction: column;
|
| 45 |
gap: 15px;
|
| 46 |
background-color: #fafafa;
|
| 47 |
+
overflow-y: auto; /* Scroll inner chat only */
|
| 48 |
+
flex-grow: 1;
|
| 49 |
+
scroll-behavior: smooth;
|
| 50 |
}
|
| 51 |
|
| 52 |
/* Messages */
|
|
|
|
| 55 |
padding: 12px 18px;
|
| 56 |
border-radius: 16px;
|
| 57 |
font-size: 1rem;
|
| 58 |
+
line-height: 1.5;
|
| 59 |
white-space: pre-wrap;
|
| 60 |
+
word-wrap: break-word;
|
| 61 |
overflow-wrap: break-word;
|
|
|
|
| 62 |
opacity: 0;
|
| 63 |
+
transform: translateY(20px);
|
| 64 |
+
animation: slideUp 0.25s forwards;
|
| 65 |
}
|
| 66 |
|
| 67 |
/* User messages */
|
|
|
|
| 78 |
color: #000;
|
| 79 |
}
|
| 80 |
|
| 81 |
+
/* Bot markdown formatting */
|
| 82 |
+
.message.bot ol,
|
| 83 |
+
.message.bot ul {
|
| 84 |
+
margin: 0 0 0 1.5em;
|
| 85 |
+
padding-left: 1.5em;
|
| 86 |
}
|
| 87 |
|
| 88 |
+
.message.bot li {
|
| 89 |
+
margin-bottom: 0.4em;
|
| 90 |
+
line-height: 1.5;
|
| 91 |
}
|
| 92 |
|
| 93 |
+
.message.bot ol {
|
| 94 |
+
list-style-position: inside;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.message.bot pre {
|
| 98 |
+
white-space: pre-wrap;
|
| 99 |
+
word-wrap: break-word;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
/* Chat input area */
|
| 103 |
.chat-input {
|
| 104 |
display: flex;
|
| 105 |
padding: 15px;
|
|
|
|
| 107 |
background-color: #fff;
|
| 108 |
}
|
| 109 |
|
| 110 |
+
.chat-input input {
|
| 111 |
flex: 1;
|
| 112 |
padding: 12px;
|
| 113 |
border: 1px solid #ccc;
|
| 114 |
border-radius: 20px;
|
| 115 |
outline: none;
|
| 116 |
+
resize: none; /* Prevent manual resize */
|
| 117 |
min-height: 40px;
|
| 118 |
+
max-height: 120px;
|
| 119 |
+
overflow-y: auto; /* Scroll inside input if long */
|
| 120 |
}
|
| 121 |
|
| 122 |
+
/* Send button */
|
| 123 |
.chat-input button {
|
| 124 |
padding: 10px 18px;
|
| 125 |
margin-left: 10px;
|
|
|
|
| 134 |
background-color: #0e8f6a;
|
| 135 |
}
|
| 136 |
|
| 137 |
+
/* Loading spinner inside bot message */
|
| 138 |
+
.loading-spinner {
|
| 139 |
border: 4px solid #f3f3f3;
|
| 140 |
border-top: 4px solid #10a37f;
|
| 141 |
border-radius: 50%;
|
|
|
|
| 151 |
100% { transform: rotate(360deg); }
|
| 152 |
}
|
| 153 |
|
| 154 |
+
@keyframes slideUp {
|
| 155 |
to {
|
|
|
|
| 156 |
opacity: 1;
|
| 157 |
+
transform: translateY(0);
|
| 158 |
}
|
| 159 |
}
|