/* HANBIT ERP CHAT V42 */

html.hb-chat-page-open,
html.hb-chat-page-open body{
  overflow:hidden;
}

.hb-chat-launch{
  position:relative;
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #dce5ee;
  border-radius:9px;
  background:#fff;
  cursor:pointer;
}

.hb-chat-launch b,
.hb-chat-side-launch b{
  min-width:17px;
  height:17px;
  padding:0 4px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#ef4444;
  color:#fff;
  font-size:9px;
}

.hb-chat-launch b{
  position:absolute;
  top:-5px;
  right:-5px;
}

.hb-chat-side-launch{
  width:100%;
  min-height:42px;
  padding:0 12px;
  display:flex;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
  text-align:left;
}

.hb-chat-side-launch b{
  margin-left:auto;
}

.hb-chat-root{
  position:fixed;
  inset:0;
  z-index:12100;
  pointer-events:none;
  visibility:hidden;
}

.hb-chat-root.open{
  pointer-events:auto;
  visibility:visible;
}

.hb-chat-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,24,40,.42);
  opacity:0;
  transition:.2s;
}

.hb-chat-root.open .hb-chat-backdrop{
  opacity:1;
}

.hb-chat-panel{
  position:absolute;
  top:50%;
  left:50%;
  width:min(1100px,94vw);
  height:min(760px,90vh);
  display:grid;
  grid-template-columns:310px 1fr;
  overflow:hidden;
  border-radius:15px;
  background:#fff;
  box-shadow:0 30px 80px rgba(5,26,44,.28);
  opacity:0;
  transform:translate(-50%,-47%) scale(.98);
  transition:.2s;
}

.hb-chat-root.open .hb-chat-panel{
  opacity:1;
  transform:translate(-50%,-50%) scale(1);
}

.hb-chat-list{
  min-width:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid #e6ecf2;
  background:#f8fafc;
}

