.ergon-chat{
  display:grid;
  grid-template-columns:320px 1fr;
  height:calc(100vh - 110px);
  min-height:560px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  overflow:hidden;
}

.ergon-chat-sidebar{
  border-right:1px solid #e5e7eb;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.ergon-chat-sidebar-head{
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.ergon-chat-sidebar-head h2{
  margin:0;
  font-size:20px;
}

.ergon-chat-sidebar-head button{
  font-size:13px;
  padding:8px 10px;
}

.ergon-chat-search{
  margin:0 16px 14px;
  width:calc(100% - 32px);
  box-sizing:border-box;
}

.ergon-chat-list{
  overflow:auto;
  flex:1;
}

.ergon-chat-item{
  width:100%;
  border:0;
  border-top:1px solid #f1f5f9;
  background:#fff;
  padding:12px 14px;
  display:flex;
  gap:11px;
  text-align:left;
  cursor:pointer;
}

.ergon-chat-item:hover,
.ergon-chat-item.active{
  background:#f8fafc;
}

.ergon-chat-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  background:#e5e7eb;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  flex:0 0 auto;
}

.ergon-chat-item-body{
  min-width:0;
  flex:1;
}

.ergon-chat-item-top{
  display:flex;
  justify-content:space-between;
  gap:8px;
}

.ergon-chat-preview{
  margin-top:4px;
  font-size:13px;
  color:#64748b;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ergon-chat-badge{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
}

.ergon-chat-main{
  min-width:0;
  display:flex;
  flex-direction:column;
}

.ergon-chat-header{
  height:68px;
  padding:0 20px;
  border-bottom:1px solid #e5e7eb;
  display:flex;
  align-items:center;
}

.ergon-chat-sub{
  font-size:12px;
  color:#64748b;
  margin-top:3px;
}

.ergon-chat-messages{
  flex:1;
  overflow:auto;
  padding:20px;
  background:#f8fafc;
}

.ergon-message{
  margin-bottom:16px;
  max-width:70%;
}

.ergon-message-meta{
  font-size:12px;
  margin-bottom:4px;
  color:#64748b;
}

.ergon-message-bubble{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:10px 13px;
  line-height:1.4;
  word-break:break-word;
}

.ergon-message-time{
  font-size:10px;
  color:#94a3b8;
  margin-top:4px;
}

.ergon-chat-composer{
  border-top:1px solid #e5e7eb;
  padding:12px;
  display:flex;
  gap:10px;
}

.ergon-chat-composer input{
  flex:1;
}

.ergon-chat-empty,
.ergon-chat-placeholder,
.ergon-chat-error{
  padding:20px;
  color:#64748b;
}

@media(max-width:800px){
  .ergon-chat{
    grid-template-columns:1fr;
    height:auto;
    min-height:650px;
  }

  .ergon-chat-sidebar{
    border-right:0;
    border-bottom:1px solid #e5e7eb;
    max-height:280px;
  }

  .ergon-message{
    max-width:90%;
  }
}

.ergon-chat-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(15,23,42,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.ergon-chat-modal-card{
  width:min(480px,100%);
  max-height:75vh;
  background:#fff;
  border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.22);
  overflow:hidden;
}

.ergon-chat-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 20px;
  border-bottom:1px solid #e5e7eb;
}

.ergon-chat-modal-head h3{
  margin:0 0 3px;
}

.ergon-chat-modal-close{
  border:0;
  background:transparent;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:4px 8px;
}

.ergon-chat-user-list{
  max-height:55vh;
  overflow:auto;
}

.ergon-chat-user{
  width:100%;
  border:0;
  border-bottom:1px solid #f1f5f9;
  background:#fff;
  padding:13px 18px;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  cursor:pointer;
}

.ergon-chat-user:hover{
  background:#f8fafc;
}

.ergon-chat-user:disabled{
  opacity:.6;
  cursor:wait;
}
/* Chat text visibility fix */
.ergon-chat,
.ergon-chat *{
  color:#111827;
}

.ergon-chat-sub,
.ergon-chat-preview,
.ergon-message-meta,
.ergon-message-time,
.ergon-chat-empty,
.ergon-chat-placeholder{
  color:#64748b;
}

.ergon-chat-error{
  color:#b91c1c;
}

.ergon-chat-item,
.ergon-chat-user,
.ergon-chat-modal-card,
.ergon-chat-main,
.ergon-chat-sidebar{
  color:#111827;
}
.ergon-chat-sidebar-head button,
#ergonNewChat{
  color:#fff !important;
}
#ergonNewChat{
  color:#fff !important;
  background:#111827;
}
#ergonMessageForm button{
  color:#fff !important;
}
#ergonMessageForm button{
  color:#fff !important;
  background:#111827;
}

.ergon-message{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  margin-bottom:14px;
  max-width:72%;
}

.ergon-message.me{
  margin-left:auto;
  align-items:flex-end;
}

.ergon-message-bubble{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px 14px 14px 4px;
  padding:10px 13px;
  line-height:1.45;
}

.ergon-message.me .ergon-message-bubble{
  background:#111827;
  color:#fff;
  border-color:#111827;
  border-radius:14px 14px 4px 14px;
}

.ergon-message-time{
  margin-top:4px;
  font-size:10px;
  color:#94a3b8;
}

.ergon-message.me .ergon-message-time{
  text-align:right;
}

.ergon-message-meta{
  font-size:12px;
  margin:0 0 4px 3px;
  color:#64748b;
}
.ergon-reply-preview{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 14px;
  border-top:1px solid #e5e7eb;
  background:#f8fafc;
  font-size:12px;
}

.ergon-reply-preview.hidden{
  display:none;
}

.ergon-reply-preview strong{
  display:block;
  margin-bottom:2px;
}

.ergon-reply-preview button{
  border:0;
  background:transparent;
  font-size:22px;
  cursor:pointer;
}

.ergon-reply-quoted{
  margin-bottom:6px;
  padding:6px 9px;
  border-left:3px solid #94a3b8;
  background:rgba(148,163,184,.12);
  border-radius:6px;
  font-size:11px;
}

.ergon-reply-quoted strong{
  display:block;
  margin-bottom:2px;
}

.ergon-message{
  cursor:pointer;
}
.ergon-message-read{
  margin-top:2px;
  font-size:10px;
  color:#64748b;
  text-align:right;
}
.ergon-attach-btn{
  flex:0 0 auto;
  min-width:42px;
  font-size:20px;
  padding:7px 10px;
}

.ergon-attachment{
  margin-bottom:7px;
  cursor:pointer;
}

.ergon-attachment-file,
.ergon-attachment-image{
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 11px;
  border:1px solid #dbe2ea;
  border-radius:10px;
  background:rgba(255,255,255,.8);
}

.ergon-message.me .ergon-attachment-file,
.ergon-message.me .ergon-attachment-image{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.25);
}

.ergon-attachment-file span,
.ergon-attachment-image span{
  font-size:22px;
}

.ergon-attachment strong{
  font-size:12px;
}

.ergon-image-preview{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  max-width:320px;
  padding:6px;
}

.ergon-image-preview img{
  display:block;
  width:auto;
  max-width:100%;
  max-height:260px;
  object-fit:contain;
  border-radius:9px;
}

.ergon-image-loading{
  min-width:180px;
  min-height:100px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:#64748b;
}

.ergon-message.me .ergon-image-loading{
  color:#e5e7eb;
}

@media(max-width:800px){
  .ergon-image-preview{
    max-width:240px;
  }

  .ergon-image-preview img{
    max-height:220px;
  }
}
.ergon-voice-btn{
  flex:0 0 auto;
  min-width:42px;
  font-size:19px;
  padding:7px 10px;
}

.ergon-voice-btn.recording{
  animation:ergonVoicePulse 1s infinite;
}

@keyframes ergonVoicePulse{
  0%{transform:scale(1)}
  50%{transform:scale(1.08)}
  100%{transform:scale(1)}
}

.ergon-audio-message{
  min-width:260px;
  padding:6px;
}

.ergon-audio-message audio{
  width:100%;
  max-width:300px;
  display:block;
}

.ergon-audio-loading{
  font-size:12px;
  padding:8px;
}
/* Chat viewport fix */
.ergon-chat{
  height:calc(100vh - 120px);
  min-height:0;
  overflow:hidden;
}

.ergon-chat-main{
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

#ergonMessages{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  scroll-behavior:smooth;
}

