
:root {
  --msg-nav-height: 112px;
}

body.messages-active {
  overflow: hidden;
}
body.messages-active footer,
body.messages-active .site-footer {
  display: none !important;
}

.messages-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - var(--msg-nav-height));
  min-height: 500px;
  background-color: var(--ff-white);
  border: none;
  overflow: hidden;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.conversations-list {
  background-color: var(--ff-white);
  padding: 20px 12px 20px 12px;
  overflow-y: auto;
  border-right: 1px solid var(--ff-gray-2);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.conv-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 5px;
  flex-shrink: 0;
}

.conv-list-header h3 {
  color: var(--ff-gray-5);
  text-transform: uppercase;
  font-size: 0.8em;
  margin: 0;
  letter-spacing: 0.5px;
  font-family: var(--ff-font-body);
  font-weight: 700;
}

.btn-new-conv {
  background: var(--ff-black);
  color: var(--ff-white);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 0.85em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}
.btn-new-conv:hover { background: var(--ff-gray-6); }

.pending-invites-banner {
  background: var(--ff-gray-1);
  border: 1px solid var(--ff-gray-2);
  border-left: 3px solid var(--ff-black);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pending-invites-banner:hover { background: var(--ff-gray-2); }
.pending-invites-icon { color: var(--ff-black); font-size: 1.05em; }
.pending-invites-text {
  font-size: 0.85em;
  color: var(--ff-black);
  font-weight: 600;
}

.conv-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

.conversation-item {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 3px;
  transition: background-color 0.2s;
}
.conversation-item:hover,
.conversation-item.active {
  background-color: var(--ff-gray-1);
}

.conv-avatar {
  position: relative;
  margin-right: 10px;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.conv-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.group-avatar-mix {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ff-gray-2);
  overflow: hidden;
  flex-shrink: 0;
}
.group-avatar-mix img {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--ff-white);
  object-fit: cover;
}
.group-avatar-mix.n1 img { width: 100%; height: 100%; top: 0; left: 0; border: 0; }
.group-avatar-mix.n2 img:nth-child(1) { width: 65%; height: 65%; top: 0; left: 0; }
.group-avatar-mix.n2 img:nth-child(2) { width: 65%; height: 65%; bottom: 0; right: 0; }
.group-avatar-mix.n3 img:nth-child(1) { width: 58%; height: 58%; top: 0; left: 50%; transform: translateX(-50%); }
.group-avatar-mix.n3 img:nth-child(2) { width: 58%; height: 58%; bottom: 0; left: 0; }
.group-avatar-mix.n3 img:nth-child(3) { width: 58%; height: 58%; bottom: 0; right: 0; }

.conv-avatar .online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--ff-gray-3);
  border: 2px solid var(--ff-white);
  border-radius: 50%;
}
.conv-avatar .online-indicator.online { background: var(--ff-success); }

