[hidden]{
  display:none !important;
}

#nt-chat-launcher{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:99998;
  width:64px;
  height:64px;
  border:none;
  border-radius:999px;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(180deg,#9e39ff 0%,#7709ff 100%);
  box-shadow:0 12px 30px rgba(119,9,255,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#nt-chat-launcher:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 34px rgba(119,9,255,.40);
}

#nt-chat-launcher.is-open{
  background:linear-gradient(180deg,#8f28ff 0%,#6f00ff 100%);
}

.nt-chat-launcher-face{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:opacity .16s ease, transform .16s ease;
}

.nt-chat-launcher-face--logo{
  opacity:1;
  transform:scale(1);
}

.nt-chat-launcher-face--toggle{
  opacity:0;
  transform:scale(.88);
}

#nt-chat-launcher.is-open .nt-chat-launcher-face--logo{
  opacity:0;
  transform:scale(.88);
}

#nt-chat-launcher.is-open .nt-chat-launcher-face--toggle{
  opacity:1;
  transform:scale(1);
}

.nt-chat-launcher-logo{
  width:28px;
  height:28px;
  object-fit:contain;
  display:block;
}

.nt-chat-launcher-toggle{
  width:24px;
  height:24px;
  display:block;
}

.nt-chat-launcher-badge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ff4d6d;
  color:#fff;
  font-size:11px;
  font-weight:700;
  box-shadow:0 6px 16px rgba(255,77,109,.35);
}

#nt-chat-panel{
  position:fixed;
  right:20px;
  bottom:96px;
  z-index:99999;
  width:380px;
  max-width:calc(100vw - 24px);
  height:640px;
  max-height:calc(100vh - 120px);
  display:none;
  flex-direction:column;
  overflow:hidden;
  border-radius:24px;
  background:#101014;
  color:#f4f4f7;
  box-shadow:0 28px 70px rgba(0,0,0,.48);
  border:1px solid rgba(255,255,255,.08);
}

#nt-chat-panel.nt-open{
  display:flex;
}

