humanvprojectceo commited on
Commit
f93bef0
·
verified ·
1 Parent(s): 9f81cba

Update customer.html

Browse files
Files changed (1) hide show
  1. customer.html +76 -71
customer.html CHANGED
@@ -106,6 +106,10 @@
106
  --vh: 1vh;
107
  }
108
 
 
 
 
 
109
  html {
110
  scroll-behavior: smooth;
111
  height: 100%;
@@ -122,18 +126,15 @@
122
  color: #f5e6d3;
123
  -webkit-tap-highlight-color: transparent;
124
  font-feature-settings: "ss01", "cv01";
125
- height: 100%;
 
 
 
126
  overflow: hidden;
127
  position: fixed;
128
- inset: 0;
129
  width: 100%;
130
  }
131
 
132
- /* Fix for iOS 100dvh */
133
- @supports (height: 100dvh) {
134
- body { height: 100dvh; }
135
- }
136
-
137
  .bg-pattern {
138
  background-image: var(--pattern-url);
139
  background-size: 80px 80px;
@@ -148,7 +149,6 @@
148
  background-size: 200px 200px;
149
  }
150
 
151
- /* Scrollbar */
152
  ::-webkit-scrollbar { width: 6px; height: 6px; }
153
  ::-webkit-scrollbar-track { background: transparent; }
154
  ::-webkit-scrollbar-thumb {
@@ -177,7 +177,6 @@
177
  inset 0 1px 0 rgba(94, 234, 212, 0.1);
178
  }
179
 
180
- /* دکمه میز - طرح فرش */
181
  .table-btn {
182
  position: relative;
183
  background: linear-gradient(145deg, rgba(139, 30, 63, 0.15), rgba(90, 16, 40, 0.25));
@@ -211,7 +210,6 @@
211
  }
212
  .table-btn:active { transform: translateY(-1px) scale(1); }
213
 
214
- /* Ornament divider */
215
  .ornament-divider {
216
  position: relative;
217
  text-align: center;
@@ -228,7 +226,6 @@
228
  .ornament-divider::before { left: 0; }
229
  .ornament-divider::after { right: 0; }
230
 
231
- /* Chat Markdown Styles */
232
  .chat-markdown { line-height: 1.85; word-wrap: break-word; overflow-wrap: break-word; }
233
  .chat-markdown > * + * { margin-top: 0.6em; }
234
 
@@ -356,17 +353,14 @@
356
  border: 2px solid rgba(201, 169, 97, 0.3);
357
  }
358
 
359
- /* Table number glow */
360
  .table-number-glow {
361
  text-shadow: 0 0 10px rgba(201, 169, 97, 0.8), 0 0 20px rgba(201, 169, 97, 0.4);
362
  }
363
 
364
- /* Decorative frame */
365
  .arch-shape {
366
  border-radius: 50% 50% 1rem 1rem / 35% 35% 1rem 1rem;
367
  }
368
 
