/* ========================================
   COMPLETE CHAT APP STYLES
   With Emoji Picker, Stickers, Status, Profile Modal
   ========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #f0f2f5;
  transition: background 0.3s, color 0.3s;
}

/* Dark Theme */
body.dark {
  background: #1a1a2e;
  color: #e0e0e0;
}

body.dark .chat-sidebar {
  background: #16213e;
}

body.dark .chat-main {
  background: #1a1a2e;
}

body.dark .chat-header {
  background: #16213e;
  border-bottom-color: #2d2d44;
}

body.dark .message-bubble {
  background: #2d2d44;
  color: #e0e0e0;
}

body.dark .my-message .message-bubble {
  background: #667eea;
  color: white;
}

body.dark .message-input-area {
  background: #16213e;
  border-top-color: #2d2d44;
}

body.dark .message-input {
  background: #2d2d44;
  border-color: #3d3d5c;
  color: white;
}

body.dark .file-preview {
  background: #2d2d44;
}

body.dark .context-menu {
  background: #2d2d44;
  color: white;
}

body.dark .context-menu-item:hover {
  background: #3d3d5c;
}

body.dark .emoji-picker, 
body.dark .emoji-modal-content,
body.dark .sticker-modal-content,
body.dark .profile-modal-content {
  background: #16213e;
  color: white;
}

body.dark .emoji-cat-btn {
  background: #2d2d44;
  color: white;
}

body.dark .emoji-cat-btn.active {
  background: #667eea;
}

body.dark .sticker-pack-btn {
  background: #2d2d44;
  color: white;
}

body.dark .sticker-pack-btn.active {
  background: #667eea;
}

/* Auth Page Styles */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

