/* Chat bubble & window */
#msx-chatbot-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1f7ae0;
  color: #fff;
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; z-index: 9999;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
#msx-chatbot-bubble:hover { transform: scale(1.06); }
#msx-chatbot-bubble.pos-left { right: auto; left: 20px; }

#msx-chatbot-window {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 340px; height: 440px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  display: none; flex-direction: column;
  overflow: hidden; z-index: 9999;
}
#msx-chatbot-window.hidden { display: none; }
#msx-chatbot-window:not(.hidden) { display: flex; }

.msx-header {
  height: 44px; background: #f7f7f7; border-bottom: 1px solid #e5e5e5;
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
}
.msx-title { font-weight: 600; }
.msx-min { background: transparent; border: 0; font-size: 18px; cursor: pointer; }

.msx-messages {
  flex: 1; padding: 10px; overflow-y: auto; font-size: 14px; line-height: 1.45;
}
.msx-msg { margin: 6px 0; padding: 8px 12px; border-radius: 10px; max-width: 80%; clear: both; }
.msx-msg.user { background: #e9f3ff; float: right; }
.msx-msg.bot  { background: #f2f2f2; float: left; white-space: pre-wrap; }

.msx-input { display: flex; border-top: 1px solid #eee; }
#msx-chatbot-input { flex: 1; border: 0; padding: 10px; font-size: 14px; }
#msx-chatbot-send { border: 0; padding: 0 14px; background: #1f7ae0; color: #fff; cursor: pointer; }

#msx-lead-form { padding: 10px; border-top: 1px solid #eee; }
#msx-lead-form.hidden { display: none; }
#msx-lead-form input, #msx-lead-form textarea {
  width: 100%; margin: 6px 0; padding: 8px; font-size: 14px; border: 1px solid #ddd; border-radius: 6px;
}
.msx-lead-submit { background: #1f7ae0; color: #fff; border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