.ergon-chat-composer{
  flex:0 0 auto;
  position:relative;
  bottom:auto;
}

.ergon-chat-sidebar{
  min-height:0;
  overflow-y:auto;
}
/* Group modal layout fix */
.ergon-chat-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.45);
}

.ergon-chat-modal-card{
  width:min(520px,100%);
  max-height:85vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.22);
}

.ergon-chat-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:20px 24px;
  border-bottom:1px solid #e5e7eb;
}

.ergon-chat-modal-head strong{
  font-size:20px;
}

.ergon-chat-modal-head button{
  width:42px;
  height:42px;
  border:0;
  border-radius:12px;
  font-size:24px;
  cursor:pointer;
}

.ergon-chat-modal-body{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:22px 24px 24px;
  overflow-y:auto;
}

.ergon-group-label{
  font-weight:600;
  font-size:14px;
}

#ergonGroupName{
  width:100%;
  box-sizing:border-box;
}

.ergon-group-users{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:300px;
  overflow-y:auto;
  padding:4px 2px;
}

.ergon-group-user{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:10px 12px;
  box-sizing:border-box;
  border:1px solid #e5e7eb;
  border-radius:10px;
  cursor:pointer;
}

.ergon-group-user input[type="checkbox"]{
  flex:0 0 auto;
  width:18px;
  height:18px;
  margin:0;
}

.ergon-group-user span{
  flex:1;
  min-width:0;
}

#ergonCreateGroup{
  width:100%;
  margin-top:4px;
}
.ergon-chat-modal-head{
  display:flex;
  align-items:center !important;
  justify-content:space-between;
}

.ergon-chat-modal-head button[data-close]{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 42px;
  width:42px !important;
  height:42px !important;
  min-width:42px;
  min-height:42px;
  padding:0 !important;
  margin:0 !important;
  line-height:1 !important;
  position:static !important;
}

/* Group manager */
.ergon-group-manage-btn{
  flex:0 0 auto;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border-radius:10px;
  font-size:20px;
}

.ergon-group-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:12px;
  border-bottom:1px solid #e5e7eb;
}

.ergon-group-member-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.ergon-group-member-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
}

.ergon-group-admin-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  background:#f1f5f9;
  font-size:11px;
  font-weight:700;
}

/* Group header / manage button fix */
.ergon-chat-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px;
  width:100%;
  box-sizing:border-box;
}

#ergonGroupManageBtn{
  flex:0 0 44px !important;
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  min-height:44px !important;
  margin-left:auto !important;
  padding:0 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  background:#111827 !important;
  color:#ffffff !important;
  border:0 !important;
  border-radius:12px !important;

  font-size:21px !important;
  line-height:1 !important;
  cursor:pointer;
}

/* Full group management */
.ergon-group-manager-card{
  width:min(680px,100%);
}

.ergon-group-manage-section{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px 0;
  border-bottom:1px solid #e5e7eb;
}

.ergon-group-manage-section:last-child{
  border-bottom:0;
}

.ergon-group-section-title{
  font-size:14px;
  font-weight:700;
}

.ergon-group-manage-line{
  display:flex;
  align-items:center;
  gap:10px;
}

.ergon-group-manage-line input,
.ergon-group-manage-line select{
  flex:1 1 auto;
  min-width:0;
}

.ergon-group-manage-line button{
  flex:0 0 auto;
  white-space:nowrap;
}

.ergon-group-member-main{
  flex:1 1 auto;
  min-width:0;
}

.ergon-group-member-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:7px;
}

.ergon-group-member-actions button{
  padding:7px 9px;
  font-size:12px;
}

.ergon-group-remove-btn{
  background:#fff !important;
  color:#b91c1c !important;
  border:1px solid #fecaca !important;
}

.ergon-group-admin-badge.member{
  background:#f8fafc;
  font-weight:600;
}

.ergon-group-info-note{
  padding:12px;
  border-radius:10px;
  background:#f8fafc;
  font-size:13px;
}

@media(max-width:700px){
  .ergon-group-manage-line{
    flex-direction:column;
    align-items:stretch;
  }

  .ergon-group-manage-line button{
    width:100%;
  }

  .ergon-group-member-row{
    align-items:flex-start;
    flex-direction:column;
  }

  .ergon-group-member-actions{
    width:100%;
    justify-content:flex-start;
  }
}

/* Typing indicator */
.ergon-typing-indicator{
  flex:0 0 auto;
  padding:6px 16px;
  font-size:12px;
  color:#64748b;
  font-style:italic;
  background:#f8fafc;
  border-bottom:1px solid #e5e7eb;
}

.ergon-typing-indicator.hidden{
  display:none;
}

/* User presence */
.ergon-chat-sub.online{
  display:flex;
  align-items:center;
  gap:6px;
}

.ergon-online-dot{
  display:inline-block;
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-radius:50%;
  background:#16a34a;
}

/* Edit message */
.ergon-message-edit-btn{
  border:0;
  background:transparent;
  padding:2px 4px;
  margin-top:3px;
  font-size:12px;
  line-height:1;
  cursor:pointer;
  opacity:.45;
}

.ergon-message-edit-btn:hover{
  opacity:1;
}

.ergon-message-edited{
  opacity:.7;
  font-style:italic;
}

/* Message actions */
.ergon-message-actions{
  display:flex;
  align-items:center;
  gap:4px;
  margin-top:3px;
}

.ergon-message-delete-btn{
  border:0;
  background:transparent;
  padding:2px 4px;
  font-size:12px;
  line-height:1;
  cursor:pointer;
  opacity:.45;
}

.ergon-message-delete-btn:hover{
  opacity:1;
}

/* Deleted messages */
.ergon-message-deleted{
  opacity:.7;
  font-style:italic;
}

.ergon-message.deleted .ergon-message-bubble{
  background:#f3f4f6;
  color:#6b7280;
}

.ergon-message.me.deleted .ergon-message-bubble{
  background:#f3f4f6;
  color:#6b7280;
}

/* Deleted message placeholder */
.ergon-message-deleted{
  font-style:italic;
  opacity:.72;
}

.ergon-message.deleted .ergon-message-bubble{
  background:#f3f4f6 !important;
  color:#6b7280 !important;
}

.ergon-message.me.deleted .ergon-message-bubble{
  background:#f3f4f6 !important;
  color:#6b7280 !important;
}

/* Chat notifications */
.ergon-chat-toast-container{
  position:fixed;
  top:20px;
  right:20px;
  z-index:99999;
  display:flex;
  flex-direction:column;
  gap:10px;
  width:min(360px,calc(100vw - 40px));
  pointer-events:none;
}

.ergon-chat-toast{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  background:#111827;
  color:#fff;
  border-radius:14px;
  box-shadow:0 14px 40px rgba(0,0,0,.22);
  opacity:0;
  transform:translateY(-10px);
  transition:.2s ease;
}

.ergon-chat-toast.show{
  opacity:1;
  transform:translateY(0);
}

.ergon-chat-toast-icon{
  flex:0 0 auto;
  font-size:20px;
}

.ergon-chat-toast-body{
  min-width:0;
  font-size:13px;
  line-height:1.4;
}

.ergon-chat-toast-body strong{
  display:block;
  margin-bottom:3px;
  font-size:14px;
}

@media(max-width:600px){
  .ergon-chat-toast-container{
    top:12px;
    right:12px;
    width:calc(100vw - 24px);
  }
}

/* Clickable chat notification */
.ergon-chat-toast.clickable{
  pointer-events:auto;
  cursor:pointer;
}

.ergon-chat-toast.clickable:hover{
  transform:translateY(0) scale(1.01);
}

.ergon-chat-toast.clickable:focus{
  outline:2px solid currentColor;
  outline-offset:2px;
}

/* =========================================================
   ERGON CHAT - RESPONSIVE FULL HEIGHT LAYOUT
   ========================================================= */

/* Το view του Chat να μένει μέσα στο διαθέσιμο viewport */
#chat{
  min-height:0;
  height:calc(100vh - 120px);
  max-height:calc(100vh - 120px);
  overflow:hidden;
}

/* Βασικό layout */
#chat .ergon-chat{
  display:grid;
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
}

/* Αριστερή στήλη */
#chat .ergon-chat-sidebar{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  height:100%;
  overflow:hidden;
}

/* Header αριστερής στήλης - δεν κάνει scroll */
#chat .ergon-chat-sidebar-head{
  flex:0 0 auto;
}

