@import "https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap"; :root { --background-primary: #ffffff; --background-secondary: #f5f7fb; --background-tertiary: #e6ebf5; --background-accent: #e6ebf5; --text-normal: #2e3338; --text-muted: #747f8d; --interactive-normal: #4f5660; --interactive-hover: #2e3338; --interactive-active: #060607; --brand: #5865f2; --brand-hover: #4752c4; --online: #3ba55c; --offline: #747f8d; --unread: #f04747; --group-chat: #9147ff; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: "Poppins", sans-serif; background-color: var(--background-primary); color: var(--text-normal); height: 100vh; display: flex; overflow: hidden; width: 100vw; /* Ensure body takes full viewport width */ max-width: 100vw; /* Prevent horizontal scrolling */ } #side { width: 320px; background-color: var(--background-secondary); display: flex; flex-direction: column; border-right: 1px solid var(--background-tertiary); } #chat { flex: 1; display: flex; flex-direction: column; background-color: var(--background-primary); overflow: hidden; /* Prevent any overflow from affecting layout */ max-width: calc(100vw - 320px); /* Account for sidebar width */ position: relative; /* Needed for absolute positioning of pickers */ } #users { flex: 1; overflow-y: auto; padding: 8px 0; } #messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; max-width: 100%; /* Ensure messages don't exceed container width */ width: 100%; /* Take full available width */ } #message-container { padding: 16px; display: flex; flex-direction: column; /* Changed to column for progress bar */ align-items: center; gap: 8px; max-width: 100%; box-sizing: border-box; position: relative; z-index: 2; background-color: var(--background-primary); } .friend-button { width: 100%; padding: 8px; margin: 0; border: none; border-radius: 4px; background: transparent; color: var(--text-normal); cursor: pointer; display: flex; align-items: center; gap: 12px; text-align: left; transition: background-color 0.2s ease; } .friend-button:hover { background-color: #e6ebf5ac; } .friend-button.active { background-color: #e6ebf5; } .profile-logo-container { position: relative; width: 32px; height: 32px; flex-shrink: 0; margin: 7px; } /* Dark mode overrides */ .dark-mode .friend-button:hover { background-color: #2c2f36ac; /* darker hover background */ } .dark-mode .friend-button.active { background-color: #2e2e2e; /* darker active background */; } .profile-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; } .group-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background-color: var(--group-chat); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; } .friend-text { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 2px; } .friend-name { font-family: "Poppins", sans-serif; font-weight: 500; /* or use 'bold' */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; } .last-message { font-size: 12px; font-family: "Poppins", sans-serif; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; } .status-dot { width: 10px; height: 10px; border-radius: 50%; position: absolute; bottom: 0; right: 0; border: 2px solid var(--background-secondary); } .status-dot.online { background-color: var(--online); } .status-dot.offline { background-color: var(--offline); } .unread-dot { background-color: var(--unread); color: white; font-size: 12px; font-weight: 600; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; margin-left: auto; } .message { max-width: 70%; margin-bottom: 16px; padding: 8px 16px; border-radius: 4px; word-wrap: break-word; /* Ensure long words break */ overflow-wrap: break-word; /* Alternative property for word breaking */ position: relative; width: fit-content; /* Make width fit content but respect max-width */ } .message.sender { background: linear-gradient(40deg, #933cd6 0%, #5b5fc7 100%); color: #ffffff; margin-left: auto; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; font-size: 15px; } .message.receiver { background-color: #f5f7fb; color: #333; margin-right: auto; font-size: 15px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; } .message-timestamp { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-align: right; } .sender-name { font-size: 12px; font-weight: bold; color: var(--text-normal); margin-bottom: 4px; } .day-separator { display: flex; align-items: center; margin: 16px 0; color: var(--text-muted); font-size: 12px; } .day-separator::before, .day-separator::after { content: ''; flex: 1; height: 1px; background-color: var(--background-tertiary); margin: 0 8px; } #typing-indicator { font-size: 12px; color: var(--text-muted); padding: 0 16px; height: 20px; } #message-input-container { position: relative; /* For file upload button */ display: flex; align-items: flex-end; /* Align buttons to bottom */ gap: 8px; width: 100%; } /* UPDATED: Styles for textarea */ #message { flex: 1; resize: none; overflow-y: hidden; /* Hide scrollbar initially */ padding: 10px 16px 10px 40px; /* FIXED: Added left padding */ border-radius: 8px; border: none; background-color: var(--background-secondary); color: var(--text-normal); font-family: 'Poppins', sans-serif; font-size: 14px; line-height: 1.5; min-height: 42px; /* Initial height */ max-height: 130px; /* Approx 5 lines of text */ transition: height 0.1s ease-out; } #message:focus { outline: none; } #message-input-container #gif-picker-btn, #message-input-container #emoji-picker-btn { background: none; border: none; color: var(--interactive-normal); font-size: 20px; cursor: pointer; padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s, color 0.2s; height: 42px; /* Match textarea min-height */ } #message-input-container button[onclick="sendMessage()"] { padding: 10px; width: 42px; height: 42px; background: linear-gradient(40deg, #933cd6 0%, #5b5fc7 100%); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 500; transition: all 0.2s ease; font-size: 16px; flex-shrink: 0; } #message-input-container button[onclick="sendMessage()"]:hover { background: linear-gradient(40deg, #5b5fc7 0%, #933cd6 100%); } #add-friend-btn { margin: 8px; background-color: var(--background-tertiary); color: var(--text-normal); } #add-friend-btn:hover { background-color: var(--background-accent); } #create-group-btn { margin: 8px; background-color: var(--group-chat); color: white; } #chat-header h2 { font-weight: 500; font-family: "Poppins", sans-serif; } #create-group-btn:hover { background-color: #7d2ae8; } #chat-header { padding: 12px 16px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 100; background-color: rgba(255, 255, 255, 0.15); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); margin: 8px; margin-bottom: 0px; } .dark-mode #chat-header { background-color: var(--background-tertiary); /* darker translucent */ } /* Scrollbar styling */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--background-tertiary); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--background-accent); } /* Preloader styles */ #preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--background-primary); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 1; transition: opacity 0.4s ease; /* match your intended speed */ } #preloader.fade-out { opacity: 0; } #preloader img { max-width: 160px; } .chat-link { color: #ffffff; text-decoration: none; } .chat-link:hover { text-decoration: underline; } /* Call related styles */ #call-controls { display: flex; gap: 10px; margin-left: auto; } .call-header-btn { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--interactive-normal); transition: all 0.2s ease; padding: 5px; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; } .call-header-btn:hover { color: var(--interactive-hover); background-color: var(--background-tertiary); } #chat-header-actions { display: flex; gap: 8px; margin-left: auto; } #call-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); z-index: 1000; display: none; flex-direction: column; align-items: center; justify-content: center; } #video-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; width: 90%; max-width: 1200px; } .video-container { position: relative; width: 45%; max-width: 500px; background-color: #000; border-radius: 8px; overflow: hidden; } .video-container video { width: 100%; height: auto; display: block; } .video-label { position: absolute; bottom: 10px; left: 10px; color: white; background-color: rgba(0, 0, 0, 0.5); padding: 5px 10px; border-radius: 4px; font-size: 14px; } #call-actions { margin-top: 20px; display: flex; gap: 15px; } .call-action-btn { width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; } #end-call-btn { background-color: #f04747; color: white; } #mute-btn, #video-off-btn { background-color: var(--background-tertiary); color: var(--text-normal); } #mute-btn.active, #video-off-btn.active { background-color: var(--brand); color: white; } #call-info { color: white; margin-bottom: 20px; text-align: center; } #call-timer { font-size: 24px; font-weight: bold; } #call-status { font-size: 16px; margin-top: 5px; } .ringing-animation { animation: pulse 1.5s infinite; } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } /* Incoming call modal */ #incoming-call-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 20px; border-radius: 8px; z-index: 1001; text-align: center; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); display: none; } #incoming-call-modal h3 { margin-bottom: 15px; } #incoming-call-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; } #accept-call-btn { background-color: #3ba55c; color: white; } #reject-call-btn { background-color: #f04747; color: white; } /* Image message styles */ .message-image { max-width: 100%; max-height: 300px; border-radius: 8px; margin-top: 8px; cursor: pointer; transition: transform 0.2s; } .message-image:hover { transform: scale(1.02); } .image-preview-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 2000; cursor: pointer; } .image-preview { max-width: 90%; max-height: 90%; } /* Video message styles */ .message-video { max-width: 100%; max-height: 300px; border-radius: 8px; margin-top: 8px; cursor: pointer; background-color: #000; position: relative; } .video-thumbnail { width: 100%; height: auto; border-radius: 8px; } .video-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 48px; opacity: 0.8; text-shadow: 0 0 8px rgba(0, 0, 0, 0.5); } /* Video preview modal */ .video-preview-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 2000; } .video-preview { max-width: 90%; max-height: 90%; } .video-preview video { max-width: 100%; max-height: 80vh; } .close-preview { position: absolute; top: 20px; right: 20px; color: white; font-size: 24px; cursor: pointer; } /* File upload button */ #file-upload { display: none; } /* FIXED: File upload button positioning */ #file-upload-btn { position: absolute; left: 8px; bottom: 6px; /* Aligns to the bottom of the container */ padding: 8px; border-radius: 8px; color: var(--text-normal); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1; } /* Upload progress */ .upload-progress { width: 100%; height: 4px; background-color: var(--background-tertiary); border-radius: 2px; margin-top: 8px; overflow: hidden; display: none; } .upload-progress-bar { height: 100%; background-color: var(--brand); width: 0%; transition: width 0.3s ease; } /* File type indicator */ .file-type-indicator { font-size: 12px; color: var(--text-muted); margin-top: 4px; } /* User profile section */ #user-profile { border-top: 1px solid var(--background-tertiary); display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: sticky; top: 0; z-index: 100; background-color: rgba(255, 255, 255, 0.15); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); margin: 8px; margin-bottom: 10px; } .dark-mode #user-profile { background-color: var(--background-tertiary) !important; } #user-profile-container { position: relative; width: 40px; height: 40px; } #user-profile-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; cursor: pointer; } #user-profile-name { font-weight: 500; font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #profile-photo-upload { display: none; } .profile-photo-menu { position: absolute; bottom: 100%; left: 0; background-color: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); padding: 8px 0; z-index: 100; display: none; min-width: 160px; } .profile-photo-menu-item { padding: 8px 16px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px; } .profile-photo-menu-item:hover { background-color: var(--background-secondary); } #user-profile-container:hover .profile-photo-menu { display: block; } /* Settings Menu Styles */ .settings-menu { position: absolute; bottom: 110%; left: 0px; padding: 12px; z-index: 100; display: none; max-height: 80vh; overflow-y: auto; border: 1px solid var(--background-tertiary); background-color: var(--background-primary); /* Ensure background is set for dark mode */ color: var(--text-normal); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } .settings-close-btn { position: absolute; top: 8px; right: 8px; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; } .settings-close-btn:hover { background-color: var(--background-accent); } .settings-tabs { display: flex; border-bottom: 1px solid var(--background-tertiary); margin-bottom: 12px; padding-bottom: 8px; } .settings-tab { padding: 8px 16px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-muted); border-radius: 4px; } .settings-tab.active { color: var(--text-normal); background-color: var(--background-accent); } .settings-section { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--background-tertiary); } .settings-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .settings-section-title { font-weight: 500; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; } .settings-item { margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; } .settings-item label { font-size: 13px; color: var(--text-muted); } .settings-item input { padding: 8px 12px; background-color: var(--background-secondary); /* Use secondary background for inputs */ border: 1px solid var(--background-tertiary); border-radius: 4px; font-size: 14px; color: var(--text-normal); } .settings-item button { padding: 8px 12px; font-size: 13px; background-color: var(--brand); color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 4px; } .toggle-item { display: flex; align-items: center; justify-content: space-between; } /* Switch toggle */ .switch { position: relative; display: inline-block; width: 50px; height: 24px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--background-tertiary); transition: .4s; border-radius: 24px; } .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .slider { background-color: var(--brand); } input:checked + .slider:before { transform: translateX(26px); } /* Friends List Styles */ .friends-list { max-height: 300px; overflow-y: auto; } .friend-item { display: flex; align-items: center; justify-content: space-between; padding: 8px; border-radius: 4px; margin-bottom: 4px; } .friend-item:hover { background-color: var(--background-accent); } .friend-info { display: flex; align-items: center; gap: 8px; } .friend-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; } .friend-name { font-size: 14px; } .unfriend-btn { background-color: var(--unread); color: white; border: none; border-radius: 4px; padding: 4px 8px; font-size: 12px; cursor: pointer; } .unfriend-btn:hover { background-color: #d63a3a; } /* Dark Mode Variables */ .dark-mode { --background-primary: #181818; --background-secondary: #181818; --background-tertiary: #202225; --background-accent: #4f545c; --text-normal: #dcddde; --text-muted: #a3a6aa; --interactive-normal: #b9bbbe; --interactive-hover: #dcddde; --interactive-active: #ffffff; --brand: #5865f2; --brand-hover: #4752c4; --online: #3ba55c; --offline: #747f8d; --unread: #f04747; --group-chat: #7d2ae8; } .dark-mode .message.receiver { background-color: var(--background-tertiary); color: rgb(239, 239, 239); } .dark-mode #message { background-color: var(--background-tertiary) !important; color: white !important; } /* Group chat modal styles */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1002; justify-content: center; align-items: center; } .modal-content { background-color: var(--background-primary); padding: 20px; border-radius: 8px; width: 90%; max-width: 500px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .modal-title { font-size: 18px; font-weight: 600; } .close-modal { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); transition: all 0.2s ease; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; } .close-modal:hover { background-color: var(--background-accent); /* Use background accent for hover */ color: var(--text-normal); } .modal-body { margin-bottom: 20px; } .modal-footer { display: flex; justify-content: flex-end; gap: 10px; } .modal-footer button { font-family: "Poppins", sans-serif; font-weight: 500; /* You can adjust this if needed */ } .form-group { margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; font-weight: 500; } .form-control { width: 100%; padding: 10px; border: 1px solid var(--background-tertiary); border-radius: 4px; background-color: var(--background-secondary); color: var(--text-normal); } .form-control:focus { outline: none; border-color: var(--brand); } .checkbox-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--background-tertiary); border-radius: 4px; padding: 10px; } .checkbox-item { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--background-tertiary); } .checkbox-item:last-child { border-bottom: none; } .checkbox-item input { margin-right: 10px; } .group-info { display: flex; align-items: center; margin-bottom: 15px; } .group-avatar { width: 50px; height: 50px; border-radius: 50%; background-color: var(--group-chat); color: white; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold; margin-right: 15px; cursor: pointer; } .group-avatar-input { display: none; } .group-name-input { flex: 1; } /* Group info styles */ .group-members { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; } .group-member { display: flex; align-items: center; background-color: var(--background-secondary); padding: 5px 10px; border-radius: 20px; font-size: 12px; } .group-member-avatar { width: 20px; height: 20px; border-radius: 50%; margin-right: 5px; object-fit: cover; } /* Group management modal */ .group-management { display: flex; flex-direction: column; gap: 15px; } .group-management-actions { display: flex; gap: 10px; } .group-management-btn { padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; border: none; } .group-management-btn.leave { background-color: #f04747; color: white; } .group-management-btn.add { background-color: var(--brand); color: white; } .group-management-btn.edit { background-color: var(--background-tertiary); color: var(--text-normal); } #search-container { position: relative; padding: 1px; } #search-container i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; border-bottom: 1px solid var(--background-tertiary); } #chat-search { width: 94%; padding: 8px 8px 8px 32px; background-color: var(--background-tertiary); border: none; border-radius: 5px; color: var(--text-normal); font-size: 13px; margin: 10px; font-family: "Poppins", sans-serif; } /* Remove the existing button styles and replace with these: */ #button-container { display: flex; gap: 8px; padding: 8px; border-bottom: 1px solid var(--background-tertiary); } #add-friend-btn, #create-group-btn { flex: 1; padding: 10px 12px; border: none; border-radius: 8px; cursor: pointer; font-family: "Poppins", sans-serif; font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease; height: 40px; } #add-friend-btn:hover { background-color: var(--background-accent); } #create-group-btn { background-color: var(--group-chat); color: white; } #create-group-btn:hover { background-color: #7d2ae8; } /* Add this to your CSS */ #user-profile-container { position: relative; transition: all 0.3s ease; } #user-profile-container.extended { height: 400px; /* Adjust as needed */ width: 600px; /* Adjust as needed */ border-radius: 8px; z-index: 1000; padding: 16px; display: flex; flex-direction: column; align-items: center; } #user-profile-container.extended #user-profile-photo { width: 80px; height: 80px; margin-bottom: 16px; } .settings-content-container { width: 100%; overflow-y: auto; flex-grow: 1; display: none; } #user-profile-container.extended .settings-content-container { display: block; } #user-profile-container.extended .profile-photo-menu { display: none; } .message.sender .message-timestamp { color: #ffffff; /* white */ } /* Add this to your CSS */ #typing-indicator.group { font-style: italic; color: #666; } /* Link Preview Styles */ .link-preview-container { margin-top: 8px; width: 100%; max-width: 400px; } .link-preview { border-radius: 8px; overflow: hidden; margin-bottom: 8px; background-color: transparent; /* Transparent background */ } .link-preview-image { width: 100%; max-height: 200px; object-fit: cover; } .link-preview-content { padding: 12px; } /* Light mode styles (default) */ .link-preview-title { font-weight: 500; color: black; text-decoration: none; display: block; margin-bottom: 6px; } .link-preview-description { font-size: 14px; color: black; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .link-preview-domain { font-size: 12px; color: black; } .link-preview-loading { padding: 12px; font-size: 14px; color: black; font-style: italic; } /* Dark mode adjustments */ .dark-mode .link-preview { border-color: var(--background-accent); background-color: transparent; /* Transparent for dark mode too */ } .dark-mode .link-preview-title, .dark-mode .link-preview-description, .dark-mode .link-preview-domain, .dark-mode .link-preview-loading { color: white; } .message.sender .link-preview-title, .message.sender .link-preview-description, .message.sender .link-preview-domain, .message.sender .link-preview-loading { color: white !important; } a.link-preview-wrapper, a.link-preview-wrapper:hover, a.link-preview-wrapper:focus, a.link-preview-wrapper:active { text-decoration: none !important; } .message.emoji-only { background: transparent !important; font-size: 48px; padding: 0; margin-bottom: 16px; line-height: 1.2; max-width: none; text-align: center; box-shadow: none; } .emoji-only { font-size: 48px; line-height: 1; padding: 0; margin: 0; } .message-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: right; /* or left depending on message alignment */ } .sender-container { display: flex; flex-direction: column; align-items: flex-end; } .receiver-container { display: flex; flex-direction: column; align-items: flex-start; } .emoji-timestamp-wrapper { display: flex; flex-direction: column; /* stack emoji and timestamp vertically */ align-items: flex-start; /* align left */ } .message-sender-name { font-size: 13px; /* Sets the font size. Adjust as needed. */ margin-bottom: 2px; /* Adds a small margin below the name */ display: block; /* Ensures the name takes its own line, pushing the message content below it */ color: var(--text-normal); /* Ensures the text color is consistent with your theme */ } /* To ensure it works well in dark mode, if applicable */ .dark-mode .message-sender-name { color: white; /* Or your dark mode text color variable */ } /* Styling for message containers that only contain a single emoji */ .message.emoji-only { display: flex; /* Make it a flex container */ flex-direction: column; /* Stack children (emoji and timestamp) vertically */ align-items: center; /* Center the emoji and timestamp horizontally */ padding: 0; /* Remove default padding if any, to give full control */ background: none; /* Remove background color bubble for large emojis */ box-shadow: none; /* Remove shadow for large emojis */ } /* Ensure the timestamp within an emoji message is centered and has proper spacing */ .message.emoji-only .message-timestamp { align-self: center; /* Center the timestamp within its parent (.message.emoji-only) */ margin-top: 5px; /* Add a little space between the emoji and timestamp */ font-size: 10px; /* Keep timestamp size small for subtlety */ color: var(--text-muted); /* Use a muted color for timestamps */ } /* Adjust the large emoji text itself */ .message.emoji-only > div:first-child { /* Targets the div containing the emoji text */ line-height: 1; /* Adjust line height to prevent extra space around the large emoji */ } #gif-picker { position: absolute; bottom: 85px; /* Position above the message input container */ right: 16px; width: 350px; height: 350px; background-color: var(--background-primary); border-radius: 12px; box-shadow: 0 8px 16px rgba(0,0,0,0.1), 0 3px 6px rgba(0,0,0,0.08); z-index: 101; display: none; /* Toggled with JS */ flex-direction: column; overflow: hidden; border: 1px solid var(--background-tertiary); } .dark-mode #gif-picker { background-color: #2f3136; border-color: #40444b; } #gif-search { width: 100%; padding: 12px; border: none; border-bottom: 1px solid var(--background-tertiary); background-color: var(--background-secondary); color: var(--text-normal); font-size: 14px; } #gif-search:focus { outline: none; border-bottom-color: var(--brand); } #gif-results { flex-grow: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 5px; } #gif-results img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; cursor: pointer; transition: opacity 0.2s ease; } #gif-results img:hover { opacity: 0.8; } .message-content-gif { max-width: 320px; border-radius: 8px; overflow: hidden; margin-top: 4px; } .message-content-gif img { width: 100%; display: block; border-radius: 8px; } /* Emoji Picker Styles */ #emoji-picker-container { position: absolute; bottom: 85px; /* Position above the message input container */ right: 16px; z-index: 101; display: none; /* Toggled with JS */ } emoji-picker { --border-radius: 12px; --outline-color: var(--brand); --background: var(--background-primary); --color-text: var(--text-normal); --color-text-secondary: var(--text-muted); --border-color: var(--background-tertiary); --search-border-color: var(--background-tertiary); --search-background: var(--background-secondary); box-shadow: 0 8px 16px rgba(0,0,0,0.1), 0 3px 6px rgba(0,0,0,0.08); border: 1px solid var(--border-color); } .dark-mode emoji-picker { --background: #2f3136; --color-text: #dcddde; --color-text-secondary: #a3a6aa; --border-color: #40444b; --search-border-color: #40444b; --search-background: var(--background-tertiary); } .unread-separator { display: flex; align-items: center; margin: 16px 0; color: var(--unread); font-size: 12px; font-weight: 600; } .unread-separator::before, .unread-separator::after { content: ''; flex: 1; height: 1px; background-color: var(--unread); margin: 0 8px; } .unread-separator span { background-color: var(--background-primary); padding: 0 8px; } .dark-mode .unread-separator span { background-color: var(--background-primary); } /* Style for the Cancel button in group creation modal */ #create-group-modal .modal-footer button:first-child { background-color: var(--background-tertiary); color: var(--text-normal); border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-family: "Poppins", sans-serif; font-weight: 500; transition: all 0.2s ease; } #create-group-modal .modal-footer button:first-child:hover { background-color: var(--background-accent); } /* Style for the Create button in group creation modal */ #create-group-modal .modal-footer button:last-child { background-color: var(--group-chat); color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-family: "Poppins", sans-serif; font-weight: 500; transition: all 0.2s ease; } #create-group-modal .modal-footer button:last-child:hover { background-color: #7d2ae8; /* Slightly darker purple */ } /* Style for Cancel button in "Add Members" modal */ #add-members-modal .modal-footer button:first-child { background-color: var(--background-tertiary); color: var(--text-normal); border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-family: "Poppins", sans-serif; font-weight: 500; transition: all 0.2s ease; } #add-members-modal .modal-footer button:first-child:hover { background-color: var(--background-accent); } /* Style for Add Members button in "Add Members" modal */ #add-members-modal .modal-footer button:last-child { background-color: var(--group-chat); color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-family: "Poppins", sans-serif; font-weight: 500; transition: all 0.2s ease; } #add-members-modal .modal-footer button:last-child:hover { background-color: #7d2ae8; /* Slightly darker purple */ } /* Style for Cancel button in Edit Group modal */ #edit-group-modal .modal-footer button:first-child { background-color: var(--background-tertiary); color: var(--text-normal); border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-family: "Poppins", sans-serif; font-weight: 500; transition: all 0.2s ease; } #edit-group-modal .modal-footer button:first-child:hover { background-color: var(--background-accent); } /* Style for Save Changes button in Edit Group modal */ #edit-group-modal .modal-footer button:last-child { background-color: var(--group-chat); color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-family: "Poppins", sans-serif; font-weight: 500; transition: all 0.2s ease; } #edit-group-modal .modal-footer button:last-child:hover { background-color: #7d2ae8; /* Slightly darker purple */ }