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
|
$background-color: #f8f9fa;
$text-color: #333;
$input-background: #fff;
$button-color: #007bff;
$button-hover-color: darken($button-color, 10%);
$shadow-color: rgba(0, 0, 0, 0.075);
$border-radius: 8px;
.chatBox {
display: flex;
flex-direction: column;
width: 100%; /* Adjust the width as needed, could be in percentage */
height: 100%; /* Adjust the height as needed, could be in percentage */
background-color: $background-color;
font-family: 'Helvetica Neue', Arial, sans-serif;
//margin: 20px auto;
//overflow: hidden;
.scroll-box {
flex-grow: 1;
overflow-y: scroll;
overflow-x: hidden;
height: 100%;
padding: 10px;
display: flex;
flex-direction: column-reverse;
&::-webkit-scrollbar {
width: 8px;
}
&::-webkit-scrollbar-thumb {
background-color: darken($background-color, 10%);
border-radius: $border-radius;
}
.chat-content {
display: flex;
flex-direction: column;
}
.messages {
display: flex;
flex-direction: column;
.message {
padding: 10px;
margin-bottom: 10px;
border-radius: $border-radius;
background-color: lighten($background-color, 5%);
box-shadow: 0 2px 5px $shadow-color;
//display: flex;
align-items: center;
max-width: 70%;
word-break: break-word;
.message-footer { // Assuming this is the container for the toggle button
//max-width: 70%;
.toggle-logs-button {
margin-top: 10px; // Padding on sides to align with the text above
width: 95%;
//display: block; // Ensures the button extends the full width of its container
text-align: center; // Centers the text inside the button
//padding: 8px 0; // Adequate padding for touch targets
background-color: $button-color;
color: #fff;
border: none;
border-radius: $border-radius;
cursor: pointer;
//transition: background-color 0.3s;
//margin-top: 10px; // Adds space above the button
box-shadow: 0 2px 4px $shadow-color; // Consistent shadow with other elements
&:hover {
background-color: $button-hover-color;
}
}
.tool-logs {
width: 100%;
background-color: $input-background;
color: $text-color;
margin-top: 5px;
//padding: 10px;
//border-radius: $border-radius;
//box-shadow: inset 0 2px 4px $shadow-color;
//transition: opacity 1s ease-in-out;
font-family: monospace;
overflow-x: auto;
max-height: 150px; // Ensuring it does not grow too large
overflow-y: auto;
}
}
.custom-link {
color: lightblue;
text-decoration: underline;
cursor: pointer;
}
&.user {
align-self: flex-end;
background-color: $button-color;
color: #fff;
}
&.chatbot {
align-self: flex-start;
background-color: $input-background;
color: $text-color;
}
span {
flex-grow: 1;
padding-right: 10px;
}
img {
max-width: 50px;
max-height: 50px;
border-radius: 50%;
}
}
}
padding-bottom: 0;
}
.chat-form {
display: flex;
flex-grow: 1;
//height: 50px;
bottom: 0;
width: 100%;
padding: 10px;
background-color: $input-background;
box-shadow: inset 0 -1px 2px $shadow-color;
input[type="text"] {
flex-grow: 1;
border: 1px solid darken($input-background, 10%);
border-radius: $border-radius;
padding: 8px 12px;
margin-right: 10px;
}
button {
padding: 8px 16px;
background-color: $button-color;
color: #fff;
border: none;
border-radius: $border-radius;
cursor: pointer;
transition: background-color 0.3s;
&:hover {
background-color: $button-hover-color;
}
}
margin-bottom: 0;
}
}
.initializing-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba($background-color, 0.95);
display: flex;
justify-content: center;
align-items: center;
font-size: 1.5em;
color: $text-color;
z-index: 10; // Ensure it's above all other content (may be better solution)
&::before {
content: 'Initializing...';
font-weight: bold;
}
}
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.4);
.modal-content {
background-color: $input-background;
color: $text-color;
padding: 20px;
border-radius: $border-radius;
box-shadow: 0 2px 10px $shadow-color;
display: flex;
flex-direction: column;
align-items: center;
width: auto;
min-width: 300px;
h4 {
margin-bottom: 15px;
}
p {
margin-bottom: 20px;
}
button {
padding: 10px 20px;
background-color: $button-color;
color: #fff;
border: none;
border-radius: $border-radius;
cursor: pointer;
margin: 5px;
transition: background-color 0.3s;
&:hover {
background-color: $button-hover-color;
}
}
}
}
|