.conv-details { flex: 1 1 auto; min-width: 0; }
.conv-name {
  font-weight: 600;
  color: var(--ff-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-last-message {
  font-size: 0.85em;
  color: var(--ff-gray-5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.conv-last-message.italic { font-style: italic; color: var(--ff-gray-4); }

.conv-meta { text-align: right; flex-shrink: 0; margin-left: 8px; }
.conv-timestamp { font-size: 0.75em; color: var(--ff-gray-5); }
.conv-unread {
  background-color: var(--ff-black);
  color: var(--ff-white);
  font-size: 0.72em;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 4px;
  display: inline-block;
  min-width: 18px;
  text-align: center;
}

.chat-window {
  display: flex;
  flex-direction: column;
  background-color: var(--ff-white);
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  background-color: var(--ff-white);
  padding: 12px 22px;
  border-bottom: 1px solid var(--ff-gray-2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  cursor: pointer;
}
.chat-header img,
.chat-header .group-avatar-mix {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.chat-header.empty { cursor: default; }
.chat-header-info { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.chat-header-info h3 {
  margin: 0;
  color: var(--ff-black);
  font-size: 1.1em;
  line-height: 1.2;
}
.chat-status {
  font-size: 0.78em;
  font-weight: normal;
  color: var(--ff-gray-5);
}
.chat-status-online { color: var(--ff-success); }

.chat-header-menu-btn {
  background: none;
  border: none;
  color: var(--ff-gray-5);
  font-size: 1em;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-header-menu-btn:hover { background: var(--ff-gray-1); color: var(--ff-black); }
.chat-header-dropdown { z-index: 30; }

.msg-blocked-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  border-top: 1px solid var(--ff-gray-2);
  background: var(--ff-gray-1);
  flex-shrink: 0;
}
.msg-blocked-banner-text { color: var(--ff-gray-5); font-size: 0.92em; }
.msg-blocked-banner-actions { display: flex; gap: 8px; }
.msg-blocked-banner-actions button {
  background: var(--ff-black);
  color: var(--ff-white);
  border: 1px solid var(--ff-black);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.85em;
  cursor: pointer;
}
.msg-blocked-banner-actions button#msg-blocked-report {
  background: transparent;
  color: var(--ff-black);
  border-color: var(--ff-gray-3);
}
.msg-blocked-banner-actions button:hover { opacity: 0.85; }

.message-bubble.blocked-masked { background: var(--ff-gray-1); color: var(--ff-gray-5); }
.blocked-mask-notice { display: inline-flex; align-items: center; gap: 10px; }
.blocked-reveal-btn {
  background: none;
  border: none;
  color: var(--ff-black);
  font-size: 0.85em;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.chat-back-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.4em;
  color: var(--ff-black);
  cursor: pointer;
  padding: 4px 10px;
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  background: var(--ff-gray-1);
}

.load-older {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}
.load-older-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--ff-gray-2);
  border-top-color: var(--ff-black);
  animation: load-older-spin 0.8s linear infinite;
}
@keyframes load-older-spin { to { transform: rotate(360deg); } }

.message-bubble {
  padding: 9px 13px 8px 13px;
  border-radius: 18px;
  max-width: 70%;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
}
.message-bubble.received {
  background-color: var(--ff-gray-2);
  color: var(--ff-black);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.message-bubble.sent {
  background-color: var(--ff-black);
  color: var(--ff-white);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.message-bubble.deleted {
  font-style: italic;
  color: var(--ff-gray-4);
  background: var(--ff-gray-1);
}

.msg-sender-name {
  font-size: 0.75em;
  font-weight: 600;
  color: var(--ff-gray-5);
  margin-bottom: 2px;
  display: block;
}
.message-bubble.sent .msg-sender-name { display: none; }

.msg-text { display: block; white-space: pre-wrap; }

.msg-status {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72em;
  vertical-align: bottom;
}
.status-sent { color: var(--ff-white-a60); }
.status-seen { color: var(--ff-info); }

.msg-reply-quote {
  border-left: 3px solid var(--ff-black);
  padding: 4px 8px;
  margin-bottom: 4px;
  font-size: 0.82em;
  background: var(--ff-black-a10);
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.message-bubble.sent .msg-reply-quote {
  background: var(--ff-white-a10);
  border-left-color: var(--ff-white);
}
.msg-reply-quote-author {
  font-weight: 700;
  display: block;
  font-size: 0.9em;
}
.msg-reply-quote-text { display: block; color: inherit; }

.system-message {
  align-self: center;
  background: var(--ff-black-a10);
  color: var(--ff-gray-5);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8em;
  font-style: italic;
  margin: 4px 0;
}

.msg-menu-btn {
  position: absolute;
  top: 50%;
  right: -22px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 4px 6px;
  font-size: 1.05em;
  line-height: 1;
  cursor: pointer;
  color: var(--ff-gray-5);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.msg-menu-btn:hover { color: var(--ff-black); }
.message-bubble.sent .msg-menu-btn { right: auto; left: -22px; }
.message-bubble:hover .msg-menu-btn { opacity: 1; }

@media (hover: none), (max-width: 768px) {
  .msg-menu-btn { opacity: 1; }
}

.msg-menu-dropdown {
  position: fixed;
  background: var(--ff-white);
  border: 1px solid var(--ff-gray-2);
  border-radius: 8px;
  box-shadow: 0 4px 14px var(--ff-black-a25);
  z-index: 10000;
  min-width: 180px;
  overflow: hidden;
}
.msg-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: var(--ff-white);
  color: var(--ff-black);
  text-align: left;
  font-size: 0.9em;
  cursor: pointer;
  font-family: var(--ff-font-body);
}
.msg-menu-dropdown button:hover { background: var(--ff-gray-1); }
.msg-menu-dropdown .danger { color: var(--ff-danger); }

.chat-input-wrap {
  position: relative;
  flex-shrink: 0;
  border-top: 1px solid var(--ff-gray-2);
  background: var(--ff-white);
}

.typing-bubble-inline {
  padding: 12px 16px !important;
  max-width: fit-content !important;
}
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--ff-gray-5);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.reply-preview-bar {
  background: var(--ff-gray-1);
  border-left: 3px solid var(--ff-black);
  padding: 8px 14px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85em;
}
.reply-preview-bar.visible { display: flex; }
.reply-preview-bar-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reply-preview-bar-cancel {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ff-gray-5);
  font-size: 1.1em;
}

.chat-input {
  padding: 14px 22px;
  background-color: var(--ff-white);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-input input {
  flex: 1 1 auto;
  background-color: var(--ff-gray-1);
  border: 1px solid var(--ff-gray-2);
  border-radius: 18px;
  padding: 11px 14px;
  color: var(--ff-black);
  font-size: 1em;
  box-sizing: border-box;
  font-family: var(--ff-font-body);
}
.chat-input input::placeholder { color: var(--ff-gray-5); }

.chat-input-send {
  background: var(--ff-black);
  color: var(--ff-white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s;
}
.chat-input-send:hover { background: var(--ff-gray-6); }
.chat-input-send:disabled { background: var(--ff-gray-3); cursor: not-allowed; }

.no-messages-text {
  text-align: center;
  color: var(--ff-gray-5);
  margin: auto;
}
.msg-loading {
  color: var(--ff-gray-5);
  text-align: center;
  padding: 20px;
}

.new-conv-modal-content {
  max-width: 520px !important;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.new-conv-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.new-conv-search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ff-gray-5);
  font-size: 0.9em;
  pointer-events: none;
}
.new-conv-search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--ff-white-a20);
  border-radius: 6px;
  font-size: 0.95em;
  font-family: var(--ff-font-body);
  background: var(--ff-black);
  color: var(--ff-white);
  box-sizing: border-box;
}
.new-conv-search-wrap input:focus {
  outline: none;
  border-color: var(--ff-white-a60);
}
.new-conv-search-wrap input::placeholder { color: var(--ff-gray-5); }

.new-conv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 0;
}
.new-conv-chips:empty { display: none; }
.new-conv-chip {
  background: var(--ff-white-a10);
  color: var(--ff-white);
  border: 1px solid var(--ff-white-a20);
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 0.82em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.new-conv-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ff-white);
  font-weight: 700;
  padding: 0;
  line-height: 1;
}

.new-conv-results {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 360px;
  margin: 0 -8px;
}
.new-conv-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}
.new-conv-user:hover { background: var(--ff-white-a10); }
.new-conv-user.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.new-conv-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.new-conv-user-info { flex: 1 1 auto; min-width: 0; }
.new-conv-user-name {
  font-weight: 600;
  color: var(--ff-white);
  font-size: 0.92em;
}
.new-conv-user-meta {
  font-size: 0.78em;
  color: var(--ff-white-a60);
}
.new-conv-user-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--ff-white-a40);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  color: var(--ff-black);
  flex-shrink: 0;
  background: transparent;
}
.new-conv-user.selected .new-conv-user-check {
  background: var(--ff-white);
  border-color: var(--ff-white);
}

