/* ===================================================
   CLASS MASTER PRO - REAL-TIME GLOBAL CHAT & MESSENGER
   Phòng Trao Đổi Giáo Viên & Chat Trực Tuyến 1-1
   =================================================== */

/* Nút mở chat trong thanh floating / header */
.btn-floating-chat {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.38rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, #0084ff 0%, #0099ff 100%);
  color: #ffffff !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 132, 255, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn-floating-chat:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 132, 255, 0.5);
  filter: brightness(1.06);
}

.btn-floating-chat.chat-open {
  background: #0073e6;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Nút chat nổi góc dưới bên phải (Standalone Floating Trigger) */
.chat-floating-fixed-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #0084ff 0%, #00c6ff 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 132, 255, 0.45), 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: inherit;
}

.chat-floating-fixed-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(0, 132, 255, 0.55), 0 4px 10px rgba(0, 0, 0, 0.2);
  filter: brightness(1.08);
}

.chat-floating-fixed-btn.chat-open {
  background: #0073e6;
  transform: scale(0.98);
}

.chat-online-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

.chat-unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #e41e3f;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(228, 30, 63, 0.5);
  border: 2px solid #ffffff;
  animation: bounce-badge 1s ease infinite alternate;
}

@keyframes bounce-badge {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

/* KHUNG CHAT CHUẨN FACEBOOK MESSENGER (2 CỘT: KHUNG CHAT TRÁI, DANH SÁCH GIÁO VIÊN PHẢI) */
.chat-widget-card {
  position: fixed;
  bottom: 74px;
  right: 22px;
  width: 680px;
  max-width: calc(100vw - 28px);
  height: 520px;
  max-height: calc(100vh - 96px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 18px;
  box-shadow: 0 16px 36px 0 rgba(0, 0, 0, 0.22), 0 3px 8px 0 rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: row;
  z-index: 99999;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.chat-widget-card.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
  z-index: 999999 !important;
}

/* Khung trò chuyện chính (Left / Center Pane) */
.chat-main-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background: #ffffff;
}

/* Danh sách giáo viên bên phải (Right Sidebar Panel) */
.chat-sidebar-pane {
  width: 255px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f8fafc;
  border-left: 1px solid #eef2f6;
  position: relative;
}

.chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #f0f2f5;
  flex-shrink: 0;
}

.chat-sidebar-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.chat-sidebar-dot {
  width: 8px;
  height: 8px;
  background: #31a24c;
  border-radius: 50%;
}

.chat-sidebar-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #050505;
  white-space: nowrap;
}

.chat-sidebar-badge {
  font-size: 10px;
  font-weight: 600;
  background: #e7f3ff;
  color: #0084ff;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.chat-sidebar-close-btn {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: #65676b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-sidebar-close-btn:hover {
  background: #e4e6eb;
  color: #050505;
}

.chat-sidebar-search-wrap {
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.chat-teacher-search-input {
  width: 100%;
  padding: 5px 9px;
  font-size: 11.5px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #ffffff;
  color: #1e293b;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-teacher-search-input:focus {
  border-color: #0084ff;
  box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.15);
}

.chat-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
}

.chat-sidebar-list::-webkit-scrollbar {
  width: 4px;
}

.chat-sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

.chat-sidebar-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  padding: 8px 6px 3px 6px;
  letter-spacing: 0.4px;
}

.chat-sidebar-toggle-btn {
  display: none;
}

/* Header chuẩn Facebook Messenger */
.chat-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid #f0f2f5;
  color: #050505;
  flex-shrink: 0;
}

.chat-header-main {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.chat-back-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0084ff;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.chat-back-btn:hover {
  background: #f0f2f5;
}

.chat-back-btn.hidden {
  display: none !important;
}

.chat-header-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.chat-header-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #0084ff, #00c6ff);
  overflow: hidden;
}

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

.chat-header-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background: #31a24c;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.25;
}

.chat-header-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #050505;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-status {
  font-size: 11.5px;
  color: #65676b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-tool-btn {
  background: transparent;
  border: none;
  color: #0084ff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.chat-tool-btn:hover {
  background: #f0f2f5;
}

/* Khung Popup / Dropdown danh sách giáo viên tương thích ngược */
.chat-online-dropdown {
  display: none !important;
}