/* Search - δεν κάνει scroll */
#chat .ergon-chat-search{
  flex:0 0 auto;
}

/* ΜΟΝΟ η λίστα συνομιλιών κάνει scroll */
#chat .ergon-chat-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

/* Δεξιά περιοχή */
#chat .ergon-chat-main{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  height:100%;
  overflow:hidden;
}

/* Header συνομιλίας */
#chat .ergon-chat-header{
  flex:0 0 auto;
  min-width:0;
}

/* Περιοχή μηνυμάτων - δικό της scroll */
#chat .ergon-chat-messages{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
}

/* Reply preview */
#chat .ergon-reply-preview{
  flex:0 0 auto;
}

/* Composer πάντα κάτω */
#chat .ergon-chat-composer{
  flex:0 0 auto;
  min-width:0;
}

/* Μεγάλα desktop */
@media (min-width:1400px){
  #chat .ergon-chat{
    grid-template-columns:340px minmax(0,1fr);
  }
}

/* Laptop / tablet landscape */
@media (max-width:1100px){

  #chat{
    height:calc(100vh - 105px);
    max-height:calc(100vh - 105px);
  }

  #chat .ergon-chat{
    grid-template-columns:280px minmax(0,1fr);
  }

}

/* Tablet */
@media (max-width:850px){

  #chat{
    height:calc(100vh - 95px);
    max-height:calc(100vh - 95px);
  }

  #chat .ergon-chat{
    grid-template-columns:230px minmax(0,1fr);
  }

  #chat .ergon-chat-sidebar-head{
    flex-wrap:wrap;
  }

  #chat .ergon-chat-sidebar-head button{
    font-size:12px;
  }

}

/* Mobile */
@media (max-width:640px){

  #chat{
    height:calc(100dvh - 80px);
    max-height:calc(100dvh - 80px);
    min-height:0;
  }

  #chat .ergon-chat{
    grid-template-columns:125px minmax(0,1fr);
  }

  #chat .ergon-chat-sidebar{
    min-width:0;
  }

  #chat .ergon-chat-sidebar-head{
    padding:8px;
    gap:5px;
  }

  #chat .ergon-chat-sidebar-head h2{
    width:100%;
    font-size:16px;
    margin:0;
  }

  #chat .ergon-chat-sidebar-head button{
    width:100%;
    padding:7px 5px;
    font-size:10px;
  }

  #chat .ergon-chat-search{
    margin:6px;
    width:calc(100% - 12px);
    padding:7px;
    font-size:11px;
  }

  #chat .ergon-chat-item{
    padding:8px 5px;
    gap:6px;
  }

  #chat .ergon-chat-avatar{
    display:none;
  }

  #chat .ergon-chat-item-top strong{
    font-size:11px;
  }

  #chat .ergon-chat-preview{
    font-size:10px;
  }

  #chat .ergon-chat-header{
    padding:10px 12px;
  }

  #chat .ergon-chat-header strong{
    font-size:14px;
  }

  #chat .ergon-chat-sub{
    font-size:10px;
  }

  #chat .ergon-chat-messages{
    padding:10px;
  }

  #chat .ergon-message{
    max-width:92%;
  }

  #chat .ergon-message-bubble{
    font-size:13px;
  }

  #chat .ergon-chat-composer{
    padding:8px;
    gap:5px;
  }

  #chat .ergon-chat-composer input[type="text"]{
    min-width:0;
    font-size:13px;
  }

  #chat .ergon-chat-composer button{
    flex:0 0 auto;
  }

}

/* Πολύ μικρές συσκευές */
@media (max-width:420px){

  #chat .ergon-chat{
    grid-template-columns:105px minmax(0,1fr);
  }

  #chat .ergon-chat-sidebar-head h2{
    font-size:14px;
  }

  #chat .ergon-chat-sidebar-head button{
    padding:6px 3px;
    font-size:9px;
  }

  #chat .ergon-chat-preview{
    display:none;
  }

}

/* =========================================================
   ERGON CHAT - LOCK PAGE / INTERNAL SCROLL ONLY
   ========================================================= */

/* Όταν είναι ανοιχτό το Chat, η σελίδα ΔΕΝ κάνει scroll */
body:has(#chat:not(.hidden)){
  height:100vh !important;
  height:100dvh !important;
  overflow:hidden !important;
}

/* Ολόκληρη η εφαρμογή κλειδώνει στο viewport */
body:has(#chat:not(.hidden)) #appView{
  height:100vh !important;
  height:100dvh !important;
  max-height:100dvh !important;
  min-height:0 !important;
  overflow:hidden !important;
}

/* Το main γίνεται σταθερό flex container */
body:has(#chat:not(.hidden)) #appView > main{
  height:100% !important;
  max-height:100% !important;
  min-height:0 !important;

  display:flex !important;
  flex-direction:column !important;

  overflow:hidden !important;
}

/* Η επάνω μπάρα δεν μετακινείται */
body:has(#chat:not(.hidden)) .topbar{
  flex:0 0 auto !important;
}

/* Το Chat παίρνει ΑΚΡΙΒΩΣ τον υπόλοιπο διαθέσιμο χώρο */
body:has(#chat:not(.hidden)) #chat{
  flex:1 1 auto !important;

  width:100% !important;
  height:auto !important;
  max-height:none !important;
  min-height:0 !important;

  margin:0 !important;
  overflow:hidden !important;
}

/* Κύριο Chat container */
body:has(#chat:not(.hidden)) #chat .ergon-chat{
  width:100% !important;
  height:100% !important;
  max-height:100% !important;
  min-height:0 !important;

  overflow:hidden !important;
}

/* ΑΡΙΣΤΕΡΗ ΣΤΗΛΗ */
body:has(#chat:not(.hidden)) #chat .ergon-chat-sidebar{
  height:100% !important;
  min-height:0 !important;

  display:flex !important;
  flex-direction:column !important;

  overflow:hidden !important;
}