.new-conv-group-name-wrap {
  margin-top: 12px;
  display: none;
}
.new-conv-group-name-wrap.visible { display: block; }
.new-conv-group-name-wrap input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ff-white-a20);
  border-radius: 6px;
  background: var(--ff-black);
  color: var(--ff-white);
  font-family: var(--ff-font-body);
  font-size: 0.95em;
  box-sizing: border-box;
}

.modal-btn-create {
  background-color: var(--ff-white);
  color: var(--ff-black);
  border: 1px solid var(--ff-white);
}
.modal-btn-create:hover {
  background-color: var(--ff-gray-1);
  border-color: var(--ff-gray-1);
}
.modal-btn-create:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#msg-rename-modal input[type="text"] {
  background: var(--ff-black);
  color: var(--ff-white);
  border: 1px solid var(--ff-white-a20);
  border-radius: 4px;
  padding: 10px;
  width: 100%;
  font-family: var(--ff-font-body);
  font-size: 0.95em;
  box-sizing: border-box;
}

.group-info-page {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  background: var(--ff-white);
  padding: 20px 22px;
}
.group-info-page.visible { display: flex; }
.group-info-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--ff-gray-2);
}
.group-info-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  cursor: pointer;
}
.group-info-avatar img { width: 100%; height: 100%; object-fit: cover; }
.group-info-avatar .group-avatar-mix { width: 100%; height: 100%; }
.group-info-avatar-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ff-black-a50);
  color: var(--ff-white);
  text-align: center;
  font-size: 0.75em;
  padding: 4px 0;
  display: none;
}
.group-info-avatar:hover .group-info-avatar-edit { display: block; }
.group-info-name {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--ff-black);
  cursor: pointer;
}
.group-info-meta { color: var(--ff-gray-5); font-size: 0.85em; margin-top: 4px; }
.group-info-back {
  align-self: flex-start;
  background: none;
  border: none;
  font-size: 0.95em;
  color: var(--ff-black);
  cursor: pointer;
  padding: 0 0 10px 0;
  font-weight: 600;
}
.group-info-back:hover { text-decoration: underline; }
.group-info-section { padding: 16px 0; border-bottom: 1px solid var(--ff-gray-1); }
.group-info-section h4 {
  color: var(--ff-gray-5);
  text-transform: uppercase;
  font-size: 0.78em;
  margin: 0 0 10px 0;
  font-family: var(--ff-font-body);
  font-weight: 700;
}
.group-info-policy select {
  width: 100%;
  border: 1px solid var(--ff-gray-2);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.9em;
  font-family: var(--ff-font-body);
}
.group-info-members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.group-info-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.group-info-member img { width: 40px; height: 40px; border-radius: 50%; }
.group-info-member-name { flex: 1 1 auto; color: var(--ff-black); font-weight: 600; }
.group-info-member-role {
  font-size: 0.75em;
  color: var(--ff-gray-5);
  margin-right: 8px;
  text-transform: uppercase;
  font-weight: 700;
}
.group-info-member-role.owner { color: var(--ff-black); }
.group-info-member-role.admin { color: var(--ff-black); }
.group-info-member-actions button {
  background: none;
  border: 1px solid var(--ff-gray-2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78em;
  cursor: pointer;
  margin-left: 4px;
  font-family: var(--ff-font-body);
}
.group-info-member-actions button:hover { background: var(--ff-gray-1); }
.group-info-member-actions .danger {
  color: var(--ff-danger);
  border-color: var(--ff-danger);
}
.group-info-member-actions .primary {
  color: var(--ff-white);
  background: var(--ff-black);
  border-color: var(--ff-black);
}
.group-info-member-actions .primary:hover { background: var(--ff-gray-6); }
.group-info-member-role.pending {
  color: var(--ff-warning);
  font-style: italic;
}
.group-info-actions {
  padding: 16px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.group-info-actions button {
  flex: 1 1 auto;
  background: var(--ff-gray-1);
  color: var(--ff-black);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--ff-font-body);
}
.group-info-actions button:hover { background: var(--ff-gray-2); }
.group-info-actions button.primary { background: var(--ff-black); color: var(--ff-white); }
.group-info-actions button.primary:hover { background: var(--ff-gray-6); }
.group-info-actions button.danger { background: var(--ff-danger-bg); color: var(--ff-danger); }

.invite-preview-page {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  background: var(--ff-white);
}
.invite-preview-page.visible { display: flex; }
.invite-preview-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--ff-gray-2);
}
.invite-preview-header h3 { margin: 0 0 6px 0; color: var(--ff-black); }
.invite-preview-header p { color: var(--ff-gray-5); margin: 0; font-size: 0.9em; }
.invite-preview-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invite-preview-actions {
  padding: 16px 20px;
  border-top: 1px solid var(--ff-gray-2);
  display: flex;
  gap: 10px;
}
.invite-preview-actions button {
  flex: 1 1 auto;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95em;
  font-family: var(--ff-font-body);
}
.invite-preview-actions .accept { background: var(--ff-black); color: var(--ff-white); }
.invite-preview-actions .accept:hover { background: var(--ff-gray-6); }
.invite-preview-actions .decline { background: var(--ff-gray-1); color: var(--ff-black); }
.invite-preview-actions .decline:hover { background: var(--ff-gray-2); }

@media (max-width: 768px) {
  .messages-layout {
    grid-template-columns: 1fr;
    width: 100%;
    left: 0;
    transform: none;
  }
  .messages-layout[data-view="list"] .chat-window { display: none; }
  .messages-layout[data-view="chat"] .conversations-list { display: none; }
  .messages-layout[data-view="chat"] .chat-back-btn { display: inline-block; }

  .msg-menu-btn { right: -18px; }
  .message-bubble.sent .msg-menu-btn { left: -18px; }
}
