forked from anuragverma108/SwapReads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chat.css
357 lines (304 loc) · 6.45 KB
/
chat.css
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
/* Basic Styles */
body {
font-family: Arial, sans-serif;
}
.mainbox {
/* margin-top: 45rem; */
margin: 250px auto;
width: 800px;
background-color: white;
border-radius: 20px;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
#chat-container {
display: flex;
flex-direction: column;
height: 100%;
}
#user-input, #message-input {
display: flex;
align-items: center;
padding: 15px;
background-color: #f5f5f5;
}
#username, #message {
flex-grow: 1;
border: none;
border-radius: 20px;
padding: 10px 15px;
font-size: 14px;
outline: none;
}
#start-chat, #send-message, #gift-button {
background-color: #ff9b9b;
color: white;
border: none;
border-radius: 20px;
padding: 10px 15px;
margin-left: 10px;
cursor: pointer;
font-size: 14px;
}
#chat-box {
flex-grow: 1;
display: flex;
flex-direction: column;
}
#messages {
flex-grow: 1;
overflow-y: auto;
padding: 15px;
border: none;
}
.message {
margin-bottom: 15px;
max-width: 80%;
padding: 10px 15px;
border-radius: 18px;
}
.message:nth-child(odd) {
background-color: #fae5e5;
border-radius: 18px 18px 0 18px;
align-self: flex-end;
}
.message:nth-child(even) {
background-color: #f5f5f5;
border-radius: 18px 18px 18px 0;
align-self: flex-start;
}
.username {
font-weight: bold;
margin-bottom: 5px;
}
.timestamp {
font-size: 0.8em;
color: #888;
margin-top: 5px;
}
#gift-button img {
width: 20px;
height: 20px;
}
#backbutton {
background-color: #ff9b9b;
color: white;
border: none;
border-radius: 20px;
padding: 5px 10px;
margin-right: 10px;
cursor: pointer;
font-size: 12px;
text-decoration: none;
}
#backbutton a {
color: white;
text-decoration: none;
}
/*
.dropdown-menu {
display: none;
position: absolute;
background-color: white;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
padding: 10px;
border-radius: 5px;
z-index: 1000;
}
.dropdown-menu.active {
display: block;
}
.navbar-item {
position: relative;
}
.dropdown-menu-list {
list-style-type: none;
padding: 0;
margin: 0;
}
.dropdown-menu-item {
margin-top: 5px;
}
.dropdown-menu-item a {
color: black;
text-decoration: none;
} */
/* Header */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background-color: white;
height: 70px;
width: 100%;
padding: 0 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
}
.navbar-brand img {
height: 70px;
}
.navbar-item {
width: 60px;
font-size: 15px;
font-family: sans-serif;
padding: 0 10px; /* Reduced padding */
flex-shrink: 0; /* Prevents excessive shrinking */
flex-grow: 1; /* Distributes space equally */
white-space: nowrap; /* Prevents text from wrapping */
text-align: center; /* Centers text if needed */
}
.navbar-toggle {
display: none;
font-size: 30px;
background: none;
border: none;
cursor: pointer;
}
a {
text-decoration: none;
color: black;
}
.navbar-menu {
display: flex;
justify-content: space-between;
flex-wrap: nowrap; /* Prevents items from wrapping to the next line */
gap: 0px; /* Space between items */
gap: 5px; /* Space between items */
width: 100%; /* Ensure it takes full width */
}
.maindiv {
display: flex;
justify-content: center;
margin-top: 80px; /* to prevent overlap with the fixed header */
}
.navbar {
overflow: hidden; /* Prevents items from overflowing */
}
/* Back Button */
/* #backbutton {
display: flex;
justify-content: center;
align-items: center;
height: 30px;
width: 40px;
font-size: 10px;
background-color: rgb(117, 48, 48);
border: none;
border-radius: 5px;
cursor: pointer;
} */
/* Footer */
footer {
display: flex;
justify-content: space-around;
align-items: flex-start;
background-color: #ff9b9b;
font-family: sans-serif;
padding: 20px 0;
margin-top: -200px;
flex-wrap: wrap;
}
.footleft, .foot-right {
flex: 1; /* Take equal space */
margin: 20px;
max-width: 45%; /* Ensure they don't take more than 45% of width each */
}
.footleft {
text-align: left;
}
.foot-right ul {
padding: 0;
list-style-type: none;
}
.foot-right {
text-align: right;
}
.foot-right li {
margin-top: 5px;
text-align: center;
}
.description {
text-align: justify;
color: #6d767e;
margin-top: 10px;
line-height: 1.5; /* Add line height for better readability */
max-width: 1200px; /* Limit the width for better text formatting */
}
.description p {
margin: 10px 0;
}
/* Responsive Design */
@media (max-width: 768px) {
body {
padding-top: auto; /* Adjust padding for smaller screens */
}
.navbar {
flex-direction: column;
height: auto;
padding: 10px 0;
}
.navbar-menu.active {
display: flex;
flex-direction: column;
position: absolute;
top: 70px;
left: 0;
width: 100%;
background: white;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
margin-bottom: 10px;
}
.navbar-item {
padding: 10px 0;
width: 100%;
text-align: center;
}
.navbar-toggle {
display: block;
}
.navbar-menu {
display: none;
flex-direction: column;
width: 100%;
align-items: center;
}
#chat-container {
max-width: 100%; /* Ensure the chat container adjusts to the screen size */
margin: 80px 10px 20px 10px; /* Adjust margins for small screens */
padding: 10px;
}
#user-input, #message-input {
flex-direction: column;
align-items: stretch;
}
#user-input input, #message-input input,
#user-input button, #message-input button {
width: 100%;
margin: 5px 0;
}
footer {
flex-direction: column;
align-items: center;
text-align: center;
margin-left: 10px;
margin-right: 10px;
}
.footleft, .foot-right {
max-width: 100%; /* Full width on small screens */
text-align: center;
margin: 10px 0;
}
}
/* Active state for showing menu */
.navbar-menu.active {
display: flex;
}