.nt-chat-head{
  min-height:76px;
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:linear-gradient(180deg,#992eff 0%,#7709ff 100%);
  color:#fff;
}

.nt-chat-head-left{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:10px;
}

.nt-chat-head.has-back .nt-chat-head-left{
  gap:8px;
}

.nt-chat-title{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.nt-chat-title strong{
  font-size:18px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.nt-chat-title span{
  font-size:12px;
  opacity:.92;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.nt-chat-head-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
}

.nt-chat-icon-btn,
.nt-chat-close,
.nt-chat-toast-close{
  width:36px;
  height:36px;
  border:none;
  border-radius:10px;
  background:transparent;
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}

.nt-chat-icon-btn svg,
.nt-chat-close svg,
.nt-chat-toast-close svg,
.nt-chat-primary-card-arrow svg{
  width:20px;
  height:20px;
  display:block;
}

.nt-chat-icon-btn:hover,
.nt-chat-close:hover{
  background:rgba(255,255,255,.12);
}

.nt-chat-screen{
  flex:1 1 auto;
  min-height:0;
}

.nt-chat-screen--inbox{
  overflow:auto;
  padding:18px 0 20px;
  background:#101014;
}

.nt-chat-inbox-hero{
  padding:0 18px 18px;
}

.nt-chat-inbox-hero h3{
  margin:0 0 8px;
  font-size:24px;
  line-height:1.1;
  color:#fff;
}

.nt-chat-inbox-hero p{
  margin:0;
  color:#a7a7b3;
  font-size:14px;
  line-height:1.45;
}

.nt-chat-section{
  padding:0 18px;
  margin-bottom:20px;
}

.nt-chat-section-title{
  font-size:12px;
  font-weight:700;
  color:#8f8f9b;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin:0 0 10px;
}

.nt-chat-primary-card{
  width:100%;
  border:none;
  cursor:pointer;
  border-radius:16px;
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  text-align:left;
  background:#17171d;
  color:#fff;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 24px rgba(0,0,0,.2);
}

.nt-chat-primary-card-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.nt-chat-primary-card-copy strong{
  font-size:16px;
  font-weight:700;
}

.nt-chat-primary-card-copy span{
  font-size:13px;
  line-height:1.35;
  color:#a7a7b3;
}

.nt-chat-primary-card-arrow{
  flex:0 0 auto;
  width:28px;
  height:28px;
  color:#a45cff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.nt-chat-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.nt-chat-list-item{
  width:100%;
  border:none;
  border-radius:16px;
  background:#17171d;
  cursor:pointer;
  padding:14px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  text-align:left;
  border:1px solid rgba(255,255,255,.08);
}

.nt-chat-list-item.is-selected{
  border-color:rgba(119,9,255,.58);
  box-shadow:0 0 0 3px rgba(119,9,255,.14);
}

.nt-chat-list-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.nt-chat-list-copy strong{
  font-size:14px;
  line-height:1.25;
  color:#f5f5f7;
}

.nt-chat-list-copy span{
  font-size:13px;
  line-height:1.35;
  color:#a4a4af;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.nt-chat-list-side{
  flex:0 0 auto;
  min-width:82px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

.nt-chat-list-date{
  font-size:12px;
  color:#8a8a95;
  white-space:nowrap;
}

.nt-chat-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.nt-chat-chip.is-open{ background:rgba(31,201,109,.12); color:#5ee6a1; }
.nt-chat-chip.is-pending{ background:rgba(255,179,26,.16); color:#ffcf74; }
.nt-chat-chip.is-closed{ background:rgba(255,255,255,.08); color:#d4d4db; }

.nt-chat-screen--thread{
  background:#131319;
  display:flex;
  flex-direction:column;
}

.nt-chat-status{
  margin:12px 14px 0;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  background:#2a1620;
  color:#ff8fa6;
  border:1px solid rgba(255,77,109,.18);
}

.nt-chat-messages{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:18px 16px 14px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.nt-chat-empty{
  padding:14px 16px;
  border-radius:16px;
  background:#17171d;
  color:#a6a6b0;
  font-size:13px;
  line-height:1.45;
  border:1px solid rgba(255,255,255,.06);
}

.nt-chat-empty--compact{
  padding:12px 14px;
}

.nt-chat-message{
  max-width:84%;
  border-radius:18px;
  padding:10px 12px;
  box-shadow:0 4px 12px rgba(0,0,0,.1);
}

.nt-chat-message--operator{
  align-self:flex-start;
  background:#1a1a22;
  color:#f4f4f7;
  border-bottom-left-radius:8px;
  border:1px solid rgba(255,255,255,.05);
}

.nt-chat-message--visitor{
  align-self:flex-end;
  background:linear-gradient(180deg,#9e39ff 0%,#7709ff 100%);
  color:#fff;
  border-bottom-right-radius:8px;
}

.nt-chat-message-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:5px;
  font-size:11px;
  opacity:.8;
}

.nt-chat-message-body{
  font-size:14px;
  line-height:1.5;
  word-break:break-word;
}

.nt-chat-live-hint{
  min-height:18px;
  padding:0 18px 8px;
  font-size:12px;
  color:#8f8f9b;
  opacity:0;
  transition:opacity .18s ease;
}

.nt-chat-live-hint.is-active{
  opacity:1;
}

.nt-chat-foot{
  background:#101014;
  border-top:1px solid rgba(255,255,255,.08);
  padding:12px 14px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.nt-chat-guest-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.nt-chat-foot input,
.nt-chat-foot textarea{
  width:100%;
  box-sizing:border-box;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.1);
  background:#17171d;
  color:#f5f5f7;
  padding:12px 14px;
  font:inherit;
  outline:none;
}

.nt-chat-foot textarea{
  min-height:104px;
  resize:none;
}

.nt-chat-foot input::placeholder,
.nt-chat-foot textarea::placeholder{
  color:#7f7f8a;
}

.nt-chat-foot input:focus,
.nt-chat-foot textarea:focus{
  border-color:#8c2dff;
  box-shadow:0 0 0 3px rgba(119,9,255,.16);
}

.nt-chat-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.nt-chat-compose-hint{
  flex:1 1 auto;
  font-size:12px;
  line-height:1.35;
  color:#8a8a95;
}

.nt-chat-compose-hint.is-error{
  color:#ff8fa6;
}

#nt-chat-send-btn{
  flex:0 0 auto;
  min-width:108px;
  height:44px;
  border:none;
  border-radius:14px;
  cursor:pointer;
  color:#fff;
  font-size:16px;
  font-weight:700;
  background:linear-gradient(180deg,#9e39ff 0%,#7709ff 100%);
}

#nt-chat-send-btn:disabled{
  opacity:.65;
  cursor:default;
}

.nt-chat-toast{
  position:fixed;
  right:20px;
  bottom:96px;
  z-index:99997;
  width:300px;
  max-width:calc(100vw - 24px);
  padding:12px 12px 10px;
  border-radius:16px;
  background:#18181d;
  color:#fff;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 16px 40px rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .18s ease, transform .18s ease;
}

.nt-chat-toast.nt-visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.nt-chat-toast-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.nt-chat-toast-title{
  font-size:12px;
  font-weight:700;
  opacity:.78;
}

.nt-chat-toast-close{
  width:28px;
  height:28px;
  border-radius:8px;
  color:#d7d7df;
}

.nt-chat-toast-close:hover{
  background:rgba(255,255,255,.08);
}

.nt-chat-toast-close svg{
  width:16px;
  height:16px;
}

.nt-chat-toast-body{
  width:100%;
  border:none;
  background:transparent;
  padding:0;
  margin:0;
  text-align:left;
  color:inherit;
  cursor:pointer;
}

.nt-chat-toast-text{
  font-size:13px;
  line-height:1.45;
  color:#f5f5f7;
}

@media (max-width:640px){
  #nt-chat-launcher{
    right:14px;
    bottom:14px;
    width:60px;
    height:60px;
  }

  #nt-chat-panel{
    right:10px;
    left:10px;
    bottom:84px;
    width:auto;
    max-width:none;
    height:min(78vh,700px);
  }

  .nt-chat-head{
    min-height:72px;
    padding:0 12px;
  }

  .nt-chat-guest-fields{
    grid-template-columns:1fr;
  }

  .nt-chat-actions{
    flex-direction:column;
    align-items:stretch;
  }

  #nt-chat-send-btn{
    width:100%;
  }

  .nt-chat-list-item{
    padding:13px 12px;
  }

  .nt-chat-list-side{
    min-width:70px;
  }

  .nt-chat-toast{
    right:10px;
    left:10px;
    bottom:84px;
    width:auto;
    max-width:none;
  }
}
