wineater-bot 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wineater-chatbot.mjs +2272 -3047
- package/dist/wineater-chatbot.umd.js +259 -784
- package/index.html +1 -1
- package/package.json +1 -1
- package/src/index.js +1 -95
- package/src/js/i18n.js +29 -0
- package/src/js/widget-styles.js +190 -13
- package/src/js/widget.js +130 -271
- package/src/css/styles.css +0 -239
- package/src/js/auto-open.js +0 -64
- package/src/js/barConfig.js +0 -54
- package/src/js/chatbot.js +0 -140
- package/src/js/styles.js +0 -651
- package/src/js/ui.js +0 -107
package/src/js/styles.js
DELETED
|
@@ -1,651 +0,0 @@
|
|
|
1
|
-
const css = `
|
|
2
|
-
:root {
|
|
3
|
-
--wineater-corp-color: #0044FF;
|
|
4
|
-
--wineater-color: #7B2BEB;
|
|
5
|
-
}
|
|
6
|
-
@font-face {
|
|
7
|
-
font-family: 'Poppins';
|
|
8
|
-
src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* Overall chatbot styles */
|
|
12
|
-
#chatbot-container {
|
|
13
|
-
position: fixed;
|
|
14
|
-
bottom: 20px;
|
|
15
|
-
right: 20px;
|
|
16
|
-
font-family: 'Poppins', sans-serif; /* Use Poppins as the main font */
|
|
17
|
-
z-index: 10000; /* Ensure chat is above other content */
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/* Styling the chat icon */
|
|
21
|
-
#chat-icon {
|
|
22
|
-
height: 50px;
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
padding: 10px 20px;
|
|
27
|
-
border-radius: 25px;
|
|
28
|
-
background: linear-gradient(90deg, var(--wineater-color), var(--wineater-corp-color)); /* Фиолетовый к синему */
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Тень */
|
|
31
|
-
color: white; /* Белый текст */
|
|
32
|
-
font-family: 'Poppins', sans-serif;
|
|
33
|
-
font-size: 16px; /* Увеличенный размер текста */
|
|
34
|
-
font-weight: bold;
|
|
35
|
-
box-sizing: border-box;
|
|
36
|
-
transition: transform 0.2s ease, box-shadow 0.2s ease; /* Анимация при наведении */
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
#chat-icon:hover {
|
|
40
|
-
transform: scale(1.1) translateY(-50%) rotate(90deg); /* Увеличение при наведении */
|
|
41
|
-
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); /* Более глубокая тень */
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@keyframes pulse {
|
|
46
|
-
0%, 100% {
|
|
47
|
-
transform: scale(1);
|
|
48
|
-
}
|
|
49
|
-
50% {
|
|
50
|
-
transform: scale(1.1);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Подёргивание раз в 10 секунд */
|
|
55
|
-
.wiggle {
|
|
56
|
-
animation: wiggle 0.3s ease-in-out 10s infinite;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Плавное пульсирование каждые 10 секунд */
|
|
60
|
-
.pulse {
|
|
61
|
-
animation: pulse 1.5s ease-in-out 10s infinite;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* Position class for bottom-right */
|
|
65
|
-
.chat-icon-bottom-right {
|
|
66
|
-
position: fixed;
|
|
67
|
-
bottom: 20px;
|
|
68
|
-
right: 20px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.chat-icon-right-center {
|
|
72
|
-
position: fixed;
|
|
73
|
-
top: 50%;
|
|
74
|
-
right: -85px;
|
|
75
|
-
transform: translateY(-50%) rotate(90deg);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
#chat-icon img {
|
|
79
|
-
width: 40px;
|
|
80
|
-
height: auto;
|
|
81
|
-
margin-right: 8px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
#chat-icon span {
|
|
85
|
-
color: white; /* Text color */
|
|
86
|
-
font-family: 'Poppins', sans-serif;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Chat window styles */
|
|
90
|
-
#chat-window {
|
|
91
|
-
position: fixed;
|
|
92
|
-
bottom: 20px;
|
|
93
|
-
right: 20px;
|
|
94
|
-
width: 380px;
|
|
95
|
-
background-color: white;
|
|
96
|
-
border-radius: 24px;
|
|
97
|
-
border: 2px solid transparent;
|
|
98
|
-
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
99
|
-
display: none;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
background: linear-gradient(white, white) padding-box,
|
|
102
|
-
linear-gradient(90deg, var(--wineater-color), var(--wineater-corp-color)) border-box;
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
#chat-header {
|
|
107
|
-
background-color: #FAFAFA;
|
|
108
|
-
padding: 24px 24px 20px;
|
|
109
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
110
|
-
display: flex;
|
|
111
|
-
justify-content: space-between;
|
|
112
|
-
align-items: flex-start;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
#chat-title h1 {
|
|
116
|
-
font-family: 'Poppins', sans-serif;
|
|
117
|
-
font-size: 20px;
|
|
118
|
-
font-weight: 600;
|
|
119
|
-
color: #1F1F1F;
|
|
120
|
-
margin: 0;
|
|
121
|
-
line-height: 1.3;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
#chat-title p {
|
|
125
|
-
font-family: 'Poppins', sans-serif;
|
|
126
|
-
font-size: 14px;
|
|
127
|
-
color: #666;
|
|
128
|
-
margin: 0;
|
|
129
|
-
line-height: 1.4;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
#close-btn {
|
|
133
|
-
font-size: 20px;
|
|
134
|
-
color: #666;
|
|
135
|
-
cursor: pointer;
|
|
136
|
-
padding: 4px 8px;
|
|
137
|
-
margin: -4px -4px 0 16px;
|
|
138
|
-
line-height: 1;
|
|
139
|
-
border-radius: 50%;
|
|
140
|
-
transition: all 0.2s ease;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
#close-btn:hover {
|
|
144
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
145
|
-
color: #333;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
#message-container {
|
|
149
|
-
padding: 20px 24px;
|
|
150
|
-
max-height: 400px;
|
|
151
|
-
overflow-y: auto;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.message {
|
|
155
|
-
margin-bottom: 16px;
|
|
156
|
-
max-width: 85%;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.bot-message {
|
|
160
|
-
background-color: #F6F6F6;
|
|
161
|
-
padding: 12px 16px;
|
|
162
|
-
border-radius: 16px;
|
|
163
|
-
border-top-left-radius: 4px;
|
|
164
|
-
margin-right: auto;
|
|
165
|
-
font-size: 14px;
|
|
166
|
-
line-height: 1.5;
|
|
167
|
-
color: #1F1F1F;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.user-message {
|
|
171
|
-
background-color: #7E27ED;
|
|
172
|
-
color: white;
|
|
173
|
-
padding: 12px 16px;
|
|
174
|
-
border-radius: 16px;
|
|
175
|
-
border-top-right-radius: 4px;
|
|
176
|
-
margin-left: auto;
|
|
177
|
-
font-size: 14px;
|
|
178
|
-
line-height: 1.5;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
#input-container {
|
|
182
|
-
padding: 16px 16px; /* Уменьшенный паддинг по бокам */
|
|
183
|
-
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
|
184
|
-
display: flex;
|
|
185
|
-
gap: 0; /* Убрали отступ между элементами */
|
|
186
|
-
background-color: white;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/* Стили для поля ввода */
|
|
190
|
-
#user-input {
|
|
191
|
-
flex: 1;
|
|
192
|
-
padding: 12px 16px;
|
|
193
|
-
border: 2px solid transparent; /* Прозрачная граница для эффекта градиента */
|
|
194
|
-
border-radius: 12px 0 0 12px; /* Скругление только слева */
|
|
195
|
-
font-size: 14px;
|
|
196
|
-
line-height: 1.5;
|
|
197
|
-
color: #2C2C2C;
|
|
198
|
-
transition: all 0.2s ease;
|
|
199
|
-
background:
|
|
200
|
-
linear-gradient(white, white) padding-box,
|
|
201
|
-
linear-gradient(90deg, var(--wineater-corp-color), var(--wineater-color)) border-box;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
#user-input:focus {
|
|
205
|
-
outline: none;
|
|
206
|
-
box-shadow: 0 0 0 3px rgba(123, 43, 235, 0.1);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/* Кнопка отправки */
|
|
210
|
-
#send-button {
|
|
211
|
-
background: linear-gradient(90deg, var(--wineater-color), var(--wineater-corp-color));
|
|
212
|
-
color: white;
|
|
213
|
-
border: none;
|
|
214
|
-
padding: 12px 24px;
|
|
215
|
-
border-radius: 0 12px 12px 0; /* Скругление только справа */
|
|
216
|
-
font-size: 14px;
|
|
217
|
-
font-weight: 500;
|
|
218
|
-
cursor: pointer;
|
|
219
|
-
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
220
|
-
box-shadow: 0 2px 8px rgba(123, 43, 235, 0.15);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
#send-button:hover {
|
|
224
|
-
transform: translateY(-1px);
|
|
225
|
-
box-shadow: 0 4px 12px rgba(123, 43, 235, 0.2);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
#send-button:active {
|
|
229
|
-
transform: translateY(0);
|
|
230
|
-
box-shadow: 0 2px 8px rgba(123, 43, 235, 0.15);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
#powered-by {
|
|
234
|
-
padding: 12px 24px;
|
|
235
|
-
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
|
236
|
-
display: flex;
|
|
237
|
-
align-items: center;
|
|
238
|
-
justify-content: center;
|
|
239
|
-
background-color: #FAFAFA;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
#powered-by a {
|
|
243
|
-
display: flex;
|
|
244
|
-
align-items: center;
|
|
245
|
-
text-decoration: none;
|
|
246
|
-
opacity: 0.7;
|
|
247
|
-
transition: opacity 0.2s ease;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
#powered-by a:hover {
|
|
251
|
-
opacity: 1;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
#powered-by span {
|
|
255
|
-
font-family: 'Poppins', sans-serif;
|
|
256
|
-
color: #666;
|
|
257
|
-
margin-right: 8px;
|
|
258
|
-
font-size: 12px;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
#chatbot-logo {
|
|
262
|
-
height: 16px;
|
|
263
|
-
width: auto;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/* Container for messages */
|
|
267
|
-
#message-container {
|
|
268
|
-
padding: 24px;
|
|
269
|
-
display: flex;
|
|
270
|
-
max-height: 500px;
|
|
271
|
-
height: 400px;
|
|
272
|
-
flex-direction: column;
|
|
273
|
-
gap: 16px;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/* Message bubble styling */
|
|
277
|
-
.message {
|
|
278
|
-
padding: 16px 20px;
|
|
279
|
-
border-radius: 20px;
|
|
280
|
-
margin-bottom: 8px;
|
|
281
|
-
font-size: 15px;
|
|
282
|
-
line-height: 1.5;
|
|
283
|
-
font-family: 'Poppins', sans-serif;
|
|
284
|
-
width: fit-content;
|
|
285
|
-
max-width: 85%;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/* Стили для сообщений API (бота) */
|
|
289
|
-
.message.api {
|
|
290
|
-
background: linear-gradient(90deg, var(--wineater-color), var(--wineater-corp-color));
|
|
291
|
-
color: white;
|
|
292
|
-
border-top-left-radius: 4px;
|
|
293
|
-
margin-right: auto;
|
|
294
|
-
box-shadow: 0 2px 8px rgba(123, 43, 235, 0.15);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/* Стили для пользовательских сообщений */
|
|
298
|
-
.message.user {
|
|
299
|
-
background-color: #F0F0F0;
|
|
300
|
-
color: #2C2C2C;
|
|
301
|
-
border-top-right-radius: 4px;
|
|
302
|
-
margin-left: auto;
|
|
303
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
/* Dish item styling */
|
|
308
|
-
.dish-message {
|
|
309
|
-
border: 2px solid #7E27ED; /* Bold yellow border */
|
|
310
|
-
cursor: pointer;
|
|
311
|
-
padding: 14px;
|
|
312
|
-
font-weight: bold;
|
|
313
|
-
font-size: 16px;
|
|
314
|
-
border-radius: 12px;
|
|
315
|
-
color: #333;
|
|
316
|
-
margin-top: 10px;
|
|
317
|
-
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for depth */
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/* Wine item styling */
|
|
321
|
-
|
|
322
|
-
.wine-recommendation {
|
|
323
|
-
display: flex;
|
|
324
|
-
flex-direction: column;
|
|
325
|
-
background: white;
|
|
326
|
-
border: 2px solid transparent; /* Прозрачная граница для эффекта градиента */
|
|
327
|
-
border-radius: 20px;
|
|
328
|
-
border-top-left-radius: 4px;
|
|
329
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
330
|
-
background:
|
|
331
|
-
linear-gradient(white, white) padding-box,
|
|
332
|
-
linear-gradient(90deg, var(--wineater-color), var(--wineater-corp-color)) border-box;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.wine-item {
|
|
336
|
-
display: flex;
|
|
337
|
-
padding: 16px;
|
|
338
|
-
gap: 16px;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.wine-item img {
|
|
342
|
-
width: 100px;
|
|
343
|
-
height: 100px;
|
|
344
|
-
object-fit: cover;
|
|
345
|
-
border-radius: 8px;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.wine-item-details {
|
|
349
|
-
flex: 1;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.wine-item-details strong {
|
|
353
|
-
font-size: 16px;
|
|
354
|
-
color: #2C2C2C;
|
|
355
|
-
display: block;
|
|
356
|
-
margin-bottom: 4px;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.wine-item-price {
|
|
360
|
-
color: var(--wineater-color);
|
|
361
|
-
font-weight: 500;
|
|
362
|
-
margin-bottom: 4px;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.wine-item-region {
|
|
366
|
-
color: #666;
|
|
367
|
-
font-size: 14px;
|
|
368
|
-
margin-bottom: 4px;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.wine-item a {
|
|
372
|
-
color: var(--wineater-corp-color); /* Синий цвет ссылки */
|
|
373
|
-
text-decoration: underline; /* Подчеркивание для эффекта ссылки */
|
|
374
|
-
font-size: 14px; /* Размер текста */
|
|
375
|
-
font-weight: 500; /* Полужирный текст */
|
|
376
|
-
margin-top: 10px; /* Отступ сверху */
|
|
377
|
-
display: inline-block; /* Чтобы отступы работали корректно */
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.wine-item a:hover {
|
|
381
|
-
text-decoration: none; /* Убираем подчеркивание при наведении */
|
|
382
|
-
color: #002699; /* Более темный синий для интерактивного эффекта */
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.wine-description {
|
|
386
|
-
padding: 12px 16px;
|
|
387
|
-
color: white;
|
|
388
|
-
|
|
389
|
-
border-radius: 0px;
|
|
390
|
-
border-bottom-left-radius: 15px;
|
|
391
|
-
border-bottom-right-radius: 15px;
|
|
392
|
-
|
|
393
|
-
font-size: 14px;
|
|
394
|
-
line-height: 1.5;
|
|
395
|
-
background: linear-gradient(90deg, var(--wineater-color), var(--wineater-corp-color));
|
|
396
|
-
box-shadow: 0 2px 8px rgba(123, 43, 235, 0.15);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/* Ensure the chat window is visible when the 'visible' class is added */
|
|
400
|
-
#chat-window.visible {
|
|
401
|
-
display: block;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/* Loader Styles */
|
|
405
|
-
.loader {
|
|
406
|
-
display: none;
|
|
407
|
-
width: 40px;
|
|
408
|
-
height: 40px;
|
|
409
|
-
margin: 20px auto;
|
|
410
|
-
background: conic-gradient(from 0deg, var(--wineater-color), var(--wineater-corp-color), var(--wineater-color));
|
|
411
|
-
border-radius: 50%;
|
|
412
|
-
animation: spin 1s linear infinite;
|
|
413
|
-
position: relative;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.loader::after {
|
|
417
|
-
content: '';
|
|
418
|
-
position: absolute;
|
|
419
|
-
top: 4px;
|
|
420
|
-
left: 4px;
|
|
421
|
-
right: 4px;
|
|
422
|
-
bottom: 4px;
|
|
423
|
-
background: white;
|
|
424
|
-
border-radius: 50%;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.loader.visible {
|
|
428
|
-
display: block;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
@keyframes spin {
|
|
432
|
-
from { transform: rotate(0deg); }
|
|
433
|
-
to { transform: rotate(360deg); }
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
/* Typing indicator styles */
|
|
437
|
-
.typing-indicator {
|
|
438
|
-
display: flex;
|
|
439
|
-
justify-content: center;
|
|
440
|
-
align-items: center;
|
|
441
|
-
height: 0;
|
|
442
|
-
visibility: hidden;
|
|
443
|
-
background-color: white;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
#loading-indicator .typing-indicator {
|
|
447
|
-
visibility: visible;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.typing-indicator span {
|
|
451
|
-
display: block;
|
|
452
|
-
width: 8px;
|
|
453
|
-
height: 8px;
|
|
454
|
-
margin: 0 3px;
|
|
455
|
-
border-radius: 50%;
|
|
456
|
-
background: linear-gradient(90deg, var(--wineater-color), var(--wineater-corp-color));
|
|
457
|
-
opacity: 0.7;
|
|
458
|
-
animation: typing 1s infinite;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
@keyframes typing {
|
|
462
|
-
0%, 100% {
|
|
463
|
-
transform: translateY(0);
|
|
464
|
-
opacity: 0.7;
|
|
465
|
-
}
|
|
466
|
-
50% {
|
|
467
|
-
transform: translateY(-8px);
|
|
468
|
-
opacity: 1;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
/* Staggered animation for typing dots */
|
|
473
|
-
.typing-indicator span:nth-child(1) {
|
|
474
|
-
animation-delay: 0s;
|
|
475
|
-
}
|
|
476
|
-
.typing-indicator span:nth-child(2) {
|
|
477
|
-
animation-delay: 0.15s;
|
|
478
|
-
}
|
|
479
|
-
.typing-indicator span:nth-child(3) {
|
|
480
|
-
animation-delay: 0.3s;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/* Show the typing indicator */
|
|
484
|
-
.typing-indicator.visible {
|
|
485
|
-
visibility: visible;
|
|
486
|
-
height: 40px;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
@media screen and (max-width: 768px) {
|
|
490
|
-
#chat-window {
|
|
491
|
-
width: 100%;
|
|
492
|
-
height: 100%;
|
|
493
|
-
bottom: 0;
|
|
494
|
-
right: 0;
|
|
495
|
-
border-radius: 0;
|
|
496
|
-
position: fixed;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
#message-container {
|
|
500
|
-
height: calc(100vh - 250px); /* Учитываем высоту header и input container */
|
|
501
|
-
max-height: none;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
#chat-icon {
|
|
505
|
-
height: 45px;
|
|
506
|
-
padding: 8px 16px;
|
|
507
|
-
font-size: 14px;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
#chat-icon {
|
|
511
|
-
height: 36px; /* Ещё меньше для мобильных */
|
|
512
|
-
padding: 6px 12px;
|
|
513
|
-
font-size: 13px;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
#chat-icon img {
|
|
517
|
-
width: 20px;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
#input-container {
|
|
521
|
-
padding: 12px;
|
|
522
|
-
position: fixed;
|
|
523
|
-
bottom: 30px;
|
|
524
|
-
width: 100%;
|
|
525
|
-
box-sizing: border-box;
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
#user-input {
|
|
530
|
-
font-size: 16px; /* Оптимальный размер для мобильных устройств */
|
|
531
|
-
padding: 10px 14px;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
#send-button {
|
|
535
|
-
padding: 10px 20px;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.wine-item {
|
|
539
|
-
flex-direction: column;
|
|
540
|
-
padding: 12px;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.wine-item img {
|
|
544
|
-
width: 100%;
|
|
545
|
-
height: 200px;
|
|
546
|
-
margin-bottom: 12px;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
@media screen and (max-width: 480px) {
|
|
551
|
-
#chat-header {
|
|
552
|
-
padding: 16px;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
#chat-icon {
|
|
556
|
-
padding: 3px 10px;
|
|
557
|
-
font-size: 12px;
|
|
558
|
-
border-radius: 10px;
|
|
559
|
-
border-top-right-radius: 0;
|
|
560
|
-
border-top-left-radius: 0;
|
|
561
|
-
right: -77px;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
#chat-icon img {
|
|
565
|
-
width: 18px;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
#chat-title h1 {
|
|
569
|
-
font-size: 18px;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
#chat-title p {
|
|
573
|
-
font-size: 12px;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.message {
|
|
577
|
-
padding: 12px 16px;
|
|
578
|
-
font-size: 14px;
|
|
579
|
-
max-width: 95%;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.wine-recommendation {
|
|
583
|
-
margin: 10px 0;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
.wine-description {
|
|
587
|
-
padding: 10px 14px;
|
|
588
|
-
font-size: 13px;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
#powered-by {
|
|
592
|
-
padding: 8px 16px;
|
|
593
|
-
display: block;
|
|
594
|
-
position: fixed;
|
|
595
|
-
width: 100%;
|
|
596
|
-
bottom: 0;
|
|
597
|
-
text-align: center;
|
|
598
|
-
box-sizing: border-box;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
#powered-by a {
|
|
602
|
-
width: 100%;
|
|
603
|
-
justify-content: center;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
#powered-by span {
|
|
607
|
-
font-size: 11px;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
#chatbot-logo {
|
|
611
|
-
height: 14px;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
/* Стили для планшетов */
|
|
616
|
-
@media screen and (min-width: 769px) and (max-width: 1024px) {
|
|
617
|
-
#chat-window {
|
|
618
|
-
width: 400px;
|
|
619
|
-
right: 30px;
|
|
620
|
-
bottom: 30px;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
#message-container {
|
|
624
|
-
max-height: 450px;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
/* Стили для ландшафтной ориентации на мобильных */
|
|
629
|
-
@media screen and (max-height: 600px) and (orientation: landscape) {
|
|
630
|
-
#chat-window {
|
|
631
|
-
height: 100vh;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
#message-container {
|
|
635
|
-
height: calc(100vh - 140px);
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
.wine-item {
|
|
639
|
-
flex-direction: row;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
.wine-item img {
|
|
643
|
-
width: 80px;
|
|
644
|
-
height: 80px;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
`;
|
|
648
|
-
|
|
649
|
-
const style = document.createElement('style');
|
|
650
|
-
style.textContent = css;
|
|
651
|
-
document.head.appendChild(style);
|