body.dark .auth-card {
  background: #16213e;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

body.dark .auth-header h1 {
  color: white;
}

.auth-header p {
  font-size: 14px;
  color: #666;
}

body.dark .auth-header p {
  color: #aaa;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 2px solid #eef2ff;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  color: #667eea;
  border-bottom: 2px solid #667eea;
  margin-bottom: -2px;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

body.dark .form-group label {
  color: #ccc;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

body.dark .form-group input {
  background: #2d2d44;
  border-color: #3d3d5c;
  color: white;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5a67d8;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid #e2e8f0;
  color: #475569;
}

.btn-outline:hover {
  border-color: #667eea;
  color: #667eea;
}

.btn-small {
  padding: 8px 16px;
  background: #667eea;
  border: none;
  border-radius: 20px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
}

.btn-link {
  background: none !important;
  color: #667eea !important;
  box-shadow: none !important;
  margin-top: 8px !important;
}

.btn-link:hover {
  text-decoration: underline;
  transform: none !important;
}

.auth-error {
  margin-top: 16px;
  padding: 12px;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 12px;
  font-size: 13px;
  text-align: center;
}

.auth-success {
  margin-top: 16px;
  padding: 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  font-size: 13px;
  text-align: center;
}

.auth-note {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 12px;
}

/* Chat Page Styles */
.chat-page {
  height: 100vh;
  overflow: hidden;
}

.chat-container {
  display: flex;
  height: 100vh;
  background: white;
}

/* Sidebar */
.chat-sidebar {
  width: 320px;
  background: #1a1a2e;
  color: white;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #2d2d44;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #2d2d44;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.user-avatar-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar:hover {
  opacity: 0.8;
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #1a1a2e;
  background-color: #10b981;
}

.online-dot.busy {
  background-color: #f59e0b;
}

.online-dot.away {
  background-color: #ef4444;
}

.status-ring {
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 3px solid #10b981;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.user-status-text {
  font-size: 11px;
  color: #888;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-status-label {
  font-size: 10px;
  color: #10b981;
  margin-top: 2px;
}

.header-buttons {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
  transition: all 0.2s;
  padding: 6px 8px;
  border-radius: 8px;
}

.icon-btn:hover {
  color: white;
  background: #2d2d44;
}

/* Chat Tabs */
.chat-tabs {
  display: flex;
  border-bottom: 1px solid #2d2d44;
}

.chat-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-tab.active {
  color: #667eea;
  border-bottom: 2px solid #667eea;
}

/* Global Search */
.global-search {
  padding: 12px;
  border-bottom: 1px solid #2d2d44;
}

.global-search input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: #2d2d44;
  color: white;
  font-family: inherit;
  font-size: 13px;
}

.global-search input::placeholder {
  color: #888;
}

/* Chat Panels */
.chat-panel {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel.active {
  display: flex;
}

.panel-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2d2d44;
}

.panel-header h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
}

.items-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* Items (Groups & Users) */
.item {
  padding: 12px;
  background: #2d2d44;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.item:hover {
  background: #3d3d5c;
}

.item.active {
  background: #667eea;
}

.item-avatar {
  width: 40px;
  height: 40px;
  background: #1a1a2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
}

.item-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.item-avatar .online-dot-small {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #2d2d44;
}

.item-content {
  flex: 1;
}

.item-name {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.item-status-text {
  font-size: 10px;
  color: #888;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-sub {
  font-size: 11px;
  color: #888;
}

.item-badge {
  background: #ef4444;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

/* Search Users */
.search-users {
  padding: 12px;
  border-bottom: 1px solid #2d2d44;
}

.search-users input {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #2d2d44;
  color: white;
  font-family: inherit;
}

.search-users input::placeholder {
  color: #888;
}

.join-section {
  padding: 16px;
  border-top: 1px solid #2d2d44;
  display: flex;
  gap: 10px;
}

.join-section input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #2d2d44;
  color: white;
  font-family: inherit;
}

.join-section input::placeholder {
  color: #888;
}

/* Main Chat Area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.chat-header {
  padding: 20px 24px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.chat-header-details {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-type-badge {
  font-size: 11px;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 20px;
  color: #475569;
}

.chat-status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

.chat-status-badge.online {
  background: #d1fae5;
  color: #065f46;
}

.chat-status-badge.busy {
  background: #fed7aa;
  color: #9a3412;
}

.chat-status-badge.away {
  background: #fee2e2;
  color: #991b1b;
}

.typing-indicator {
  font-size: 11px;
  color: #10b981;
  font-style: italic;
}

.chat-actions {
  display: flex;
  gap: 8px;
}

/* In-Chat Search Bar */
.in-chat-search {
  padding: 12px 20px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.in-chat-search input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 13px;
}

.close-search {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
}

/* Messages Area */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  margin-top: 60px;
  color: #888;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* Message Bubbles */
.message-wrapper {
  display: flex;
  max-width: 75%;
  position: relative;
}

.message-wrapper.my-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-bubble {
  background: white;
  padding: 10px 14px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  max-width: 100%;
  cursor: pointer;
  transition: background 0.1s;
}

.message-bubble:hover {
  background: #f1f5f9;
}

.my-message .message-bubble {
  background: #667eea;
  color: white;
}

.my-message .message-bubble:hover {
  background: #5a67d8;
}

/* Message Content */
.message-sender {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #667eea;
}

.my-message .message-sender {
  color: rgba(255,255,255,0.8);
}

.message-text {
  font-size: 14px;
  word-wrap: break-word;
}

/* Message Footer */
.message-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.message-time {
  font-size: 10px;
  color: #888;
}

.my-message .message-time {
  color: rgba(255,255,255,0.6);
}

.read-receipt {
  font-size: 10px;
  color: #888;
}

.read-receipt.delivered {
  color: #a0aec0;
}

.read-receipt.read {
  color: #10b981;
}

.my-message .read-receipt.read {
  color: #86efac;
}

/* Sticker Message */
.message-sticker {
  font-size: 48px;
  text-align: center;
  padding: 10px;
}

/* Message Attachments */
.message-attachment {
  margin-top: 8px;
}

.message-attachment a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
  text-decoration: none;
  font-size: 12px;
  color: inherit;
}

.message-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 12px;
  cursor: pointer;
}

/* Highlighted Search Result */
.message-bubble.highlighted {
  background: #fef3c7;
  animation: highlightFlash 1s ease;
}

@keyframes highlightFlash {
  0% { background: #fef3c7; }
  100% { background: white; }
}

.my-message .message-bubble.highlighted {
  background: #f59e0b;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 1000;
  min-width: 180px;
}

.context-menu-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
}