.chat-online-bottom-bar {
  display: none !important;
}

/* Từng dòng giáo viên / phòng chung trong danh sách */
.chat-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
  gap: 6px;
}

.chat-user-item:hover {
  background: #edf2f7;
}

.chat-user-item.is-active {
  background: #e0f0ff;
}

.chat-user-item-main {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.chat-user-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.chat-user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.chat-user-avatar.global-icon {
  background: linear-gradient(135deg, #0084ff, #00c6ff);
  font-size: 15px;
}

.chat-user-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #31a24c;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.chat-user-dot.offline {
  background: #94a3b8;
}

.chat-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.chat-user-item.is-active .chat-user-name {
  font-weight: 700;
  color: #0070e0;
}

.chat-me-tag {
  font-size: 11px;
  color: #64748b;
  font-weight: 400;
}

.chat-user-unread {
  background: #e41e3f;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Dòng chảy tin nhắn chuẩn Facebook Messenger */
.chat-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  scroll-behavior: smooth;
}

.chat-messages-stream::-webkit-scrollbar {
  width: 5px;
}

.chat-messages-stream::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.14);
  border-radius: 3px;
}

/* Empty State */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  text-align: center;
  padding: 24px 16px;
  color: #65676b;
}

.chat-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.chat-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #050505;
  margin-bottom: 4px;
}

.chat-empty-hint {
  font-size: 12.5px;
  line-height: 1.4;
  margin: 0;
  max-width: 240px;
}