.hb-chat-list>header{
  min-height:68px;
  padding:0 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.hb-chat-list>header>div{
  display:grid;
  gap:2px;
}

.hb-chat-list>header strong{
  font-size:16px;
  color:#18334f;
}

.hb-chat-list>header small{
  font-size:9px;
  color:#8a9bac;
}

.hb-chat-list>header button,
.hb-chat-thread-actions button,
.hb-chat-mobile-back{
  width:34px;
  height:34px;
  border:0;
  border-radius:8px;
  background:#eef3f8;
  color:#38536c;
  cursor:pointer;
}

.hb-chat-search{
  padding:0 12px 10px;
}

.hb-chat-search input{
  width:100%;
  height:38px;
  padding:0 12px;
  border:1px solid #dde6ee;
  border-radius:8px;
  background:#fff;
  outline:0;
}

.hb-chat-filter{
  padding:0 12px 10px;
  display:flex;
  gap:5px;
}

.hb-chat-filter button{
  min-height:27px;
  padding:0 8px;
  border:1px solid #dde6ee;
  border-radius:14px;
  background:#fff;
  color:#708499;
  font-size:9px;
}

.hb-chat-filter button.active{
  border-color:#1678f6;
  background:#1678f6;
  color:#fff;
}

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

.hb-chat-room{
  width:100%;
  min-height:68px;
  padding:8px 12px;
  display:grid;
  grid-template-columns:42px 1fr auto;
  gap:10px;
  align-items:center;
  border:0;
  border-bottom:1px solid #edf1f5;
  background:transparent;
  text-align:left;
  cursor:pointer;
}

.hb-chat-room:hover,
.hb-chat-room.active{
  background:#edf5ff;
}

.hb-chat-avatar{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#dbeafe;
  color:#1769c7;
  font-weight:800;
}

.hb-chat-room-text{
  min-width:0;
  display:grid;
  gap:4px;
}

.hb-chat-room-text strong{
  overflow:hidden;
  font-size:11px;
  color:#1e384f;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hb-chat-room-text small{
  overflow:hidden;
  color:#8294a5;
  font-size:9px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hb-chat-unread{
  min-width:19px;
  height:19px;
  padding:0 5px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#1678f6;
  color:#fff;
  font-size:9px;
}

.hb-chat-conversation{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.hb-chat-thread-head{
  min-height:68px;
  padding:0 15px;
  display:flex;
  align-items:center;
  gap:10px;
  border-bottom:1px solid #e6ecf2;
}

.hb-chat-thread-head>div:nth-child(2){
  flex:1;
  display:grid;
  gap:3px;
}

.hb-chat-thread-head strong{
  font-size:14px;
  color:#1c354c;
}

.hb-chat-thread-head small{
  font-size:9px;
  color:#8294a7;
}

.hb-chat-thread-actions{
  display:flex;
  gap:5px;
}

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

.hb-chat-prototype-note{
  padding:6px 12px;
  background:#fff8e8;
  color:#9a6b13;
  font-size:9px;
  text-align:center;
}

.hb-chat-messages{
  flex:1;
  min-height:0;
  padding:20px;
  overflow:auto;
  background:#f5f7fa;
}

.hb-chat-message{
  max-width:70%;
  margin:0 0 14px;
  display:grid;
  gap:4px;
  justify-items:start;
}

.hb-chat-message.mine{
  margin-left:auto;
  justify-items:end;
}

.hb-chat-message-name{
  padding-left:3px;
  color:#708499;
  font-size:9px;
}

.hb-chat-message>div{
  display:flex;
  align-items:flex-end;
  gap:6px;
}

.hb-chat-message.mine>div{
  flex-direction:row-reverse;
}

.hb-chat-message p{
  margin:0;
  padding:10px 12px;
  border-radius:4px 13px 13px 13px;
  background:#fff;
  color:#293f53;
  font-size:11px;
  line-height:1.55;
  box-shadow:0 2px 5px rgba(18,47,72,.05);
}

.hb-chat-message.mine p{
  border-radius:13px 4px 13px 13px;
  background:#1678f6;
  color:#fff;
}

.hb-chat-message small{
  color:#96a5b3;
  font-size:8px;
  white-space:nowrap;
}

.hb-chat-composer{
  padding:10px 12px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:8px;
  align-items:end;
  border-top:1px solid #e6ecf2;
  background:#fff;
}

.hb-chat-compose-tools{
  display:flex;
  gap:4px;
}

.hb-chat-compose-tools button{
  width:34px;
  height:34px;
  border:1px solid #dce5ee;
  border-radius:7px;
  background:#fff;
  cursor:pointer;
}

.hb-chat-composer textarea{
  width:100%;
  min-height:42px;
  max-height:110px;
  resize:vertical;
  padding:10px;
  border:1px solid #dce5ee;
  border-radius:8px;
  outline:0;
  font:inherit;
}

.hb-chat-send{
  min-width:70px;
  height:42px;
  border:0;
  border-radius:8px;
  background:#1678f6;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.hb-chat-toast{
  position:fixed;
  left:50%;
  bottom:30px;
  z-index:12110;
  max-width:90vw;
  padding:10px 14px;
  border-radius:8px;
  background:#17334e;
  color:#fff;
  font-size:10px;
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,10px);
  transition:.2s;
}

.hb-chat-toast.show{
  opacity:1;
  transform:translate(-50%,0);
}

@media(max-width:767px){

  .hb-chat-panel{
    top:0;
    left:0;
    width:100vw;
    height:100dvh;
    border-radius:0;
    grid-template-columns:1fr;
    transform:none!important;
  }

  .hb-chat-root.open .hb-chat-panel{
    transform:none!important;
  }

  .hb-chat-list,
  .hb-chat-conversation{
    grid-column:1;
    grid-row:1;
  }

  .hb-chat-conversation{
    display:none;
  }

  .hb-chat-root.room-selected .hb-chat-list{
    display:none;
  }

  .hb-chat-root.room-selected .hb-chat-conversation{
    display:flex;
  }

  .hb-chat-mobile-back{
    display:block;
  }

  .hb-chat-message{
    max-width:86%;
  }

  .hb-chat-composer{
    grid-template-columns:1fr auto;
  }

  .hb-chat-compose-tools{
    grid-column:1 / -1;
  }

  .hb-chat-composer textarea{
    font-size:16px;
  }
}

/* HANBIT CHAT LIVE V24 */

.hb-chat-prototype-note.connected{
  background:#edf9f1;
  color:#217a45;
}

.hb-chat-empty{
  padding:22px 14px;
  color:#8a9bab;
  font-size:10px;
  text-align:center;
}

.hb-chat-empty-thread{
  margin:auto;
}

.hb-chat-message-box{
  display:grid;
  gap:5px;
}

.hb-chat-message-box p.deleted{
  color:#8c9baa;
  font-style:italic;
}

.hb-chat-file{
  max-width:300px;
  padding:8px 10px;
  display:block;
  overflow:hidden;
  border:1px solid #dce6ef;
  border-radius:8px;
  background:#fff;
  color:#315b7f!important;
  font-size:9px;
  text-decoration:none!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hb-chat-delete{
  justify-self:end;
  padding:0;
  border:0;
  background:transparent;
  color:#95a3b0;
  font-size:8px;
  cursor:pointer;
}

.hb-chat-new-modal{
  position:absolute;
  inset:0;
  z-index:5;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(7,24,40,.48);
}

.hb-chat-new-modal.show{
  display:flex;
}

.hb-chat-new-card{
  width:min(460px,94vw);
  max-height:82vh;
  padding:16px;
  display:grid;
  gap:14px;
  overflow:auto;
  border-radius:14px;
  background:#fff;
  box-shadow:0 24px 60px rgba(7,31,52,.28);
}

.hb-chat-new-card>header{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.hb-chat-new-card>header strong{
  color:#18354f;
  font-size:15px;
}

.hb-chat-new-card>header button{
  width:32px;
  height:32px;
  border:0;
  border-radius:7px;
  background:#eef3f7;
  cursor:pointer;
}

.hb-chat-new-card>label{
  display:grid;
  gap:6px;
  color:#536d83;
  font-size:9px;
  font-weight:700;
}

.hb-chat-new-card select,
.hb-chat-new-card input[type="text"],
.hb-chat-new-card input:not([type]){
  width:100%;
  min-height:39px;
  padding:0 10px;
  border:1px solid #dce5ed;
  border-radius:8px;
  background:#fff;
}

.hb-chat-new-label{
  display:block;
  margin-bottom:6px;
  color:#536d83;
  font-size:9px;
}

.hb-chat-user-list{
  max-height:280px;
  overflow:auto;
  border:1px solid #e1e8ef;
  border-radius:9px;
}

.hb-chat-user-row{
  min-height:50px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  gap:9px;
  border-bottom:1px solid #edf1f5;
  cursor:pointer;
}

.hb-chat-user-row:last-child{
  border-bottom:0;
}

.hb-chat-user-row>span{
  min-width:0;
  display:grid;
  gap:2px;
}

.hb-chat-user-row strong{
  color:#29445c;
  font-size:10px;
}

.hb-chat-user-row small{
  color:#8a9aa8;
  font-size:8px;
}

.hb-chat-new-card>footer{
  display:flex;
  justify-content:flex-end;
  gap:7px;
}

.hb-chat-new-card>footer button{
  min-height:37px;
  padding:0 13px;
  border:1px solid #dce5ed;
  border-radius:8px;
  background:#fff;
  color:#516a80;
  cursor:pointer;
}

.hb-chat-new-card>footer button.primary{
  border-color:#1678f6;
  background:#1678f6;
  color:#fff;
}

@media(max-width:767px){

  .hb-chat-new-modal{
    padding:0;
  }

  .hb-chat-new-card{
    width:100vw;
    max-width:none;
    max-height:100dvh;
    min-height:100dvh;
    border-radius:0;
  }

}