.context-menu-item:hover {
  background: #f1f5f9;
}

#deleteMessageBtn:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Message Input Area */
.message-input-area {
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 16px 24px;
}

.file-preview {
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.remove-file {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.emoji-btn, .sticker-btn, .attach-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #888;
  transition: all 0.2s;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-btn:hover, .sticker-btn:hover, .attach-btn:hover {
  color: #667eea;
  background: #f1f5f9;
}

.message-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 30px;
  font-size: 14px;
  font-family: inherit;
}

.message-input:focus {
  outline: none;
  border-color: #667eea;
}

.send-btn {
  background: #667eea;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.send-btn:hover {
  background: #5a67d8;
  transform: scale(1.05);
}

/* Emoji Picker Modal */
.emoji-modal-content {
  width: 500px;
  max-width: 95%;
  max-height: 80vh;
}

.emoji-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.emoji-cat-btn {
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  padding: 8px 12px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
}

.emoji-cat-btn.active {
  background: #667eea;
  color: white;
}

.emoji-search {
  padding: 10px;
}

.emoji-search input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 13px;
}

.emoji-list-full {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.emoji-item {
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.1s;
  width: 50px;
  text-align: center;
}

.emoji-item:hover {
  background: #f1f5f9;
}

body.dark .emoji-item:hover {
  background: #3d3d5c;
}

/* Sticker Picker Modal */
.sticker-modal-content {
  width: 550px;
  max-width: 95%;
  max-height: 80vh;
}

.sticker-packs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.sticker-pack-btn {
  background: #f1f5f9;
  border: none;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}

.sticker-pack-btn.active {
  background: #667eea;
  color: white;
}

.sticker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 15px;
  max-height: 400px;
  overflow-y: auto;
}

.sticker-item {
  font-size: 48px;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.2s;
  background: #f8fafc;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-item:hover {
  background: #e2e8f0;
  transform: scale(1.05);
}

body.dark .sticker-item {
  background: #2d2d44;
}

body.dark .sticker-item:hover {
  background: #3d3d5c;
}

/* Profile Modal */
.profile-modal-content {
  width: 400px;
  max-width: 90%;
}

.profile-avatar-container {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  margin: 0 auto;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-status-dot {
  position: absolute;
  bottom: 5px;
  right: calc(50% - 50px);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid white;
}

.profile-status-dot.online { background: #10b981; }
.profile-status-dot.busy { background: #f59e0b; }
.profile-status-dot.away { background: #ef4444; }

.profile-info {
  text-align: center;
}

.profile-info h3 {
  font-size: 20px;
  margin-bottom: 5px;
}

.profile-info p {
  font-size: 13px;
  color: #888;
  margin-bottom: 15px;
}

.profile-status-section, .profile-online-section {
  text-align: left;
  margin-top: 15px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
}

body.dark .profile-status-section,
body.dark .profile-online-section {
  background: #2d2d44;
}

.profile-status-section label,
.profile-online-section label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  display: block;
  margin-bottom: 5px;
}

.profile-status-edit {
  display: flex;
  align-items: center;
  gap: 10px;
}

#profileStatusText {
  flex: 1;
  font-size: 14px;
  word-break: break-word;
}

.online-status-display {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e2e8f0;
}

.modal-footer .btn {
  flex: 1;
  margin-top: 0;
}

/* Avatar Preview */
.avatar-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.current-avatar {
  width: 100px;
  height: 100px;
  background: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
}

.current-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 24px;
  width: 400px;
  max-width: 90%;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
}

.close-modal {
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

.modal-body {
  padding: 24px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #888;
}

.empty-users {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.empty-users .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .chat-sidebar.open {
    transform: translateX(0);
  }
  
  .chat-main {
    width: 100%;
  }
  
  .message-wrapper {
    max-width: 85%;
  }
  
  .mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-right: 10px;
  }
  
  .emoji-modal-content,
  .sticker-modal-content {
    width: 95%;
  }
  
  .sticker-item {
    font-size: 40px;
    width: 70px;
    height: 70px;
  }
}

/* Touch-friendly */
.message-bubble, .item, button, .emoji-item, .sticker-item {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.messages-area {
  -webkit-overflow-scrolling: touch;
}