File size: 7,327 Bytes
39ff7ae
e376ddc
 
 
 
 
 
39ff7ae
e376ddc
 
 
 
f86ad4d
 
39ff7ae
f86ad4d
 
39ff7ae
 
f86ad4d
e376ddc
 
39ff7ae
e376ddc
 
39ff7ae
f86ad4d
39ff7ae
f86ad4d
 
 
 
 
 
 
353025f
 
 
 
 
 
 
 
 
 
f86ad4d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39ff7ae
f86ad4d
 
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39ff7ae
 
e376ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39ff7ae
e376ddc
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
39ff7ae
 
e376ddc
 
 
39ff7ae
e376ddc
 
39ff7ae
e376ddc
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
 
39ff7ae
e376ddc
 
 
 
 
39ff7ae
 
e376ddc
 
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
39ff7ae
e376ddc
 
 
39ff7ae
e376ddc
 
 
 
 
 
 
 
 
 
 
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
/* Reset basic CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 1. UNIVERSAL BODY STYLE (Basic) */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f7f8;
    color: #1f2328;
    /* display: flex; */
    /* height: 100vh; */
    /* overflow: hidden; Preventing body scroll */
}

/* 2. SPECIAL BODY STYLE FOR CHAT PAGE */
/* This selector ensures that the style only applies if the body is NOT a landing page */
body:not(.landing-page) { 
    display: flex;
    height: 100vh;
    overflow: hidden; /* Preventing body scroll */
}

/* --- 3. STYLE FOR LANDING PAGE (index.html) --- */

.landing-page { /* Using the class added in index.html */
    display: flex;
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    height: 100vh;
}

/* --- Style untuk Landing Page (index.html) --- */
body.landing-page {
    background-color: #f0f2f5; /* Warna abu-abu yang bersih */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: auto; /* Mengganti overflow:hidden dari body utama */
}

.landing-container { 
    max-width: 600px; 
    padding: 20px; 
}
.landing-container h1 { 
    font-size: 2.5em; 
    margin-bottom: 20px; 
}
.landing-container p { 
    font-size: 1.2em; 
    margin-bottom: 30px; 
    color: #555; 
}
.start-chat-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: #4a4aef;
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    /* Add hover or other styles if needed */
}

/* --- 1. Sidebar (Left) --- */
.sidebar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.new-chat-btn {
    flex-grow: 1;
    padding: 12px;
    background-color: #4a4aef; 
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    text-decoration: none; /* Added so that the link is not underlined */
}

.new-chat-btn i {
    margin-right: 8px;
}

.search-btn {
    padding: 10px 12px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.chat-history {
    flex-grow: 1; /* Filling the remaining space with history */
    overflow-y: auto; /* Scroll if history is full */
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 8px;
}

.history-header h3 {
    font-size: 0.8em;
    color: #6c757d;
    font-weight: 600;
}

.history-header .clear-all {
    font-size: 0.8em;
    color: #6c757d;
    text-decoration: none;
}

.chat-history ul {
    list-style: none;
}

.chat-history li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-history li:hover,
.chat-history li.active {
    background-color: #f0f0f0;
}

.chat-history li i {
    color: #6c757d;
}

.sidebar-footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
}

.sidebar-footer ul {
    list-style: none;
}

.sidebar-footer li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.sidebar-footer li:hover {
    background-color: #f0f0f0;
}

.sidebar-footer .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ddd;
}

/* --- 2. Chat Area (Right) --- */
.chat-area {
    flex-grow: 1; /* Filling the remaining space */
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    height: 100vh;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.1em;
    font-weight: 600;
    flex-shrink: 0; /* Preventing headers from shrinking */
}

.chat-log {
    flex-grow: 1; /* Filling the center space */
    overflow-y: auto; /* This is a scrollable chat area. */
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Distance between messages */
}

/* --- STYLE FOR EMPTY STATE --- */
.empty-chat-placeholder {
    flex-grow: 1; /* Ensuring placeholders fill the chat log space */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #aaa;
}

.empty-chat-placeholder i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-chat-placeholder h2 {
    font-size: 1.5em;
    font-weight: 500;
}
/* ------------------------------- */


/* Styling for each message (Saved for later when you add a chat) */
.chat-message {
    display: flex;
    gap: 16px;
    max-width: 90%; /* So that it is not too wide */
}

.chat-message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.chat-message.user .avatar {
    background-color: #cce5ff;
}

.chat-message.bot .avatar {
    background-color: #d1e7dd;
}

.message-content {
    padding-top: 8px;
}

.message-content strong { /* For title Enviro Education Tools Chatbot */
    display: block;
    margin-bottom: 4px;
    font-size: 1.05em;
}

.message-content p, 
.message-content ol {
    line-height: 1.6;
}

.message-content ol {
    padding-left: 20px; /* Indentation for ordered lists */
    margin-top: 10px;
}

.message-content li {
    margin-bottom: 8px;
}

/* Input Area Below */
.chat-input-area {
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    flex-shrink: 0; /* Preventing the input area from shrinking */
}

.input-wrapper {
    display: flex;
    position: relative;
    max-width: 900px; /* Limit input width */
    margin: 0 auto;
}

.chat-input-area input {
    flex-grow: 1;
    padding: 16px 50px 16px 20px; /* Make space for the send button */
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
}

.chat-input-area input:focus {
    outline: none;
    border-color: #4a4aef;
    box-shadow: 0 0 0 2px #4a4aef30;
}

.send-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #4a4aef;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Make a circle */
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The “Upgrade” tab on the right side */
.upgrade-tab {
    position: fixed;
    top: 50%;
    right: -60px; /* Adjust the position so that it sticks out slightly. */
    transform: translateY(-50%) rotate(-90deg);
    background-color: #4a4aef;
    color: white;
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: pointer;
    z-index: 10;
}