diff --git a/conversations.php b/conversations.php index 5984e77..9e1f612 100644 --- a/conversations.php +++ b/conversations.php @@ -556,20 +556,59 @@ } @media (max-width: 768px) { + /* Fullscreen sidebar that can slide in/out */ + .chat-container { padding: 0; gap: 0; } .chat-sidebar { width: 100%; - position: absolute; - z-index: 1000; + position: fixed; + top: 0; + left: 0; + z-index: 1100; height: 100vh; + transform: translateX(0); + transition: transform 240ms ease; + box-shadow: none; } - + + /* Hidden by default on mobile. .open will show it */ + .chat-sidebar.mobile-hidden { transform: translateX(-110%); } + .chat-main { width: 100%; + margin-left: 0; + display: flex; + flex-direction: column; + height: 100vh; } - - .chat-sidebar.show-chat { - transform: translateX(-100%); + + /* Header adjustment */ + .chat-header { padding: 10px 12px; gap: 8px; } + .chat-header-avatar { width: 38px; height: 38px; } + + /* Fix input to bottom to emulate mobile chat apps */ + .chat-input { + position: fixed; + left: 0; + right: 0; + bottom: 0; + padding: 10px; + background: #fff; + z-index: 1200; + border-top: 1px solid #e9eef2; } + + /* Give chat area bottom padding so messages are not hidden under input */ + .chat-conversations { padding-bottom: 120px; } + + /* Compact avatars and message bubble width */ + .conversation-avatar { width: 40px; height: 40px; } + .message-bubble { max-width: 85%; font-size: 15px; } + + /* Quick replies panel adapt */ + .quick-replies-panel { left: 8px; right: 8px; bottom: 70px; max-height: 160px; } + + /* Show a small back button in header to open sidebar */ + #sidebar-toggle { display: inline-flex; } } .reply-preview { @@ -652,6 +691,7 @@