
.mt-chat{position:fixed;right:18px;bottom:18px;z-index:90;font-family:Arial,"Helvetica Neue",sans-serif}
.mt-chat__button{border:0;border-radius:999px;background:#111;color:#fff;min-height:54px;padding:0 20px;display:flex;align-items:center;gap:10px;font-weight:900;box-shadow:0 18px 45px rgba(0,0,0,.28);cursor:pointer}
.mt-chat__dot{width:10px;height:10px;background:#10b981;border-radius:50%;box-shadow:0 0 0 6px rgba(16,185,129,.18)}
.mt-chat__panel{width:min(390px,calc(100vw - 24px));height:570px;max-height:calc(100vh - 92px);background:#fff;border:1px solid #e8e4dc;border-radius:22px;box-shadow:0 24px 75px rgba(0,0,0,.28);overflow:hidden;display:flex;flex-direction:column}
.mt-chat__panel[hidden]{display:none}
.mt-chat__head{padding:16px 16px 14px;color:#fff;background:linear-gradient(135deg,#111,#2b2b2b);display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.mt-chat__head strong{display:block;font-size:17px}.mt-chat__head small{display:block;color:#d8d8d8;margin-top:3px;font-size:12px;line-height:1.25}
.mt-chat__close{width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:#fff;font-size:24px;line-height:1;cursor:pointer}
.mt-chat__messages{flex:1;overflow:auto;padding:16px;background:#faf8f2;display:flex;flex-direction:column;gap:10px}
.mt-chat-msg{max-width:86%;padding:10px 12px;border-radius:16px;font-size:14px;line-height:1.38;white-space:pre-wrap}
.mt-chat-msg.bot{align-self:flex-start;background:#fff;border:1px solid #eee5d6;color:#111}
.mt-chat-msg.user{align-self:flex-end;background:#111;color:#fff}
.mt-chat-msg.manager{align-self:flex-start;background:#e8f2ff;border:1px solid #cfe4ff;color:#0f2742}
.mt-chat-msg__time{display:block;margin-top:5px;font-size:10px;opacity:.55}
.mt-chat__form{display:flex;gap:8px;padding:12px;border-top:1px solid #eee5d6;background:#fff}
.mt-chat__form input{flex:1;min-width:0;border:1px solid #ddd5c7;border-radius:12px;padding:12px;font:inherit}
.mt-chat__form button{border:0;border-radius:12px;background:#111;color:#fff;padding:0 14px;font-weight:900;cursor:pointer}
.mt-chat__quick{padding:0 12px 12px;display:flex;flex-wrap:wrap;gap:7px;background:#fff}
.mt-chat__quick button{border:1px solid #e2d8c8;background:#fbf8f1;border-radius:999px;padding:7px 10px;cursor:pointer;font-size:12px}
@media(max-width:720px){.mt-chat{left:12px;right:12px;bottom:12px}.mt-chat__button{margin-left:auto}.mt-chat__panel{width:100%;height:calc(100vh - 88px)}}

.mt-chat-contact{
  max-width:92%;
  align-self:flex-start;
  background:#fff;
  border:1px solid #e7dcc9;
  border-radius:16px;
  padding:12px;
  display:grid;
  gap:8px;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}
.mt-chat-contact strong{font-size:14px}
.mt-chat-contact input{
  width:100%;
  border:1px solid #ddd5c7;
  border-radius:10px;
  padding:10px;
  font:inherit;
  box-sizing:border-box;
}
.mt-chat-contact button{
  border:0;
  border-radius:10px;
  background:#111;
  color:#fff;
  padding:11px 12px;
  font-weight:900;
  cursor:pointer;
}
.mt-chat-contact .mt-chat-contact__link{
  background:#fbf8f1;
  color:#111;
  border:1px solid #e2d8c8;
}
.mt-chat-contact small{color:#777;font-size:12px;line-height:1.3}

/* v18 tent button */
.mt-chat__button--tent{
  min-height:66px!important;
  padding:0 20px 0 14px!important;
  background:linear-gradient(135deg,#0f172a,#111)!important;
  border:1px solid rgba(255,255,255,.16)!important;
  box-shadow:0 18px 45px rgba(0,0,0,.34)!important;
}
.mt-chat__tent{
  position:relative;
  width:48px;
  height:38px;
  display:inline-block;
  flex:0 0 48px;
}
.mt-chat__tent::before{
  content:"";
  position:absolute;
  left:3px;
  top:3px;
  width:42px;
  height:30px;
  background:linear-gradient(135deg,#ffffff 0 50%,#d9c28f 50% 100%);
  clip-path:polygon(50% 0,100% 100%,0 100%);
  border-radius:3px;
  box-shadow:0 5px 13px rgba(0,0,0,.25);
}
.mt-chat__tent::after{
  content:"";
  position:absolute;
  left:21px;
  top:17px;
  width:9px;
  height:16px;
  background:#111;
  border-radius:8px 8px 0 0;
  box-shadow:-13px 12px 0 -8px #ff3b30,13px 12px 0 -8px #1d4ed8;
}
.mt-chat__button--tent span:last-child{
  font-size:15px;
  line-height:1.1;
}

/* v22 compact quick answers without vertical scroll */
.mt-chat__quick{
  padding:0 10px 10px!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  max-height:none!important;
  overflow:visible!important;
  align-content:flex-start!important;
}
.mt-chat__quick button{
  flex:0 1 auto!important;
  max-width:100%!important;
  border:1px solid #e2d8c8!important;
  background:#fbf8f1!important;
  border-radius:999px!important;
  padding:6px 9px!important;
  cursor:pointer!important;
  font-size:12px!important;
  line-height:1.1!important;
  white-space:nowrap!important;
  transition:transform .12s ease, background .12s ease, border-color .12s ease;
}
.mt-chat__quick button:hover{
  transform:translateY(-1px);
  background:#f1e4cd!important;
  border-color:#d0bd9b!important;
}
@media(max-width:720px){
  .mt-chat__quick{
    gap:5px!important;
    padding:0 8px 8px!important;
  }
  .mt-chat__quick button{
    font-size:11px!important;
    padding:6px 8px!important;
  }
  .mt-chat__form{
    gap:6px!important;
    padding:9px!important;
  }
  .mt-chat__form input{
    padding:10px!important;
  }
  .mt-chat__form button{
    padding:0 10px!important;
    font-size:13px!important;
  }
}


/* v24 chat avatars */
.mt-chat-row{
  display:flex;
  align-items:flex-end;
  gap:8px;
  max-width:96%;
}
.mt-chat-row.user{
  align-self:flex-end;
  flex-direction:row-reverse;
}
.mt-chat-row.bot,
.mt-chat-row.manager{
  align-self:flex-start;
}
.mt-chat-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  object-fit:cover;
  flex:0 0 32px;
  background:#fff;
  border:1px solid #e8dfd0;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}
.mt-chat-row .mt-chat-msg{
  max-width:100%;
}
.mt-chat-author{
  display:block;
  font-size:11px;
  line-height:1.1;
  font-weight:900;
  opacity:.72;
  margin-bottom:4px;
}
.mt-chat-msg.user .mt-chat-author{
  color:#fff;
  opacity:.72;
}
.mt-chat-msg.manager .mt-chat-author{
  color:#0f2742;
}
.mt-chat-msg.bot .mt-chat-author{
  color:#111;
}
@media(max-width:720px){
  .mt-chat-avatar{
    width:28px;
    height:28px;
    flex-basis:28px;
  }
  .mt-chat-row{
    gap:6px;
    max-width:98%;
  }
}


/* v25 manager avatar in chat header */
.mt-chat__head{
  align-items:center!important;
}
.mt-chat__head-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  flex:0 0 42px;
  background:#fff;
  border:1px solid rgba(255,255,255,.35);
  box-shadow:0 6px 16px rgba(0,0,0,.18);
}
.mt-chat__head-info{
  flex:1;
  min-width:0;
}
.mt-chat--manager-connected .mt-chat__head{
  background:linear-gradient(135deg,#0f2742,#111)!important;
}
.mt-chat--manager-connected .mt-chat__head-avatar{
  box-shadow:0 0 0 3px rgba(16,185,129,.32),0 6px 16px rgba(0,0,0,.18);
}
@media(max-width:720px){
  .mt-chat__head-avatar{
    width:38px;
    height:38px;
    flex-basis:38px;
  }
}
