/* Mintrixo single-thread chatbot */
.mx-chat-launcher {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0F766E, #115E59);
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.28);
  cursor: pointer;
}
.mx-chat-launcher svg { width: 1.15rem; height: 1.15rem; }
.mx-chat-panel {
  position: fixed;
  right: 1.1rem;
  bottom: 4.75rem;
  z-index: 70;
  width: min(420px, calc(100vw - 1.5rem));
  height: min(620px, calc(100vh - 6.5rem));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}
.mx-chat-panel.is-open { display: flex; }
.mx-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, #0F766E, #115E59);
  color: #fff;
}
.mx-chat-head h2 { margin: 0; font-size: 1rem; font-weight: 800; }
.mx-chat-head p { margin: 0.15rem 0 0; font-size: 0.75rem; color: #ccfbf1; }
.mx-chat-close {
  border: 0;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border-radius: 0.55rem;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.mx-chat-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mx-chat-start { padding: 1rem; overflow: auto; }
.mx-chat-active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mx-chat-messages {
  flex: 1;
  overflow: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #F8FAFC;
}
.mx-bubble {
  max-width: 92%;
  border-radius: 0.9rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.mx-bubble-label {
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  opacity: 0.8;
}
.mx-chat-messages .mx-bubble { display: block; }
.mx-bubble.ai, .mx-bubble.bot { align-self: flex-start; background: #fff; border: 1px solid #E5E7EB; color: #0F172A; }
.mx-bubble.visitor { align-self: flex-end; background: #0F766E; color: #fff; }
.mx-bubble.agent { align-self: flex-start; background: #FFF7ED; border: 1px solid #FDBA74; color: #9A3412; }
.mx-bubble.system { align-self: center; background: transparent; color: #64748B; font-size: 0.75rem; text-align: center; max-width: 100%; }
.mx-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 0.28rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid #E5E7EB;
}
.mx-typing span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #94A3B8;
  animation: mx-bounce 1s infinite ease-in-out;
}
.mx-typing span:nth-child(2) { animation-delay: 0.15s; }
.mx-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes mx-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}
.mx-chat-compose {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid #E5E7EB;
  background: #fff;
}
.mx-chat-compose input {
  flex: 1;
  border: 1px solid #E5E7EB;
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
}
.mx-chat-compose button, .mx-chat-start button[type="submit"] {
  border: 0;
  border-radius: 0.7rem;
  background: #0F766E;
  color: #fff;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
}
.mx-chat-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid #E5E7EB;
  background: #fff;
}
.mx-chat-connect {
  flex: 1;
  border: 0;
  border-radius: 0.7rem;
  background: #EA580C;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}
.mx-chat-connect:disabled { opacity: 0.55; cursor: default; }
.mx-chat-end {
  border: 1px solid #E5E7EB;
  border-radius: 0.7rem;
  background: #fff;
  color: #64748B;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}
.mx-chat-start label { display:block; font-size:0.8rem; font-weight:700; color:#334155; margin-bottom:0.3rem; }
.mx-chat-start input, .mx-chat-start textarea {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  font: inherit;
}
.mx-chat-note { font-size: 0.75rem; color: #64748B; margin-top: 0.75rem; }
.mx-chat-status { font-size: 0.78rem; color: #0F766E; padding: 0.45rem 0.9rem; background: #ECFDF5; border-bottom: 1px solid #D1FAE5; }
@media (max-width: 480px) {
  .mx-chat-panel { right: 0.5rem; left: 0.5rem; width: auto; bottom: 4.5rem; }
}