/* Header + search αριστερά μένουν σταθερά */
body:has(#chat:not(.hidden)) #chat .ergon-chat-sidebar-head,
body:has(#chat:not(.hidden)) #chat .ergon-chat-search{
  flex:0 0 auto !important;
}

/* ΜΟΝΟ οι καρτέλες συνομιλιών κάνουν scroll */
body:has(#chat:not(.hidden)) #chat .ergon-chat-list{
  flex:1 1 0 !important;
  min-height:0 !important;

  overflow-y:auto !important;
  overflow-x:hidden !important;

  overscroll-behavior:contain !important;
}

/* ΔΕΞΙΑ ΣΤΗΛΗ */
body:has(#chat:not(.hidden)) #chat .ergon-chat-main{
  height:100% !important;
  min-height:0 !important;

  display:flex !important;
  flex-direction:column !important;

  overflow:hidden !important;
}

/* Header συνομιλίας σταθερό */
body:has(#chat:not(.hidden)) #chat .ergon-chat-header{
  flex:0 0 auto !important;
}

/* Μόνο τα μηνύματα κινούνται εσωτερικά */
body:has(#chat:not(.hidden)) #chat .ergon-chat-messages{
  flex:1 1 0 !important;
  min-height:0 !important;

  overflow-y:auto !important;
  overflow-x:hidden !important;

  overscroll-behavior:contain !important;
}

/* Reply + composer σταθερά κάτω */
body:has(#chat:not(.hidden)) #chat .ergon-reply-preview,
body:has(#chat:not(.hidden)) #chat .ergon-chat-composer{
  flex:0 0 auto !important;
}

/* Mobile */
@media(max-width:640px){

  body:has(#chat:not(.hidden)),
  body:has(#chat:not(.hidden)) #appView{
    height:100dvh !important;
    max-height:100dvh !important;
  }

}

/* Typing status */
.ergon-typing-status{
  flex:0 0 auto;
  min-height:28px;
  padding:5px 14px;
  font-size:12px;
  font-style:italic;
  color:#64748b;
  background:#f8fafc;
  border-top:1px solid #e5e7eb;
}

.ergon-typing-status.hidden{
  display:none;
}

/* Group member presence */
.ergon-group-online{
  display:flex;
  align-items:center;
  gap:5px;
  margin-top:3px;
  font-size:11px;
}

.ergon-group-lastseen{
  margin-top:3px;
  font-size:11px;
  opacity:.65;
}

.ergon-message-read{
  font-size:10px;
  opacity:.7;
  margin-top:2px;
}

/* Message readers */
.ergon-message-read-details{
  border:0;
  background:transparent;
  padding:2px 0;
  cursor:pointer;
  text-decoration:none;
}

.ergon-message-read-details:hover{
  text-decoration:underline;
}

.ergon-readers-card{
  width:min(560px,100%);
}

.ergon-readers-section{
  padding:10px 0 18px;
}

.ergon-readers-section + .ergon-readers-section{
  border-top:1px solid #e5e7eb;
  padding-top:18px;
}

.ergon-reader-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 0;
}

.ergon-reader-avatar{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f3f4f6;
  font-weight:700;
}

.ergon-reader-main{
  flex:1 1 auto;
  min-width:0;
}

.ergon-reader-status{
  flex:0 0 auto;
  font-size:11px;
}

.ergon-reader-status.read{
  font-weight:600;
}

.ergon-reader-status.unread{
  opacity:.6;
}

/* Pinned message */
.ergon-pinned-message{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-bottom:1px solid #e5e7eb;
  background:#fff;
}

.ergon-pinned-message.hidden{
  display:none;
}

.ergon-pinned-open{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0;
  border:0;
  background:transparent;
  text-align:left;
  cursor:pointer;
}

.ergon-pinned-content{
  min-width:0;
  display:flex;
  flex-direction:column;
  font-size:12px;
}

.ergon-pinned-content span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  opacity:.7;
}

.ergon-pinned-remove{
  flex:0 0 30px;
  width:30px;
  height:30px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:18px;
}

.ergon-message-pin-btn{
  border:0;
  background:transparent;
  padding:2px 4px;
  font-size:12px;
  cursor:pointer;
  opacity:.4;
}

.ergon-message-pin-btn:hover{
  opacity:1;
}

.ergon-message-highlight .ergon-message-bubble{
  outline:2px solid currentColor;
  outline-offset:3px;
}

/* Pinned message metadata */
.ergon-pinned-meta{
  margin-top:2px;
  font-size:10px;
  opacity:.55;
}

/* Multiple pinned messages */
.ergon-pinned-message{
  flex-direction:column;
  align-items:stretch;
  padding:0;
}

.ergon-pins-head{
  display:flex;
  align-items:center;
}

.ergon-pins-toggle{
  width:100%;
  display:flex;
  align-items:center;
  gap:6px;
  padding:9px 12px;
  border:0;
  background:#fff;
  text-align:left;
  cursor:pointer;
  font-size:12px;
  font-weight:600;
}

.ergon-pins-arrow{
  margin-left:auto;
}

.ergon-pins-list{
  max-height:260px;
  overflow-y:auto;
  border-top:1px solid #e5e7eb;
  background:#fff;
}

.ergon-pins-list.hidden{
  display:none;
}

.ergon-pin-row{
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-bottom:1px solid #f1f5f9;
}

.ergon-pin-open{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:8px;
  border:0;
  background:transparent;
  padding:0;
  text-align:left;
  cursor:pointer;
}

.ergon-pin-icon{
  flex:0 0 auto;
}

.ergon-pin-remove{
  flex:0 0 30px;
  width:30px;
  height:30px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:18px;
}

.ergon-pins-remove-all{
  width:100%;
  padding:9px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:11px;
  opacity:.7;
}

.ergon-pins-remove-all:hover{
  opacity:1;
}

/* Search inside active conversation */
.ergon-chat-header-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.ergon-chat-search-toggle{
  flex:0 0 40px;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:10px;
  background:#f3f4f6;
  cursor:pointer;
}

.ergon-message-search-bar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-bottom:1px solid #e5e7eb;
  background:#fff;
}

.ergon-message-search-bar.hidden{
  display:none;
}

.ergon-message-search-bar input{
  flex:1 1 auto;
  min-width:0;
  padding:8px 10px;
}

.ergon-message-search-bar button{
  flex:0 0 34px;
  width:34px;
  height:34px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.ergon-message-search-count{
  flex:0 0 auto;
  min-width:42px;
  text-align:center;
  font-size:11px;
  opacity:.7;
}

.ergon-message-search-hit .ergon-message-bubble{
  outline:3px solid currentColor;
  outline-offset:4px;
}

@media(max-width:640px){

  .ergon-message-search-bar{
    padding:6px;
    gap:4px;
  }

  .ergon-message-search-bar input{
    font-size:12px;
  }

  .ergon-message-search-count{
    min-width:34px;
    font-size:10px;
  }

}

/* Fix message search buttons */
#chat .ergon-message-search-bar button{
  flex:0 0 42px !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  min-height:42px !important;

  padding:0 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  background:#111827 !important;
  color:#ffffff !important;

  border:0 !important;
  border-radius:11px !important;

  font-size:20px !important;
  font-weight:700 !important;
  line-height:1 !important;

  cursor:pointer !important;
}

#chat .ergon-message-search-bar button:hover{
  opacity:.85;
}

#chat .ergon-message-search-count{
  color:#4b5563 !important;
  font-size:12px !important;
  min-width:48px !important;
}

#chat .ergon-message-search-bar input{
  height:48px !important;
  border-radius:12px !important;
}

@media(max-width:640px){

  #chat .ergon-message-search-bar button{
    flex-basis:36px !important;
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
    min-height:36px !important;
    font-size:17px !important;
  }

  #chat .ergon-message-search-bar input{
    height:40px !important;
  }
}

/* =========================================================
   FIX: MESSAGE REACTIONS SIZE
   ========================================================= */

#chat .ergon-message-reactions{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:4px !important;
  margin-top:5px !important;
}

#chat .ergon-reaction-existing,
#chat .ergon-reaction-picker{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:3px !important;
}

#chat button.ergon-reaction-pill,
#chat button.ergon-reaction-add{
  width:auto !important;
  min-width:28px !important;
  max-width:none !important;

  height:28px !important;
  min-height:28px !important;

  padding:2px 6px !important;
  margin:0 !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:3px !important;

  border:1px solid #e5e7eb !important;
  border-radius:999px !important;

  background:#ffffff !important;
  color:#111827 !important;

  font-size:15px !important;
  font-weight:400 !important;
  line-height:1 !important;

  box-shadow:none !important;
}

#chat button.ergon-reaction-pill span{
  font-size:10px !important;
}

#chat button.ergon-reaction-add{
  width:28px !important;
  padding:0 !important;
  opacity:.65 !important;
}

#chat button.ergon-reaction-add:hover{
  opacity:1 !important;
  transform:scale(1.08);
}

#chat button.ergon-reaction-pill.mine{
  font-weight:600 !important;
  background:#f3f4f6 !important;
}


/* =========================================================
   FIX: @MENTIONS DROPDOWN
   ========================================================= */

#chat .ergon-chat-composer{
  position:relative !important;
  overflow:visible !important;
  z-index:100 !important;
}

#chat #ergonMentionMenu{
  position:absolute !important;

  left:170px !important;
  right:180px !important;

  bottom:calc(100% + 8px) !important;

  z-index:99999 !important;

  max-height:280px !important;
  overflow-y:auto !important;

  padding:6px !important;

  background:#ffffff !important;

  border:1px solid #d1d5db !important;
  border-radius:12px !important;

  box-shadow:
    0 12px 35px rgba(0,0,0,.18) !important;
}

#chat #ergonMentionMenu.hidden{
  display:none !important;
}

#chat button.ergon-mention-item{
  width:100% !important;
  height:auto !important;
  min-height:48px !important;

  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;

  padding:7px 10px !important;
  margin:0 !important;

  background:#ffffff !important;
  color:#111827 !important;

  border:0 !important;
  border-radius:8px !important;

  text-align:left !important;
  cursor:pointer !important;
}

#chat button.ergon-mention-item:hover,
#chat button.ergon-mention-item.active{
  background:#f3f4f6 !important;
}

#chat button.ergon-mention-item strong{
  font-size:13px !important;
  color:#111827 !important;
}

#chat button.ergon-mention-item span{
  font-size:11px !important;
  color:#6b7280 !important;
}


/* Mobile */
@media(max-width:640px){

  #chat #ergonMentionMenu{
    left:8px !important;
    right:8px !important;
    bottom:calc(100% + 6px) !important;
  }

  #chat button.ergon-reaction-pill,
  #chat button.ergon-reaction-add{
    min-width:26px !important;
    width:auto !important;
    height:26px !important;
    min-height:26px !important;
    font-size:14px !important;
  }

  #chat button.ergon-reaction-add{
    width:26px !important;
  }
}