/* Bong bóng tin nhắn chuẩn Messenger */
.chat-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  animation: fadeInMsg 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tin nhắn của chính mình (Messenger Blue #0084ff) */
.chat-bubble-row.is-me {
  justify-content: flex-end;
}

.chat-bubble-row.is-me .chat-bubble-content {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-bubble-row.is-me .chat-bubble-text {
  background: #0084ff;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 18px 18px 4px 18px;
  font-size: 14px;
  line-height: 1.34;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-bubble-row.is-me .chat-bubble-meta {
  font-size: 11px;
  color: #8a8d91;
  margin-top: 2px;
  padding-right: 4px;
}

/* Tin nhắn của người khác (Messenger Soft Grey #e4e6eb) */
.chat-bubble-row.is-other {
  justify-content: flex-start;
}

.chat-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.chat-avatar-img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

.chat-bubble-row.is-other .chat-bubble-content {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.chat-sender-name {
  font-size: 11px;
  font-weight: 500;
  color: #65676b;
  margin-bottom: 2px;
  margin-left: 4px;
}

.chat-bubble-row.is-other .chat-bubble-text {
  background: #e4e6eb;
  color: #050505;
  padding: 8px 12px;
  border-radius: 18px 18px 18px 4px;
  font-size: 14px;
  line-height: 1.34;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-bubble-row.is-other .chat-bubble-meta {
  font-size: 11px;
  color: #8a8d91;
  margin-top: 2px;
  padding-left: 4px;
}

.chat-time {
  font-size: 11px;
}

/* Kiểu dáng tin nhắn đã thu hồi phong cách Messenger */
.chat-bubble-text.is-recalled {
  background: #f0f2f5 !important;
  color: #65676b !important;
  font-style: italic !important;
  border: 1px dashed #ccd0d5 !important;
  font-size: 13.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.chat-bubble-row.is-me .chat-bubble-text.is-recalled {
  border-radius: 18px 18px 4px 18px !important;
}

.chat-bubble-row.is-other .chat-bubble-text.is-recalled {
  border-radius: 18px 18px 18px 4px !important;
}

/* Nút hành động tương tác tin nhắn (Hover Action) */
.chat-bubble-row {
  position: relative;
}

.chat-msg-actions {
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  align-self: center;
  gap: 4px;
  pointer-events: none;
  flex-shrink: 0;
}

.chat-bubble-row:hover .chat-msg-actions {
  opacity: 1;
  pointer-events: auto;
}

.chat-msg-actions.actions-left {
  margin-right: 4px;
}

.chat-msg-actions.actions-right {
  margin-left: 4px;
}

.btn-msg-recall {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #e4e6eb;
  background: #ffffff;
  color: #65676b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  padding: 0;
}

.btn-msg-recall:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
  transform: scale(1.08);
}

/* THANH SOẠN THẢO CHUẨN FACEBOOK MESSENGER */
.chat-input-form {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px;
  background: #ffffff;
  border-top: 1px solid #f0f2f5;
  flex-shrink: 0;
}

.chat-input-pill {
  flex: 1;
  background: #f0f2f5;
  border-radius: 19px;
  padding: 6px 14px;
  display: flex;
  align-items: flex-end;
  min-height: 38px;
  box-sizing: border-box;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-radius 0.15s ease;
  border: 1px solid transparent;
}

.chat-input-pill:focus-within {
  background: #ffffff;
  border-color: #0084ff;
  box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.15);
}

.chat-message-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: #050505;
  resize: none;
  min-height: 22px;
  max-height: 140px;
  line-height: 1.42;
  box-sizing: border-box;
  padding: 1px 0;
  margin: 0;
  overflow-y: hidden;
  word-break: break-word;
}

.chat-message-input::placeholder {
  color: #8a8d91;
}

.btn-chat-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0084ff;
  transition: transform 0.12s ease, background 0.12s ease;
  flex-shrink: 0;
  padding: 0;
  margin-bottom: 2px;
}

.btn-chat-action:hover {
  background: rgba(0, 132, 255, 0.08);
  transform: scale(1.08);
}

.btn-chat-like {
  font-size: 20px;
  line-height: 1;
}

.btn-chat-send {
  color: #0084ff;
}

.hidden {
  display: none !important;
}

/* RESPONSIVE CHO THIẾT BỊ DI ĐỘNG */
@media (max-width: 640px) {
  .chat-widget-card {
    right: 8px;
    left: 8px;
    bottom: 60px;
    width: auto;
    max-width: none;
    height: 72vh;
    border-radius: 14px;
  }

  .chat-floating-fixed-btn {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

/* =========================================================================
   CHAT FILE ATTACHMENTS & PREVIEWS (R2 OBJECT STORAGE INTEGRATION)
   ========================================================================= */

.btn-chat-attach {
  color: #65676b;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
  padding: 4px;
}

.btn-chat-attach:hover {
  color: #0084ff;
  transform: scale(1.1);
}

.chat-attachment-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f2f5;
  border-top: 1px solid #e4e6eb;
  padding: 8px 12px;
  font-size: 13px;
  animation: fadeInAttachment 0.2s ease-out;
}

@keyframes fadeInAttachment {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  overflow: hidden;
}

.chat-preview-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.chat-preview-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.chat-widget-card.is-drag-over {
  border: 2px dashed #0084ff !important;
  box-shadow: 0 0 0 4px rgba(0, 132, 255, 0.2) !important;
}

.chat-preview-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-preview-name {
  font-weight: 600;
  color: #050505;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}

.chat-preview-size {
  font-size: 11px;
  color: #65676b;
}

.chat-preview-cancel {
  background: none;
  border: none;
  color: #8a8d91;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-preview-cancel:hover {
  background: #e4e6eb;
  color: #dc2626;
}

/* File Card in Message Bubble */
.chat-file-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.chat-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  min-width: 220px;
  max-width: 280px;
}

.is-me .chat-file-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}

.chat-file-card-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.chat-file-card-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.chat-file-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-file-card-size {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.chat-file-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-file-action {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-file-view {
  background: #e0f2fe;
  color: #0284c7;
}

.btn-file-view:hover {
  background: #bae6fd;
}

.btn-file-download {
  background: #f1f5f9;
  color: #475569;
}

.btn-file-download:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Image Attachment in Bubble (Facebook Messenger Style) */
.chat-attachment-img-wrap {
  margin-top: 6px;
  border-radius: 14px;
  overflow: hidden;
  max-width: 280px;
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  position: relative;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
  display: inline-block;
}

.chat-attachment-img-wrap:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.chat-attachment-img-wrap img {
  display: block;
  width: 100%;
  max-height: 260px;
  min-height: 60px;
  object-fit: cover;
  border-radius: 14px;
  transition: opacity 0.2s ease;
}

.chat-attachment-img-wrap::after {
  content: '🔍 Phóng to';
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.chat-attachment-img-wrap:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================================
   LIGHTBOX / FULLSCREEN IMAGE VIEWER (FACEBOOK MESSENGER STYLE)
   ========================================================================= */
.chat-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  animation: chatLightboxFadeIn 0.2s ease-out;
}

@keyframes chatLightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chat-lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.chat-lightbox-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
  color: #ffffff;
}

.chat-lightbox-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 140px);
}

.chat-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-lightbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}

