/* ============== CHAT FAB + WIDGET ============== */
.mlp-chat-fab{
  position:fixed !important;bottom:24px;right:24px;z-index:9400;
  width:60px;height:60px;border-radius:50%;
  background:#0a0a0a;color:#fff;border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 32px rgba(0,0,0,0.22);
  transition:transform .35s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow .3s ease, opacity .4s ease;
  opacity:0 !important;transform:translateY(16px) scale(0.9) !important;pointer-events:none;
  animation:none !important;font-family:'Nunito Sans','Roboto',sans-serif;
}
.mlp-chat-fab.is-on{opacity:1 !important;transform:translateY(0) scale(1) !important;pointer-events:auto}
.mlp-chat-fab:hover{transform:translateY(-2px) scale(1.06) !important;box-shadow:0 16px 42px rgba(0,0,0,0.3)}
.mlp-chat-fab svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.6}
.mlp-chat-fab .mlp-chat-pulse{
  position:absolute;top:-2px;right:-2px;width:14px;height:14px;border-radius:50%;
  background:#fff;opacity:0.9;
}
.mlp-chat-fab .mlp-chat-pulse::after{
  content:"";position:absolute;inset:0;border-radius:50%;background:#fff;
  animation:mlpChatPing 2s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes mlpChatPing{
  0%{transform:scale(1);opacity:0.8}
  75%,100%{transform:scale(2.4);opacity:0}
}
.mlp-chat-fab.is-open .mlp-chat-pulse{display:none}
.mlp-chat-fab.is-open svg.icon-chat{display:none}
.mlp-chat-fab svg.icon-close{display:none}
.mlp-chat-fab.is-open svg.icon-close{display:block}

@media (max-width:640px){
  .mlp-chat-fab{bottom:18px;right:18px;width:54px;height:54px}
}

/* Panel */
.mlp-chat{
  position:fixed !important;right:24px;bottom:96px;z-index:9399;
  width:380px;max-width:calc(100vw - 32px);
  height:min(560px, calc(100vh - 140px));
  background:#fff;color:#0a0a0a;
  display:flex !important;flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,0.28);
  border-radius:14px;overflow:hidden;
  opacity:0 !important;transform:translateY(20px) scale(0.98) !important;pointer-events:none;
  transition:opacity .4s ease, transform .4s cubic-bezier(0.25,0.46,0.45,0.94) !important;
  animation:none !important;
  font-family:'Nunito Sans','Roboto',sans-serif;
}
.mlp-chat.is-on{opacity:1 !important;transform:translateY(0) scale(1) !important;pointer-events:auto}
@media (max-width:640px){
  .mlp-chat{right:12px;left:12px;bottom:86px;width:auto;height:min(540px, calc(100vh - 120px))}
}

.mlp-chat-head{
  padding:18px 20px;border-bottom:1px solid #eee;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  flex-shrink:0;
}
.mlp-chat-head h4{
  font-family:'Avenir Light','Avenir Next','Avenir','Nunito Sans',sans-serif;
  font-weight:300;font-size:18px;letter-spacing:-0.015em;line-height:1.2;
  margin:0;color:#0a0a0a;
}
.mlp-chat-head .sub{
  font-size:10px;letter-spacing:0.24em;text-transform:uppercase;color:#7a7a7a;
  margin-top:3px;
}
.mlp-chat-head button{
  background:transparent;border:none;cursor:pointer;
  width:32px;height:32px;padding:0;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:#7a7a7a;transition:color .2s ease, background .2s ease;
}
.mlp-chat-head button:hover{color:#0a0a0a;background:#f3f3f3}
.mlp-chat-head button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}

.mlp-chat-body{
  flex:1;overflow-y:auto;padding:20px;
  display:flex;flex-direction:column;gap:14px;
  font-size:14px;line-height:1.55;
  scrollbar-width:thin;scrollbar-color:#ccc transparent;
}
.mlp-chat-body::-webkit-scrollbar{width:6px}
.mlp-chat-body::-webkit-scrollbar-thumb{background:#ccc;border-radius:3px}

.mlp-msg{max-width:85%;padding:12px 16px;border-radius:14px;white-space:pre-wrap;word-wrap:break-word}
.mlp-msg.bot{background:#f3f3f3;color:#0a0a0a;align-self:flex-start;border-bottom-left-radius:4px}
.mlp-msg.user{background:#0a0a0a;color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.mlp-msg a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.mlp-msg strong{font-weight:600}

.mlp-typing{
  align-self:flex-start;display:inline-flex;gap:5px;padding:14px 18px;
  background:#f3f3f3;border-radius:14px;border-bottom-left-radius:4px;
}
.mlp-typing span{width:7px;height:7px;background:#0a0a0a;border-radius:50%;opacity:0.4;animation:mlpChatDot 1.4s infinite}
.mlp-typing span:nth-child(2){animation-delay:0.2s}
.mlp-typing span:nth-child(3){animation-delay:0.4s}
@keyframes mlpChatDot{0%,60%,100%{opacity:0.4;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

.mlp-chat-input{
  padding:14px 16px 16px;border-top:1px solid #eee;flex-shrink:0;
  display:flex;gap:10px;align-items:flex-end;background:#fff;
}
.mlp-chat-input textarea{
  flex:1;border:1px solid #e0e0e0;border-radius:10px;
  padding:11px 14px;font-family:inherit;font-size:14px;font-weight:300;
  resize:none;outline:none;color:#0a0a0a;
  max-height:120px;min-height:42px;
  transition:border-color .2s ease;
  line-height:1.5;
}
.mlp-chat-input textarea:focus{border-color:#0a0a0a}
.mlp-chat-input button{
  background:#0a0a0a;color:#fff;border:none;cursor:pointer;
  width:42px;height:42px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  transition:background .2s ease, opacity .2s ease;flex-shrink:0;
}
.mlp-chat-input button:hover:not(:disabled){background:#1a1a1a}
.mlp-chat-input button:disabled{opacity:0.4;cursor:not-allowed}
.mlp-chat-input button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}

.mlp-chat-foot{
  padding:8px 16px 12px;font-size:10px;letter-spacing:0.08em;color:#b0b0b0;text-align:center;
  background:#fff;flex-shrink:0;
}
.mlp-chat-foot a{color:#7a7a7a;text-decoration:none}
.mlp-chat-foot a:hover{text-decoration:underline}

@media (prefers-reduced-motion: reduce){
  .mlp-chat-fab,.mlp-chat{transition:opacity .2s ease !important}
  .mlp-chat-fab .mlp-chat-pulse::after{animation:none}
}