/* Mention badge in conversation list */

.ergon-chat-item-badges{
  display:flex;
  align-items:center;
  gap:5px;
  margin-left:auto;
}

.ergon-chat-mention-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:24px;
  height:22px;

  padding:0 6px;

  border-radius:999px;

  background:#111827;
  color:#ffffff;

  font-size:11px;
  font-weight:700;
  line-height:1;
}

@media(max-width:640px){

  .ergon-chat-mention-badge{
    min-width:22px;
    height:20px;
    font-size:10px;
    padding:0 5px;
  }

}

/* =========================================================
   FORWARD MESSAGE
   ========================================================= */

#chat .ergon-message-forward-btn{
  width:28px !important;
  height:28px !important;
  min-width:28px !important;
  min-height:28px !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  padding:0 !important;

  border:0 !important;
  border-radius:8px !important;

  background:transparent !important;
  color:inherit !important;

  font-size:17px !important;
  cursor:pointer !important;
}

#chat .ergon-message-forward-btn:hover{
  background:rgba(0,0,0,.06) !important;
}

.ergon-message-forwarded-label{
  margin-bottom:4px;

  font-size:10px;
  font-weight:600;
  opacity:.6;
}


/* Forward modal */

.ergon-forward-modal{
  position:fixed;
  inset:0;
  z-index:999999;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:20px;

  background:rgba(15,23,42,.42);
}

.ergon-forward-dialog{
  width:min(520px,100%);
  max-height:min(700px,90dvh);

  display:flex;
  flex-direction:column;

  background:#fff;
  border-radius:16px;

  box-shadow:
    0 24px 60px rgba(0,0,0,.25);

  overflow:hidden;
}

.ergon-forward-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding:16px;

  border-bottom:1px solid #e5e7eb;
}

.ergon-forward-header > button{
  width:36px !important;
  height:36px !important;
  min-width:36px !important;

  padding:0 !important;

  border:0 !important;
  border-radius:9px !important;

  font-size:20px !important;
}

#ergonForwardSearch{
  margin:12px 12px 5px;
  padding:10px 12px;

  border:1px solid #d1d5db;
  border-radius:10px;
}

.ergon-forward-list{
  flex:1 1 auto;
  overflow-y:auto;

  padding:6px 12px 12px;
}

.ergon-forward-item{
  display:flex;
  align-items:center;
  gap:10px;

  padding:9px;

  border-radius:10px;

  cursor:pointer;
}

.ergon-forward-item:hover{
  background:#f3f4f6;
}

.ergon-forward-item input{
  flex:0 0 auto;
}

.ergon-forward-avatar{
  width:36px;
  height:36px;

  flex:0 0 36px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:50%;

  background:#f3f4f6;

  font-weight:700;
}

.ergon-forward-name{
  min-width:0;

  display:flex;
  flex-direction:column;
}

.ergon-forward-name strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ergon-forward-name small{
  opacity:.6;
}

.ergon-forward-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding:12px 16px;

  border-top:1px solid #e5e7eb;
}

#ergonForwardSend{
  min-width:110px;
}

@media(max-width:640px){

  .ergon-forward-modal{
    padding:8px;
    align-items:flex-end;
  }

  .ergon-forward-dialog{
    width:100%;
    max-height:85dvh;

    border-radius:16px 16px 8px 8px;
  }

}

/* =========================================================
   FIX FORWARD MODAL LIST
   ========================================================= */

.ergon-forward-dialog,
.ergon-forward-list{
  overflow-x:hidden !important;
}

.ergon-forward-list{
  width:100% !important;
  box-sizing:border-box !important;
}

.ergon-forward-item{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;

  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;

  gap:10px !important;
}

.ergon-forward-item input[type="checkbox"]{
  appearance:auto !important;
  -webkit-appearance:checkbox !important;

  flex:0 0 18px !important;

  width:18px !important;
  min-width:18px !important;
  max-width:18px !important;

  height:18px !important;
  min-height:18px !important;
  max-height:18px !important;

  margin:0 !important;
  padding:0 !important;
}

.ergon-forward-avatar{
  flex:0 0 38px !important;

  width:38px !important;
  min-width:38px !important;
  height:38px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.ergon-forward-name{
  flex:1 1 auto !important;
  width:auto !important;
  min-width:0 !important;

  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;

  color:#111827 !important;
}

.ergon-forward-name strong{
  width:100% !important;

  color:#111827 !important;
  font-size:14px !important;

  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.ergon-forward-name small{
  color:#6b7280 !important;
  font-size:11px !important;
}

#ergonForwardSearch{
  width:calc(100% - 24px) !important;
  max-width:calc(100% - 24px) !important;
  box-sizing:border-box !important;
}

.ergon-forward-footer{
  box-sizing:border-box !important;
  width:100% !important;
}

@media(max-width:640px){

  .ergon-forward-item{
    padding:8px 5px !important;
  }

  .ergon-forward-avatar{
    flex-basis:34px !important;
    width:34px !important;
    min-width:34px !important;
    height:34px !important;
  }

}

/* =========================================================
   SAVED MESSAGES
   ========================================================= */

#chat .ergon-message-save-btn{
  width:28px !important;
  min-width:28px !important;
  height:28px !important;
  min-height:28px !important;

  padding:0 !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  border:0 !important;
  border-radius:8px !important;

  background:transparent !important;
  color:inherit !important;

  font-size:19px !important;
  line-height:1 !important;

  cursor:pointer !important;
}

#chat .ergon-message-save-btn:hover{
  background:rgba(0,0,0,.06) !important;
}

#chat .ergon-message-save-btn.saved{
  font-weight:700 !important;
}

#chat .ergon-saved-messages-btn{
  width:calc(100% - 16px) !important;
  min-height:38px !important;

  margin:6px 8px !important;
  padding:7px 10px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;

  gap:7px !important;

  border:1px solid #e5e7eb !important;
  border-radius:10px !important;

  background:#fff !important;
  color:#111827 !important;

  font-size:12px !important;
  font-weight:600 !important;

  cursor:pointer !important;
}


/* Modal */

.ergon-saved-modal{
  position:fixed;
  inset:0;
  z-index:999999;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:20px;

  background:rgba(15,23,42,.42);
}

.ergon-saved-dialog{
  width:min(620px,100%);
  max-height:min(760px,90dvh);

  display:flex;
  flex-direction:column;

  overflow:hidden;

  background:#fff;
  border-radius:16px;

  box-shadow:
    0 24px 60px rgba(0,0,0,.25);
}

.ergon-saved-header{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:12px;
  padding:16px;

  border-bottom:1px solid #e5e7eb;
}

.ergon-saved-header > button{
  width:36px !important;
  min-width:36px !important;
  height:36px !important;

  padding:0 !important;

  border:0 !important;
  border-radius:9px !important;

  font-size:20px !important;
}

#ergonSavedSearch{
  width:calc(100% - 24px) !important;
  margin:12px !important;

  box-sizing:border-box !important;

  padding:10px 12px !important;

  border:1px solid #d1d5db !important;
  border-radius:10px !important;
}

.ergon-saved-list{
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden;

  padding:0 12px 12px;
}

.ergon-saved-item{
  width:100%;

  display:flex;
  align-items:center;

  gap:8px;

  box-sizing:border-box;

  padding:8px 0;

  border-bottom:1px solid #f1f5f9;
}

.ergon-saved-open{
  flex:1 1 auto;
  min-width:0;

  display:block;

  padding:10px !important;

  border:0 !important;
  border-radius:10px !important;

  background:transparent !important;
  color:#111827 !important;

  text-align:left !important;

  cursor:pointer !important;
}

.ergon-saved-open:hover{
  background:#f3f4f6 !important;
}

.ergon-saved-item-top{
  display:flex;
  align-items:center;
  gap:8px;

  margin-bottom:5px;
}

.ergon-saved-item-top strong{
  font-size:13px;
}

.ergon-saved-item-top span{
  font-size:11px;
  opacity:.6;
}

.ergon-saved-preview{
  font-size:13px;
  line-height:1.4;

  white-space:normal;
  overflow-wrap:anywhere;
}

.ergon-saved-remove{
  flex:0 0 36px !important;

  width:36px !important;
  min-width:36px !important;
  height:36px !important;

  padding:0 !important;

  border:0 !important;
  border-radius:9px !important;

  background:transparent !important;

  font-size:20px !important;

  cursor:pointer !important;
}