.chat-lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.chat-lightbox-btn.chat-lightbox-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
}

.chat-lightbox-btn.chat-lightbox-close:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.9);
}

.chat-lightbox-body {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.chat-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  animation: chatLightboxZoom 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

@keyframes chatLightboxZoom {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Uploading Progress Indicator inside Chat Bubble */
.chat-bubble-row.is-uploading-temp {
  opacity: 0.88;
  position: relative;
}

.chat-upload-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chat-upload-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #00c6ff;
  border-radius: 50%;
  animation: chatUploadSpin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes chatUploadSpin {
  to { transform: rotate(360deg); }
}

.chat-upload-bar-wrap {
  flex: 1;
  min-width: 60px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
}

.chat-upload-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0084ff, #00c6ff);
  width: 0%;
  transition: width 0.12s ease-out;
  border-radius: 3px;
}

.chat-upload-percent {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chat-upload-failed {
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================================
   REPLY / QUOTE MESSAGE (FACEBOOK MESSENGER STYLE)
   ========================================================================= */

.btn-msg-reply {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #e4e6eb;
  background: #ffffff;
  color: #65676b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  padding: 0;
}

.btn-msg-reply:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
  transform: scale(1.08);
}

/* Reply Preview Bar above input */
.chat-reply-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 6px 12px;
  font-size: 12.5px;
  animation: fadeInReply 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 3px solid #0084ff;
}

@keyframes fadeInReply {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-reply-preview-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.chat-reply-icon {
  color: #0084ff;
  font-size: 15px;
  font-weight: bold;
  flex-shrink: 0;
}

.chat-reply-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.chat-reply-to-name {
  font-weight: 700;
  color: #0084ff;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-reply-snippet {
  color: #64748b;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-reply-cancel {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.chat-reply-cancel:hover {
  background: #f1f5f9;
  color: #ef4444;
}

/* =========================================================================
   REPLY HEADER & QUOTE BUBBLE (EXACT FACEBOOK MESSENGER STYLE)
   ========================================================================= */

/* Dòng tiêu đề: "↩ Bạn đã trả lời Thảo" / "↩ Thảo đã trả lời bạn" */
.chat-reply-header {
  font-size: 11.5px;
  font-weight: 500;
  color: #65676b;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.chat-reply-header span {
  font-size: 12px;
  color: #65676b;
}

.chat-reply-header strong {
  font-weight: 600;
  color: #050505;
}

.is-me .chat-reply-header {
  justify-content: flex-end;
  padding-right: 4px;
}

.is-other .chat-reply-header {
  justify-content: flex-start;
  padding-left: 4px;
}

/* Khung bọc bóng trích dẫn (Quote Wrapper) */
.chat-reply-quote {
  cursor: pointer;
  max-width: 100%;
  margin-bottom: 3px;
  display: flex;
  transition: transform 0.12s ease;
}

.is-me .chat-reply-quote {
  justify-content: flex-end;
}

.is-other .chat-reply-quote {
  justify-content: flex-start;
}

.chat-reply-quote:hover {
  transform: translateY(-1px);
}

.chat-reply-quote:active {
  transform: scale(0.98);
}

/* Bong bóng trích dẫn xám tròn chuẩn Facebook Messenger */
.chat-reply-quote-bubble {
  background: #f0f2f5;
  color: #65676b;
  font-size: 13px;
  line-height: 1.34;
  padding: 7px 12px;
  border-radius: 16px;
  word-break: break-word;
  max-width: 100%;
  transition: background-color 0.15s ease, color 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.chat-reply-quote:hover .chat-reply-quote-bubble {
  background: #e4e6eb;
  color: #050505;
}

.is-me .chat-reply-quote-bubble {
  border-radius: 16px 16px 4px 16px;
}

.is-other .chat-reply-quote-bubble {
  border-radius: 16px 16px 16px 4px;
}

.chat-reply-quote-bubble.is-recalled-quote {
  font-style: italic;
  color: #8a8d91;
}

/* Jump to message highlight pulse */
.chat-bubble-row.highlight-pulse {
  animation: messagePulseHighlight 1.5s ease-out;
}

@keyframes messagePulseHighlight {
  0% {
    background-color: rgba(0, 132, 255, 0.28);
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(0, 132, 255, 0.4);
  }
  50% {
    background-color: rgba(0, 132, 255, 0.15);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
    box-shadow: none;
  }
}

/* =========================================================================
   @MENTION DROPDOWN & HIGHLIGHT (FACEBOOK MESSENGER STYLE)
   ========================================================================= */

.chat-mention-tag {
  color: #0084ff;
  font-weight: 600;
  background: rgba(0, 132, 255, 0.1);
  padding: 1px 4px;
  border-radius: 4px;
  display: inline-block;
}

.is-me .chat-mention-tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.25);
  text-decoration: underline;
}

.chat-mention-dropdown {
  position: absolute;
  bottom: 60px;
  left: 12px;
  right: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  animation: fadeInMention 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInMention {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-mention-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-mention-item:hover,
.chat-mention-item.is-selected {
  background: #f1f5f9;
}

.chat-mention-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.chat-mention-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-mention-role {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #64748b;
  flex-shrink: 0;
}

.chat-mention-role.role-admin {
  background: #fee2e2;
  color: #dc2626;
}

.chat-mention-role.role-manager {
  background: #fef3c7;
  color: #d97706;
}

/* ===================================================
   FACEBOOK MESSENGER STYLE EMOJI PICKER & REACTIONS
   =================================================== */

/* Nút mở Emoji trên thanh chat */
.btn-chat-emoji {
  font-size: 20px;
  line-height: 1;
  color: #65676b;
  position: relative;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-chat-emoji:hover {
  transform: scale(1.18);
  color: #f59e0b;
}

.btn-chat-emoji.is-active {
  color: #0084ff;
  transform: scale(1.12);
}

/* Thumbs Up Like Button với hiệu ứng nảy */
.btn-chat-like {
  color: #0084ff;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-chat-like:hover {
  transform: scale(1.25) rotate(-8deg);
  filter: drop-shadow(0 2px 6px rgba(0, 132, 255, 0.4));
}

.btn-chat-like:active {
  transform: scale(0.92);
}

/* Khung Bảng Chọn Emoji Chuẩn Facebook Messenger (Emoji Picker Panel) */
.chat-emoji-picker {
  position: absolute;
  bottom: 56px;
  right: 12px;
  width: 320px;
  max-width: calc(100% - 24px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e4e6eb;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popInPicker 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@keyframes popInPicker {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-emoji-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px;
  border-bottom: 1px solid #f0f2f5;
  background: #fafbfc;
}

.chat-emoji-picker-title {
  font-size: 12px;
  font-weight: 700;
  color: #65676b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chat-emoji-picker-close {
  background: transparent;
  border: none;
  font-size: 14px;
  color: #8a8d91;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.chat-emoji-picker-close:hover {
  background: #e4e6eb;
  color: #050505;
}

/* Thanh phản ứng nhanh (Quick Reactions Bar) ở đầu Emoji Picker */
.chat-emoji-quick-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px;
  background: #f8fafc;
  border-bottom: 1px solid #f0f2f5;
}

.chat-quick-reaction-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
}

.chat-quick-reaction-btn:hover {
  transform: scale(1.35) translateY(-2px);
  background: #f0f2f5;
}

/* Tabs phân loại emoji */
.chat-emoji-tabs {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 4px 6px;
  border-bottom: 1px solid #f0f2f5;
  overflow-x: auto;
  gap: 4px;
}

.chat-emoji-tab {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 16px;
  padding: 6px 2px;
  border-radius: 8px;
  cursor: pointer;
  color: #65676b;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-emoji-tab:hover {
  background: #f0f2f5;
  color: #050505;
}

.chat-emoji-tab.active {
  background: #e7f3ff;
  color: #0084ff;
  font-weight: 700;
}

/* Lưới hiển thị danh sách Emoji */
.chat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px;
  max-height: 210px;
  overflow-y: auto;
}

.chat-emoji-grid::-webkit-scrollbar {
  width: 5px;
}
.chat-emoji-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.chat-emoji-item {
  background: transparent;
  border: none;
  font-size: 21px;
  line-height: 1;
  padding: 6px 0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background 0.12s ease;
}

.chat-emoji-item:hover {
  transform: scale(1.3);
  background: #f0f2f5;
  z-index: 2;
}

.chat-emoji-item:active {
  transform: scale(0.95);
}

/* ===================================================
   FLOATING MESSAGE REACTIONS DOCK (HOVER TRÊN TIN NHẮN)
   =================================================== */

.chat-reaction-dock {
  position: absolute;
  top: -38px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #e4e6eb;
  animation: reactionDockPop 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-bubble-row.is-me .chat-reaction-dock {
  right: 8px;
}

.chat-bubble-row.is-other .chat-reaction-dock {
  left: 36px;
}

@keyframes reactionDockPop {
  from { opacity: 0; transform: scale(0.8) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-dock-item {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 3px;
  border-radius: 50%;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-dock-item:hover {
  transform: scale(1.45) translateY(-6px);
}

.chat-dock-item:active {
  transform: scale(1.1);
}

/* Nút kích hoạt Reaction trên thanh hành động message */
.btn-msg-react,
.btn-msg-reply,
.btn-msg-recall {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #e4e6eb;
  background: #ffffff;
  color: #65676b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  padding: 0;
}

.btn-msg-react:hover {
  background: #fef3c7;
  color: #d97706;
  border-color: #fde68a;
  transform: scale(1.12);
}

.btn-msg-reply:hover {
  background: #eff6ff;
  color: #0084ff;
  border-color: #bfdbfe;
  transform: scale(1.12);
}

/* Huy hiệu hiển thị Reaction đính kèm dưới góc bóng chat */
.chat-bubble-content {
  position: relative;
}

.chat-bubble-reactions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ffffff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 1px 6px;
  margin-top: -6px;
  margin-bottom: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  z-index: 5;
  cursor: pointer;
  transition: transform 0.15s ease;
  user-select: none;
}

.chat-bubble-row.is-me .chat-bubble-reactions {
  align-self: flex-end;
  margin-right: 4px;
}

.chat-bubble-row.is-other .chat-bubble-reactions {
  align-self: flex-start;
  margin-left: 4px;
}

.chat-bubble-reactions:hover {
  transform: scale(1.08);
}

.chat-reaction-badge {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #050505;
  font-weight: 600;
  line-height: 1;
}

.chat-reaction-count {
  font-size: 11px;
  color: #65676b;
  font-weight: 700;
}

/* Hiển thị Big Emoji (1 đến 3 Emojis không có chữ) phong cách Messenger */
.chat-big-emoji {
  font-size: 2.6rem !important;
  line-height: 1.15 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 6px !important;
  animation: popBigEmoji 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popBigEmoji {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* Trạng thái gửi lạc quan (Optimistic) & Thử lại khi thất bại (Outbox Retry) */
.chat-bubble-row.is-sending .chat-bubble-content {
  opacity: 0.82;
}

.chat-bubble-row.is-failed .chat-bubble-content {
  border: 1px dashed rgba(239, 68, 68, 0.45);
  background: rgba(254, 242, 242, 0.6);
}

.chat-send-sending {
  color: #64748b !important;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.chat-send-failed {
  color: #ef4444 !important;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-retry-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.chat-retry-btn:hover {
  background: #fecaca;
  color: #991b1b;
  border-color: #f87171;
  transform: translateY(-0.5px);
}

/* ===================================================
   RESPONSIVE CHO MÀN HÌNH NHỎ (MOBILE & TABLET PORTRAIT)
   =================================================== */
@media (max-width: 680px) {
  .chat-widget-card {
    width: calc(100vw - 16px) !important;
    right: 8px !important;
    bottom: 68px !important;
    height: 80vh !important;
    max-height: 580px !important;
    flex-direction: row !important;
  }

  .chat-main-pane {
    min-width: 0 !important;
  }

  .chat-sidebar-pane {
    width: 205px !important;
    display: flex !important;
    position: relative !important;
    transform: none !important;
  }
}