369
- /* Button primary */
370
  .btn-primary {
371
  background: linear-gradient(135deg, #c9a961 0%, #9c7d3a 100%);
372
  color: #1a0d07;
@@ -395,7 +389,6 @@
395
  border-color: rgba(201, 169, 97, 0.6);
396
  }
397
 
398
- /* Typing dots */
399
  .typing-dots span {
400
  display: inline-block;
401
  width: 6px;
@@ -411,28 +404,32 @@
411
  30% { transform: translateY(-8px); opacity: 1; }
412
  }
413
 
414
- /* Input focus */
415
  input:focus {
416
  outline: none;
417
  border-color: rgba(201, 169, 97, 0.6) !important;
418
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
419
  }
420
 
421
- /* Safe area padding for iOS */
422
- .safe-bottom {
423
- padding-bottom: env(safe-area-inset-bottom);
 
 
 
 
424
  }
425
 
426
- /* View container */
427
  .view-container {
428
  position: fixed;
429
  inset: 0;
430
  display: flex;
431
  flex-direction: column;
432
  overflow: hidden;
 
 
 
433
  }
434
 
435
- /* Scrollable areas */
436
  .scroll-area {
437
  overflow-y: auto;
438
  overflow-x: hidden;
@@ -440,42 +437,64 @@
440
  -webkit-overflow-scrolling: touch;
441
  }
442
 
443
- /* Mobile chat input adjustments */
444
- @media (max-width: 640px) {
 
 
 
 
 
 
 
 
 
 
 
 
445
  .chat-input-area {
446
- padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
447
  }
448
- .chat-markdown { font-size: 0.95rem; }
449
  }
450
 
451
- /* Landscape mobile */
452
- @media (max-height: 500px) and (orientation: landscape) {
453
- .hero-title { font-size: 2.5rem !important; }
454
- .hero-logo { width: 60px !important; height: 60px !important; }
 
 
455
  }
456
 
457
- /* Prevent text selection on buttons */
458
- button, .no-select {
459
- -webkit-user-select: none;
460
- user-select: none;
 
 
461
  }
462
 
463
- /* Hide view cleanly */
464
- .view-hidden {
465
- display: none !important;
 
 
 
466
  }
467
 
468
- /* Show view with animation */
469
- .view-visible {
470
- display: flex !important;
471
- animation: fadeIn 0.35s ease-out;
 
 
472
  }
473
 
474
- /* Small mobile tables grid */
475
- @media (max-width: 480px) {
476
- .tables-grid-mobile {
477
- grid-template-columns: repeat(4, 1fr);
478
- gap: 0.5rem;
 
 
479
  }
480
  }
481
  </style>
@@ -498,13 +517,13 @@
498
  <div class="scroll-area flex-1 relative z-10 flex flex-col min-h-0">
499
 
500
  <!-- Hero Header -->
501
- <header class="px-4 pt-6 pb-3 md:pt-10 md:pb-4 text-center relative flex-shrink-0">
502
  <div class="max-w-4xl mx-auto">
503
 
504
  <div class="inline-flex items-center gap-4 mb-4 animate-float">
505
  <div class="relative">
506
- <div class="hero-logo w-16 h-16 md:w-20 md:h-20 arch-shape bg-gradient-to-br from-rug via-rug-dark to-bazaar-900 border-2 border-ochre/60 flex items-center justify-center shadow-carpet">
507
- <svg class="w-8 h-8 md:w-10 md:h-10 text-ochre-light" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
508
  <path d="M17 8h1a4 4 0 1 1 0 8h-1" stroke-linecap="round"/>
509
  <path d="M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z" stroke-linecap="round"/>
510
  <line x1="6" y1="2" x2="6" y2="4" stroke-linecap="round"/>
@@ -557,7 +576,7 @@
557
  </div>
558
 
559
  <!-- 20 Tables Grid -->
560
- <div id="tablesGrid" class="tables-grid-mobile grid grid-cols-4 sm:grid-cols-5 md:grid-cols-5 lg:grid-cols-10 gap-2 md:gap-3"></div>
561
 
562
  <div class="mt-4 pt-3 border-t border-ochre/15 flex items-center justify-between text-[10px] text-cream/50 flex-wrap gap-1.5">
563
  <span class="flex items-center gap-1.5">
@@ -572,7 +591,7 @@
572
  </div>
573
 
574
  <!-- Info Cards -->
575
- <div class="grid grid-cols-1 md:grid-cols-3 gap-3">
576
  <div class="glass-card rounded-2xl p-4 relative overflow-hidden group">
577
  <div class="absolute top-0 right-0 w-20 h-20 bg-rug/15 rounded-full blur-2xl group-hover:bg-rug/25 transition-all"></div>
578
  <div class="relative">
@@ -622,7 +641,7 @@
622
  </section>
623
 
624
 
625
- <!-- ============ VIEW 2: CHAT ============ -->
626
  <section id="view-chat" class="view-container view-hidden">
627
 
628
  <!-- Ambient Background -->
@@ -634,7 +653,7 @@
634
  </div>
635
 
636
  <!-- Header -->
637
- <header class="flex-shrink-0 border-b border-ochre/20 bg-bazaar-900/70 backdrop-blur-2xl z-20 px-3 py-2.5 md:px-6 md:py-3 shadow-lg">
638
  <div class="max-w-5xl mx-auto flex items-center justify-between gap-2">
639
  <div class="flex items-center gap-2 min-w-0">
640
  <button onclick="backToTables()" class="p-2 text-ochre/70 hover:text-ochre-light transition-colors rounded-lg hover:bg-bazaar-800/50 flex-shrink-0"
@@ -702,7 +721,7 @@
702
  </div>
703
 
704
  <!-- Chat card -->
705
- <div class="flex-1 flex flex-col glass-card-azure rounded-2xl md:rounded-3xl overflow-hidden shadow-xl min-h-0 relative">
706
  <!-- Decorative pattern -->
707
  <div class="absolute inset-0 bg-arch opacity-20 pointer-events-none"></div>
708
 
@@ -766,7 +785,7 @@
766
  </section>
767
 
768
  <script>
769
- // ------------------- Viewport Height Fix (iOS) -------------------
770
  function setVh() {
771
  const vh = window.innerHeight * 0.01;
772
  document.documentElement.style.setProperty('--vh', `${vh}px`);
@@ -787,12 +806,11 @@
787
  window.addEventListener('DOMContentLoaded', () => {
788
  renderTablesGrid();
789
  if (currentTable && currentTable.trim() !== '') {
790
- // Direct URL access with table number
791
  enterChatView(currentTable, false);
792
  }
793
  });
794
 
795
- // Prevent body scroll bounce on iOS
796
  document.addEventListener('touchmove', function(e) {
797
  if (!e.target.closest('.scroll-area')) {
798
  e.preventDefault();
@@ -816,13 +834,11 @@
816
  sel.classList.add('view-visible');
817
  }
818
 
819
- // Reset scroll positions
820
  window.scrollTo(0, 0);
821
  const tablesScroll = sel.querySelector('.scroll-area');
822
  if (tablesScroll) tablesScroll.scrollTop = 0;
823
  const chatScroll = document.getElementById('chatMessages');
824
  if (chatScroll && targetView === 'chat') {
825
- // Scroll chat to bottom when entering
826
  setTimeout(() => {
827
  chatScroll.scrollTop = chatScroll.scrollHeight;
828
  }, 100);
@@ -871,11 +887,6 @@
871
  }
872
  }
873
 
874
- // ------------------- Table number management -------------------
875
- function changeTableNumber() {
876
- backToTables();
877
- }
878
-
879
  function updateTableNumberDisplay(number) {
880
  document.getElementById('tableNumberDisplay').textContent = number;
881
  }
@@ -973,12 +984,11 @@
973
  } else if (data.type === 'error') {
974
  botBubble.textContent = '⚠️ ' + data.content;
975
  }
976
- } catch (parseErr) { /* ignore malformed */ }
977
  }