.ergon-saved-empty{
  padding:30px 15px;

  text-align:center;
  opacity:.6;
}

@media(max-width:640px){

  .ergon-saved-modal{
    padding:8px;
    align-items:flex-end;
  }

  .ergon-saved-dialog{
    max-height:85dvh;
    border-radius:16px 16px 8px 8px;
  }

}

/* =========================================================
   SAVED MESSAGES
   ========================================================= */

#chat .ergon-message-save-btn{
  width:28px !important;
  min-width:28px !important;
  height:28px !important;
  min-height:28px !important;

  padding:0 !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  border:0 !important;
  border-radius:8px !important;

  background:transparent !important;
  color:inherit !important;

  font-size:19px !important;
  line-height:1 !important;

  cursor:pointer !important;
}

#chat .ergon-message-save-btn:hover{
  background:rgba(0,0,0,.06) !important;
}

#chat .ergon-message-save-btn.saved{
  font-weight:700 !important;
}

#chat .ergon-saved-messages-btn{
  width:calc(100% - 16px) !important;
  min-height:38px !important;

  margin:6px 8px !important;
  padding:7px 10px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;

  gap:7px !important;

  border:1px solid #e5e7eb !important;
  border-radius:10px !important;

  background:#fff !important;
  color:#111827 !important;

  font-size:12px !important;
  font-weight:600 !important;

  cursor:pointer !important;
}


/* Modal */

.ergon-saved-modal{
  position:fixed;
  inset:0;
  z-index:999999;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:20px;

  background:rgba(15,23,42,.42);
}

.ergon-saved-dialog{
  width:min(620px,100%);
  max-height:min(760px,90dvh);

  display:flex;
  flex-direction:column;

  overflow:hidden;

  background:#fff;
  border-radius:16px;

  box-shadow:
    0 24px 60px rgba(0,0,0,.25);
}

.ergon-saved-header{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:12px;
  padding:16px;

  border-bottom:1px solid #e5e7eb;
}

.ergon-saved-header > button{
  width:36px !important;
  min-width:36px !important;
  height:36px !important;

  padding:0 !important;

  border:0 !important;
  border-radius:9px !important;

  font-size:20px !important;
}

#ergonSavedSearch{
  width:calc(100% - 24px) !important;
  margin:12px !important;

  box-sizing:border-box !important;

  padding:10px 12px !important;

  border:1px solid #d1d5db !important;
  border-radius:10px !important;
}

.ergon-saved-list{
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden;

  padding:0 12px 12px;
}

.ergon-saved-item{
  width:100%;

  display:flex;
  align-items:center;

  gap:8px;

  box-sizing:border-box;

  padding:8px 0;

  border-bottom:1px solid #f1f5f9;
}

.ergon-saved-open{
  flex:1 1 auto;
  min-width:0;

  display:block;

  padding:10px !important;

  border:0 !important;
  border-radius:10px !important;

  background:transparent !important;
  color:#111827 !important;

  text-align:left !important;

  cursor:pointer !important;
}

.ergon-saved-open:hover{
  background:#f3f4f6 !important;
}

.ergon-saved-item-top{
  display:flex;
  align-items:center;
  gap:8px;

  margin-bottom:5px;
}

.ergon-saved-item-top strong{
  font-size:13px;
}

.ergon-saved-item-top span{
  font-size:11px;
  opacity:.6;
}

.ergon-saved-preview{
  font-size:13px;
  line-height:1.4;

  white-space:normal;
  overflow-wrap:anywhere;
}

.ergon-saved-remove{
  flex:0 0 36px !important;

  width:36px !important;
  min-width:36px !important;
  height:36px !important;

  padding:0 !important;

  border:0 !important;
  border-radius:9px !important;

  background:transparent !important;

  font-size:20px !important;

  cursor:pointer !important;
}

.ergon-saved-empty{
  padding:30px 15px;

  text-align:center;
  opacity:.6;
}

@media(max-width:640px){

  .ergon-saved-modal{
    padding:8px;
    align-items:flex-end;
  }

  .ergon-saved-dialog{
    max-height:85dvh;
    border-radius:16px 16px 8px 8px;
  }

}

/* =========================================================
   SAVED MESSAGES
   ========================================================= */

#chat .ergon-message-save-btn{
  width:28px !important;
  min-width:28px !important;
  height:28px !important;
  min-height:28px !important;

  padding:0 !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  border:0 !important;
  border-radius:8px !important;

  background:transparent !important;
  color:inherit !important;

  font-size:19px !important;
  line-height:1 !important;

  cursor:pointer !important;
}

#chat .ergon-message-save-btn:hover{
  background:rgba(0,0,0,.06) !important;
}

#chat .ergon-message-save-btn.saved{
  font-weight:700 !important;
}

#chat .ergon-saved-messages-btn{
  width:calc(100% - 16px) !important;
  min-height:40px !important;

  margin:6px 8px !important;
  padding:8px 10px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;

  gap:8px !important;

  border:1px solid #e5e7eb !important;
  border-radius:10px !important;

  background:#ffffff !important;
  color:#111827 !important;

  font-size:12px !important;
  font-weight:600 !important;

  cursor:pointer !important;
}

#chat .ergon-saved-messages-btn:hover{
  background:#f9fafb !important;
}


/* Modal */

.ergon-saved-modal{
  position:fixed;
  inset:0;
  z-index:999999;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:20px;

  background:rgba(15,23,42,.42);
}

.ergon-saved-dialog{
  width:min(620px,100%);
  max-height:min(760px,90dvh);

  display:flex;
  flex-direction:column;

  overflow:hidden;

  background:#ffffff;
  border-radius:16px;

  box-shadow:
    0 24px 60px rgba(0,0,0,.25);
}

.ergon-saved-header{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:12px;
  padding:16px;

  border-bottom:1px solid #e5e7eb;
}

.ergon-saved-header > button{
  width:36px !important;
  min-width:36px !important;
  height:36px !important;

  padding:0 !important;

  border:0 !important;
  border-radius:9px !important;

  background:#f3f4f6 !important;
  color:#111827 !important;

  font-size:20px !important;
}

#ergonSavedSearch{
  width:calc(100% - 24px) !important;
  max-width:calc(100% - 24px) !important;

  box-sizing:border-box !important;

  margin:12px !important;
  padding:10px 12px !important;

  border:1px solid #d1d5db !important;
  border-radius:10px !important;
}

.ergon-saved-list{
  flex:1 1 auto;

  overflow-y:auto;
  overflow-x:hidden;

  padding:0 12px 12px;
}

.ergon-saved-item{
  width:100%;

  display:flex;
  align-items:center;

  gap:8px;

  box-sizing:border-box;

  padding:8px 0;

  border-bottom:1px solid #f1f5f9;
}

.ergon-saved-open{
  flex:1 1 auto;
  min-width:0;

  display:block !important;

  padding:10px !important;

  border:0 !important;
  border-radius:10px !important;

  background:transparent !important;
  color:#111827 !important;

  text-align:left !important;

  cursor:pointer !important;
}

.ergon-saved-open:hover{
  background:#f3f4f6 !important;
}

.ergon-saved-item-top{
  display:flex;
  align-items:center;
  flex-wrap:wrap;

  gap:8px;

  margin-bottom:5px;
}

.ergon-saved-item-top strong{
  font-size:13px;
}

.ergon-saved-item-top span{
  font-size:11px;
  opacity:.6;
}

.ergon-saved-preview{
  font-size:13px;
  line-height:1.4;

  white-space:normal;
  overflow-wrap:anywhere;
}

.ergon-saved-remove{
  flex:0 0 36px !important;

  width:36px !important;
  min-width:36px !important;
  height:36px !important;

  padding:0 !important;

  border:0 !important;
  border-radius:9px !important;

  background:transparent !important;
  color:#111827 !important;

  font-size:20px !important;

  cursor:pointer !important;
}

.ergon-saved-remove:hover{
  background:#f3f4f6 !important;
}

.ergon-saved-empty{
  padding:30px 15px;

  text-align:center;
  opacity:.6;
}

@media(max-width:640px){

  .ergon-saved-modal{
    padding:8px;
    align-items:flex-end;
  }

  .ergon-saved-dialog{
    max-height:85dvh;
    border-radius:16px 16px 8px 8px;
  }

}

/* =========================================================
   MESSAGE QUICK ACTIONS - SAME ROW
   ========================================================= */

#chat .ergon-message{
  position:relative;
}

/* Τα save / forward / pin στην ίδια σειρά */
#chat .ergon-message-save-btn,
#chat .ergon-message-forward-btn,
#chat .ergon-message-pin-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  width:24px !important;
  min-width:24px !important;
  height:24px !important;
  min-height:24px !important;

  padding:0 !important;
  margin:0 2px !important;

  border:0 !important;
  border-radius:6px !important;

  background:transparent !important;

  font-size:15px !important;
  line-height:1 !important;

  vertical-align:middle !important;
}

/* Μικρότερο reactions block */
#chat .ergon-message-reactions{
  margin-top:3px !important;
  gap:3px !important;
}

#chat button.ergon-reaction-pill,
#chat button.ergon-reaction-add{
  min-width:24px !important;
  height:24px !important;
  min-height:24px !important;

  padding:1px 5px !important;

  font-size:13px !important;
}

#chat button.ergon-reaction-add{
  width:24px !important;
}

/* Μικρότερα edit/delete */
#chat .ergon-message-actions{
  display:inline-flex !important;
  align-items:center !important;
  gap:3px !important;
  margin:0 3px 0 0 !important;
}

#chat .ergon-message-edit-btn,
#chat .ergon-message-delete-btn{
  width:24px !important;
  min-width:24px !important;
  height:24px !important;
  min-height:24px !important;

  padding:0 !important;
  margin:0 !important;

  font-size:13px !important;
}

/* Λιγότερος κατακόρυφος χώρος */
#chat .ergon-message-time{
  margin-top:2px !important;
  font-size:10px !important;
}

#chat .ergon-message-read{
  margin-top:1px !important;
  font-size:10px !important;
}


#chat .ergon-message-quick-actions{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:2px !important;

  margin-top:2px !important;
  margin-bottom:1px !important;
}

/* =========================================================
   VIBER STYLE REACTIONS
   ========================================================= */

#chat .ergon-message{
  position:relative !important;
}

/*
 * Existing selected reactions stay visible,
 * but compact.
 */
#chat .ergon-message-reactions{
  position:relative !important;

  display:flex !important;
  align-items:center !important;

  min-height:0 !important;

  margin-top:2px !important;
  padding:0 !important;
}

#chat .ergon-reaction-existing{
  display:flex !important;
  flex-wrap:wrap !important;

  gap:3px !important;

  margin:0 !important;
}

/* Selected reaction */
#chat button.ergon-reaction-pill{
  width:auto !important;
  min-width:26px !important;

  height:23px !important;
  min-height:23px !important;

  padding:1px 5px !important;

  border-radius:999px !important;

  font-size:13px !important;
  line-height:1 !important;
}

#chat button.ergon-reaction-pill span{
  font-size:9px !important;
}



/* =========================================================
   CLEAN VIBER REACTION LAYOUT
   Incoming: [message] 😊
   Outgoing: 😊 [message]
   ========================================================= */

#chat .ergon-message-bubble-line{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;

  gap:4px !important;

  width:max-content !important;
  max-width:100% !important;

  margin:0 !important;
  padding:0 !important;

  position:relative !important;
}

/* Incoming */
#chat .ergon-message:not(.me) .ergon-message-bubble-line{
  align-self:flex-start !important;
}

/* Outgoing */
#chat .ergon-message.me .ergon-message-bubble-line{
  align-self:flex-end !important;
}

/* Bubble must leave room for smile button */
#chat .ergon-message-bubble-line .ergon-message-bubble{
  flex:0 1 auto !important;

  width:auto !important;
  max-width:calc(100% - 32px) !important;

  margin:0 !important;

  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}


/* =========================================================
   SINGLE SMILE BUTTON
   ========================================================= */

#chat .ergon-reaction-trigger-wrap{
  position:relative !important;

  flex:0 0 26px !important;

  width:26px !important;
  min-width:26px !important;
  height:26px !important;
  min-height:26px !important;

  margin:0 !important;
  padding:0 !important;

  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;

  transform:none !important;

  z-index:20 !important;
}

#chat button.ergon-reaction-trigger{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  width:26px !important;
  min-width:26px !important;
  height:26px !important;
  min-height:26px !important;

  margin:0 !important;
  padding:0 !important;

  border:1px solid #e5e7eb !important;
  border-radius:50% !important;

  background:#fff !important;
  color:#111827 !important;

  font-size:13px !important;
  line-height:1 !important;

  box-shadow:0 2px 5px rgba(0,0,0,.08) !important;

  cursor:pointer !important;
}


/* =========================================================
   REACTION PICKER
   ========================================================= */

#chat .ergon-reaction-popover{
  position:absolute !important;

  top:50% !important;

  display:flex !important;
  align-items:center !important;

  gap:3px !important;

  padding:4px !important;

  background:#fff !important;

  border:1px solid #e5e7eb !important;
  border-radius:999px !important;

  box-shadow:0 8px 24px rgba(0,0,0,.16) !important;

  transform:translateY(-50%) !important;

  white-space:nowrap !important;

  z-index:99999 !important;
}

#chat .ergon-reaction-popover.hidden{
  display:none !important;
}

/* Incoming smile is after bubble:
   picker opens toward the bubble */
#chat .ergon-message:not(.me)
.ergon-reaction-trigger-wrap
.ergon-reaction-popover{
  right:31px !important;
  left:auto !important;
}

/* Outgoing smile is before bubble:
   picker opens toward the bubble */
#chat .ergon-message.me
.ergon-reaction-trigger-wrap
.ergon-reaction-popover{
  left:31px !important;
  right:auto !important;
}

#chat .ergon-reaction-popover .ergon-reaction-add{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  width:28px !important;
  min-width:28px !important;
  height:28px !important;
  min-height:28px !important;

  margin:0 !important;
  padding:0 !important;

  border:0 !important;
  border-radius:50% !important;

  background:transparent !important;

  font-size:16px !important;

  opacity:1 !important;

  cursor:pointer !important;
}


/* Selected reactions remain compact */
#chat .ergon-message-reactions{
  display:flex !important;
  align-items:center !important;

  margin-top:2px !important;
  padding:0 !important;

  min-height:0 !important;
}

#chat .ergon-reaction-existing{
  display:flex !important;
  flex-wrap:wrap !important;

  gap:3px !important;
}

#chat button.ergon-reaction-pill{
  width:auto !important;
  min-width:25px !important;

  height:22px !important;
  min-height:22px !important;

  padding:1px 5px !important;

  border-radius:999px !important;

  font-size:13px !important;
  line-height:1 !important;
}

#chat button.ergon-reaction-pill span{
  font-size:9px !important;
}


/* Mobile */
@media(max-width:640px){

  #chat .ergon-message-bubble-line{
    gap:3px !important;
  }

  #chat .ergon-reaction-trigger-wrap,
  #chat button.ergon-reaction-trigger{
    width:23px !important;
    min-width:23px !important;

    height:23px !important;
    min-height:23px !important;
  }

  #chat button.ergon-reaction-trigger{
    font-size:12px !important;
  }

  #chat .ergon-message-bubble-line .ergon-message-bubble{
    max-width:calc(100% - 27px) !important;
  }

}


/* =========================================================
   COMPACT MESSAGE LAYOUT
   ========================================================= */

/* Λιγότερο κενό μεταξύ μηνυμάτων */
#chat .ergon-message{
  margin-bottom:7px !important;
}

/* Πιο compact bubble */
#chat .ergon-message-bubble{
  padding:7px 10px !important;
  line-height:1.35 !important;
}

/* Όνομα αποστολέα */
#chat .ergon-message-meta{
  margin-bottom:2px !important;
  font-size:10px !important;
}

/* Reply quote */
#chat .ergon-reply-quoted{
  margin-bottom:3px !important;
  padding:5px 8px !important;
  font-size:11px !important;
}

/* =========================================================
   QUICK ACTIONS
   ========================================================= */

#chat .ergon-message-quick-actions{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;

  gap:1px !important;

  margin-top:1px !important;
  margin-bottom:0 !important;

  min-height:22px !important;
}

#chat .ergon-message-save-btn,
#chat .ergon-message-forward-btn,
#chat .ergon-message-pin-btn{
  width:22px !important;
  min-width:22px !important;

  height:22px !important;
  min-height:22px !important;

  margin:0 !important;
  padding:0 !important;

  font-size:13px !important;
  line-height:1 !important;
}