978
  }
979
  }
980
 
981
- // After stream ends, convert to rendered Markdown
982
  botBubble.textContent = '';
983
  botBubble.innerHTML = marked.parse(fullText);
984
  const chatScroll = document.getElementById('chatMessages');
@@ -1021,7 +1031,6 @@
1021
  }
1022
  }
1023
 
1024
- // ------------------- Draft order panel -------------------
1025
  function showDraftPanel(items) {
1026
  const panel = document.getElementById('draftOrderPanel');
1027
  const draftItems = document.getElementById('draftItems');
@@ -1042,7 +1051,6 @@
1042
  `;
1043
  });
1044
  panel.classList.remove('hidden');
1045
- // Don't scroll body - we're in flex layout
1046
  }
1047
 
1048
  async function confirmOrder() {
@@ -1072,7 +1080,6 @@
1072
  }
1073
  }
1074
 
1075
- // ------------------- Message helpers -------------------
1076
  function appendChatMessage(role, content) {
1077
  const container = document.getElementById('chatMessages');
1078
  const bubbleId = 'bubble-' + Date.now() + '-' + Math.random().toString(36).substr(2, 5);
@@ -1113,7 +1120,7 @@
1113
  return String(text).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;');
1114
  }
1115
 
1116
- // Handle mobile keyboard - scroll input into view
1117
  const chatInput = document.getElementById('chatInput');
1118
  if (chatInput) {
1119
  chatInput.addEventListener('focus', () => {
@@ -1127,8 +1134,6 @@
1127
  });
1128
  }
1129
 
1130
- // Handle viewport resize (e.g., keyboard show/hide on mobile)
1131
- let initialHeight = window.innerHeight;
1132
  window.addEventListener('resize', () => {
1133
  setVh();
1134
  const chatScroll = document.getElementById('chatMessages');
 
106
  --vh: 1vh;
107
  }
108
 
109
+ * {
110
+ box-sizing: border-box;
111
+ }
112
+
113
  html {
114
  scroll-behavior: smooth;
115
  height: 100%;
 
126
  color: #f5e6d3;
127
  -webkit-tap-highlight-color: transparent;
128
  font-feature-settings: "ss01", "cv01";
129
+ margin: 0;
130
+ padding: 0;
131
+ height: 100vh;
132
+ height: 100dvh;
133
  overflow: hidden;
134
  position: fixed;
 
135
  width: 100%;
136
  }
137
 
 
 
 
 
 
138
  .bg-pattern {
139
  background-image: var(--pattern-url);
140
  background-size: 80px 80px;
 
149
  background-size: 200px 200px;
150
  }
151
 
 
152
  ::-webkit-scrollbar { width: 6px; height: 6px; }
153
  ::-webkit-scrollbar-track { background: transparent; }
154
  ::-webkit-scrollbar-thumb {
 
177
  inset 0 1px 0 rgba(94, 234, 212, 0.1);
178
  }
179
 
 
180
  .table-btn {
181
  position: relative;
182
  background: linear-gradient(145deg, rgba(139, 30, 63, 0.15), rgba(90, 16, 40, 0.25));
 
210
  }
211
  .table-btn:active { transform: translateY(-1px) scale(1); }
212
 
 
213
  .ornament-divider {
214
  position: relative;
215
  text-align: center;
 
226
  .ornament-divider::before { left: 0; }
227
  .ornament-divider::after { right: 0; }
228
 
 
229
  .chat-markdown { line-height: 1.85; word-wrap: break-word; overflow-wrap: break-word; }
230
  .chat-markdown > * + * { margin-top: 0.6em; }
231
 
 
353
  border: 2px solid rgba(201, 169, 97, 0.3);
354
  }
355
 
 
356
  .table-number-glow {
357
  text-shadow: 0 0 10px rgba(201, 169, 97, 0.8), 0 0 20px rgba(201, 169, 97, 0.4);
358
  }
359
 
 
360
  .arch-shape {
361
  border-radius: 50% 50% 1rem 1rem / 35% 35% 1rem 1rem;
362
  }
363
 
 
364
  .btn-primary {
365
  background: linear-gradient(135deg, #c9a961 0%, #9c7d3a 100%);
366
  color: #1a0d07;
 
389
  border-color: rgba(201, 169, 97, 0.6);
390
  }
391
 
 
392
  .typing-dots span {
393
  display: inline-block;
394
  width: 6px;
 
404
  30% { transform: translateY(-8px); opacity: 1; }
405
  }
406
 
 
407
  input:focus {
408
  outline: none;
409
  border-color: rgba(201, 169, 97, 0.6) !important;
410
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
411
  }
412
 
413
+ .view-hidden {
414
+ display: none !important;
415
+ }
416
+
417
+ .view-visible {
418
+ display: flex !important;
419
+ animation: fadeIn 0.35s ease-out;
420
  }
421
 
 
422
  .view-container {
423
  position: fixed;
424
  inset: 0;
425
  display: flex;
426
  flex-direction: column;
427
  overflow: hidden;
428
+ width: 100%;
429
+ height: 100vh;
430
+ height: 100dvh;
431
  }
432
 
 
433
  .scroll-area {
434
  overflow-y: auto;
435
  overflow-x: hidden;
 
437
  -webkit-overflow-scrolling: touch;
438
  }
439
 
440
+ button, .no-select {
441
+ -webkit-user-select: none;
442
+ user-select: none;
443
+ }
444
+
445
+ /* ============ RESPONSIVE BREAKPOINTS ============ */
446
+
447
+ /* Mobile First (< 640px) */
448
+ @media (max-width: 639px) {
449
+ .hero-title { font-size: 2.5rem !important; }
450
+ .hero-logo { width: 70px !important; height: 70px !important; }
451
+ .tables-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 0.5rem !important; }
452
+ .table-btn span { font-size: 1.5rem !important; }
453
+ .info-cards { grid-template-columns: 1fr !important; }
454
  .chat-input-area {
455
+ padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)) !important;
456
  }
 
457
  }
458
 
459
+ /* Tablet (640px - 1023px) */
460
+ @media (min-width: 640px) and (max-width: 1023px) {
461
+ .hero-title { font-size: 3.5rem !important; }
462
+ .hero-logo { width: 90px !important; height: 90px !important; }
463
+ .tables-grid { grid-template-columns: repeat(5, 1fr) !important; }
464
+ .info-cards { grid-template-columns: repeat(2, 1fr) !important; }
465
  }
466
 
467
+ /* Desktop (>= 1024px) */
468
+ @media (min-width: 1024px) {
469
+ .hero-title { font-size: 4.5rem !important; }
470
+ .hero-logo { width: 100px !important; height: 100px !important; }
471
+ .tables-grid { grid-template-columns: repeat(10, 1fr) !important; }
472
+ .info-cards { grid-template-columns: repeat(3, 1fr) !important; }
473
  }
474
 
475
+ /* Landscape Mobile */
476
+ @media (max-height: 500px) and (orientation: landscape) {
477
+ .hero-title { font-size: 2rem !important; }
478
+ .hero-logo { width: 50px !important; height: 50px !important; }
479
+ .hero-header { padding-top: 0.5rem !important; padding-bottom: 0.25rem !important; }
480
+ .chat-column { min-height: 280px !important; }
481
  }
482
 
483
+ /* Extra Small Mobile */
484
+ @media (max-width: 380px) {
485
+ .tables-grid { grid-template-columns: repeat(4, 1fr) !important; }
486
+ .table-btn { padding: 0.375rem !important; }
487
+ .table-btn span { font-size: 1.25rem !important; }
488
+ .hero-title { font-size: 2rem !important; }
489
  }
490
 
491
+ /* iOS Safe Area */
492
+ @supports (padding-bottom: env(safe-area-inset-bottom)) {
493
+ .safe-bottom {
494
+ padding-bottom: env(safe-area-inset-bottom);
495
+ }
496
+ .safe-top {
497
+ padding-top: env(safe-area-inset-top);
498
  }
499
  }
500
  </style>
 
517
  <div class="scroll-area flex-1 relative z-10 flex flex-col min-h-0">
518
 
519
  <!-- Hero Header -->
520
+ <header class="hero-header px-4 pt-6 pb-3 md:pt-10 md:pb-4 text-center relative flex-shrink-0">
521
  <div class="max-w-4xl mx-auto">
522
 
523
  <div class="inline-flex items-center gap-4 mb-4 animate-float">
524
  <div class="relative">
525
+ <div class="hero-logo w-20 h-20 md:w-24 md:h-24 arch-shape bg-gradient-to-br from-rug via-rug-dark to-bazaar-900 border-2 border-ochre/60 flex items-center justify-center shadow-carpet">
526
+ <svg class="w-10 h-10 md:w-12 md:h-12 text-ochre-light" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
527
  <path d="M17 8h1a4 4 0 1 1 0 8h-1" stroke-linecap="round"/>
528
  <path d="M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z" stroke-linecap="round"/>
529
  <line x1="6" y1="2" x2="6" y2="4" stroke-linecap="round"/>
 
576
  </div>
577
 
578
  <!-- 20 Tables Grid -->
579
+ <div id="tablesGrid" class="tables-grid grid grid-cols-4 sm:grid-cols-5 md:grid-cols-5 lg:grid-cols-10 gap-2 md:gap-3"></div>
580
 
581
  <div class="mt-4 pt-3 border-t border-ochre/15 flex items-center justify-between text-[10px] text-cream/50 flex-wrap gap-1.5">
582
  <span class="flex items-center gap-1.5">
 
591
  </div>
592
 
593
  <!-- Info Cards -->
594
+ <div class="info-cards grid grid-cols-1 md:grid-cols-3 gap-3">
595
  <div class="glass-card rounded-2xl p-4 relative overflow-hidden group">
596
  <div class="absolute top-0 right-0 w-20 h-20 bg-rug/15 rounded-full blur-2xl group-hover:bg-rug/25 transition-all"></div>
597
  <div class="relative">
 
641
  </section>
642
 
643
 
644
+ <!-- ============ VIEW 2: CHAT (بدون فوتر) ============ -->
645
  <section id="view-chat" class="view-container view-hidden">
646
 
647
  <!-- Ambient Background -->
 
653
  </div>
654
 
655
  <!-- Header -->
656
+ <header class="flex-shrink-0 border-b border-ochre/20 bg-bazaar-900/70 backdrop-blur-2xl z-20 px-3 py-2.5 md:px-6 md:py-3 shadow-lg safe-top">
657
  <div class="max-w-5xl mx-auto flex items-center justify-between gap-2">
658
  <div class="flex items-center gap-2 min-w-0">
659
  <button onclick="backToTables()" class="p-2 text-ochre/70 hover:text-ochre-light transition-colors rounded-lg hover:bg-bazaar-800/50 flex-shrink-0"
 
721
  </div>
722
 
723
  <!-- Chat card -->
724
+ <div class="chat-column flex-1 flex flex-col glass-card-azure rounded-2xl md:rounded-3xl overflow-hidden shadow-xl min-h-0 relative">
725
  <!-- Decorative pattern -->
726
  <div class="absolute inset-0 bg-arch opacity-20 pointer-events-none"></div>
727
 
 
785
  </section>
786
 
787
  <script>
788
+ // ------------------- Viewport Height Fix -------------------
789
  function setVh() {
790
  const vh = window.innerHeight * 0.01;
791
  document.documentElement.style.setProperty('--vh', `${vh}px`);
 
806
  window.addEventListener('DOMContentLoaded', () => {
807
  renderTablesGrid();
808
  if (currentTable && currentTable.trim() !== '') {
 
809
  enterChatView(currentTable, false);
810
  }
811
  });
812
 
813
+ // Prevent body scroll bounce
814
  document.addEventListener('touchmove', function(e) {
815
  if (!e.target.closest('.scroll-area')) {
816
  e.preventDefault();
 
834
  sel.classList.add('view-visible');
835
  }
836
 
 
837
  window.scrollTo(0, 0);
838
  const tablesScroll = sel.querySelector('.scroll-area');
839
  if (tablesScroll) tablesScroll.scrollTop = 0;
840
  const chatScroll = document.getElementById('chatMessages');
841
  if (chatScroll && targetView === 'chat') {
 
842
  setTimeout(() => {
843
  chatScroll.scrollTop = chatScroll.scrollHeight;
844
  }, 100);
 
887
  }
888
  }
889
 
 
 
 
 
 
890
  function updateTableNumberDisplay(number) {
891
  document.getElementById('tableNumberDisplay').textContent = number;
892
  }
 
984
  } else if (data.type === 'error') {
985
  botBubble.textContent = '⚠️ ' + data.content;
986
  }
987
+ } catch (parseErr) { /* ignore */ }
988
  }
989
  }
990
  }
991
 
 
992
  botBubble.textContent = '';
993
  botBubble.innerHTML = marked.parse(fullText);
994
  const chatScroll = document.getElementById('chatMessages');
 
1031
  }
1032
  }
1033
 
 
1034
  function showDraftPanel(items) {
1035
  const panel = document.getElementById('draftOrderPanel');
1036
  const draftItems = document.getElementById('draftItems');
 
1051
  `;
1052
  });
1053
  panel.classList.remove('hidden');
 
1054
  }
1055
 
1056
  async function confirmOrder() {
 
1080
  }
1081
  }
1082
 
 
1083
  function appendChatMessage(role, content) {
1084
  const container = document.getElementById('chatMessages');
1085
  const bubbleId = 'bubble-' + Date.now() + '-' + Math.random().toString(36).substr(2, 5);
 
1120
  return String(text).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;');
1121
  }
1122
 
1123
+ // Handle mobile keyboard
1124
  const chatInput = document.getElementById('chatInput');
1125
  if (chatInput) {
1126
  chatInput.addEventListener('focus', () => {
 
1134
  });
1135
  }
1136
 
 
 
1137
  window.addEventListener('resize', () => {
1138
  setVh();
1139
  const chatScroll = document.getElementById('chatMessages');