/* edit / delete */
#chat .ergon-message-actions{
  gap:1px !important;
  margin-top:1px !important;
  margin-bottom:0 !important;
}

#chat .ergon-message-edit-btn,
#chat .ergon-message-delete-btn{
  width:22px !important;
  min-width:22px !important;

  height:22px !important;
  min-height:22px !important;

  padding:0 !important;

  font-size:12px !important;
}


/* =========================================================
   SELECTED REACTIONS
   ========================================================= */

#chat .ergon-message-reactions{
  margin-top:1px !important;
  margin-bottom:0 !important;

  min-height:0 !important;

  line-height:1 !important;
}

#chat .ergon-reaction-existing{
  gap:2px !important;
}

#chat button.ergon-reaction-pill{
  min-width:23px !important;

  height:20px !important;
  min-height:20px !important;

  padding:0 4px !important;

  font-size:12px !important;
}

#chat button.ergon-reaction-pill span{
  font-size:8px !important;
}


/* =========================================================
   TIME + READ STATUS
   ========================================================= */

#chat .ergon-message-time{
  margin-top:1px !important;

  font-size:9px !important;
  line-height:1.15 !important;
}

#chat .ergon-message-read{
  margin-top:0 !important;

  padding:0 !important;

  min-height:0 !important;

  font-size:9px !important;
  line-height:1.15 !important;

  background:transparent !important;
  border:0 !important;
}

/* Group clickable read status */
#chat button.ergon-message-read-details{
  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;

  padding:0 !important;

  background:transparent !important;
  border:0 !important;

  font-size:9px !important;
}


/* =========================================================
   ATTACHMENTS
   ========================================================= */

#chat .ergon-attachment{
  margin-bottom:3px !important;
}

#chat .ergon-attachment-file{
  padding:7px 9px !important;
}

#chat .ergon-audio-message{
  margin-bottom:2px !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:640px){

  #chat .ergon-message{
    margin-bottom:6px !important;
  }

  #chat .ergon-message-bubble{
    padding:6px 9px !important;
  }

  #chat .ergon-message-save-btn,
  #chat .ergon-message-forward-btn,
  #chat .ergon-message-pin-btn,
  #chat .ergon-message-edit-btn,
  #chat .ergon-message-delete-btn{
    width:21px !important;
    min-width:21px !important;
    height:21px !important;
    min-height:21px !important;
  }

}

/* All message actions in one compact row */
#chat .ergon-message-quick-actions{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  flex-wrap:nowrap !important;

  gap:2px !important;

  margin-top:2px !important;
  margin-bottom:0 !important;
}

#chat .ergon-message-quick-actions
.ergon-message-save-btn,

#chat .ergon-message-quick-actions
.ergon-message-forward-btn,

#chat .ergon-message-quick-actions
.ergon-message-pin-btn,

#chat .ergon-message-quick-actions
.ergon-message-edit-btn,

#chat .ergon-message-quick-actions
.ergon-message-delete-btn{
  width:22px !important;
  min-width:22px !important;

  height:22px !important;
  min-height:22px !important;

  margin:0 !important;
  padding:0 !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  border:0 !important;
  border-radius:6px !important;

  background:transparent !important;

  font-size:13px !important;
  line-height:1 !important;

  cursor:pointer !important;
}

#chat .ergon-message-quick-actions button:hover{
  background:rgba(0,0,0,.06) !important;
}

#chat .ergon-message.ergon-notification-message-highlight{
  outline:3px solid rgba(59,130,246,.45);
  outline-offset:5px;
  border-radius:14px;
  transition:outline .25s ease;
}


/* =========================================================
   CHAT MOBILE NAVIGATION V1
   ========================================================= */

.ergon-chat-mobile-back{
  display:none;
}

@media(max-width:900px){

  #chat{
    padding-left:0 !important;
    padding-right:0 !important;
  }

  #chat .ergon-chat,
  #chat .ergon-chat *{
    box-sizing:border-box;
  }

  #chat .ergon-chat{
    position:relative !important;

    display:block !important;

    width:100% !important;
    max-width:100% !important;

    height:calc(100dvh - 92px) !important;
    min-height:0 !important;

    overflow:hidden !important;
  }


  /* Conversation list */

  #chat .ergon-chat-sidebar{
    display:flex !important;
    flex-direction:column !important;

    width:100% !important;
    max-width:100% !important;
    height:100% !important;

    border-right:0 !important;

    overflow:hidden !important;
  }

  #chat .ergon-chat-sidebar-head{
    flex:0 0 auto !important;
  }

  #chat .ergon-chat-search{
    flex:0 0 44px !important;

    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
  }

  #chat .ergon-chat-list{
    flex:1 1 auto !important;
    min-height:0 !important;

    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch;
  }


  /* Conversation screen */

  #chat .ergon-chat-main{
    display:none !important;

    position:absolute !important;
    inset:0 !important;

    width:100% !important;
    max-width:100% !important;
    height:100% !important;

    background:#fff;

    overflow:hidden !important;
  }

  #chat .ergon-chat.mobile-conversation-open
  .ergon-chat-sidebar{
    display:none !important;
  }

  #chat .ergon-chat.mobile-conversation-open
  .ergon-chat-main{
    display:flex !important;
    flex-direction:column !important;
  }


  /* Header */

  #chat .ergon-chat-header{
    flex:0 0 auto !important;

    display:flex !important;
    align-items:center !important;

    min-width:0 !important;
    min-height:58px !important;
  }

  #chat .ergon-chat-header > div:not(.ergon-chat-header-actions){
    min-width:0 !important;
    flex:1 1 auto !important;
  }

  #chat .ergon-chat-header strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  #chat .ergon-chat-mobile-back{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;

    flex:0 0 40px !important;

    width:40px !important;
    height:40px !important;
    min-height:40px !important;

    padding:0 !important;
    margin-right:7px !important;

    font-size:23px !important;
  }


  /* Messages */

  #chat .ergon-chat-messages{
    flex:1 1 auto !important;
    min-height:0 !important;

    width:100% !important;

    overflow-y:auto !important;
    overflow-x:hidden !important;

    -webkit-overflow-scrolling:touch;
  }


  /* Composer */

  #chat .ergon-chat-composer{
    flex:0 0 auto !important;

    display:grid !important;
    grid-template-columns:44px 44px minmax(0,1fr) auto !important;

    width:100% !important;
    max-width:100% !important;

    gap:6px !important;
    padding:8px !important;
  }

  #chat .ergon-chat-composer input[type="text"]{
    width:100% !important;
    min-width:0 !important;

    height:44px !important;
    min-height:44px !important;

    font-size:16px !important;
  }

  #chat .ergon-attach-btn,
  #chat .ergon-voice-btn{
    width:44px !important;
    min-width:44px !important;
    height:44px !important;
    min-height:44px !important;

    padding:0 !important;
  }

  #chat .ergon-chat-composer button[type="submit"]{
    width:auto !important;
    min-width:82px !important;
    height:44px !important;
    min-height:44px !important;

    padding:0 12px !important;
  }
}


@media(max-width:430px){

  #chat .ergon-chat-composer{
    grid-template-columns:40px 40px minmax(0,1fr) 44px !important;
  }

  #chat .ergon-attach-btn,
  #chat .ergon-voice-btn{
    width:40px !important;
    min-width:40px !important;
  }

  #chat .ergon-chat-composer button[type="submit"]{
    width:44px !important;
    min-width:44px !important;

    padding:0 !important;

    font-size:0 !important;
  }

  #chat .ergon-chat-composer button[type="submit"]::after{
    content:"➤";
    font-size:19px;
  }
}


/* MOBILE CHAT BACK BUTTON V3 */

@media(max-width:900px){

  #chat #ergonChatMobileBack{
    display:inline-flex !important;

    align-items:center !important;
    justify-content:center !important;

    flex:0 0 42px !important;

    width:42px !important;
    min-width:42px !important;

    height:42px !important;
    min-height:42px !important;

    margin:0 8px 0 0 !important;
    padding:0 !important;

    border:0 !important;
    border-radius:10px !important;

    background:#f3f4f6 !important;
    color:#111827 !important;

    font-size:30px !important;
    line-height:1 !important;

    cursor:pointer !important;
  }

  #chat .ergon-chat-header{
    display:flex !important;
    align-items:center !important;
  }
}
