/* ================= CHATBOT BASE ================= */
.jcb-chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: system-ui, sans-serif;
}

/* Floating button */
#jcb-chat-toggle {
  background: linear-gradient(135deg, #2160f3, #00aeef);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

/* Chat window */
.jcb-chat-window {
  width: 340px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  margin-top: 12px;
}

/* Open state */
.jcb-chatbot.open .jcb-chat-window {
  display: flex;
}

/* Header */
.jcb-chat-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

#jcb-chat-close {
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

/* Messages */
.jcb-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f9fafb;
}

/* Message bubbles */
.ai-msg,
.user-msg {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.ai-msg {
  background: #eef2ff;
  color: #1e293b;
}

.user-msg {
  background: #2160f3;
  color: #fff;
  align-self: flex-end;
}

/* Input */
.jcb-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
}

.jcb-chat-input input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.jcb-chat-input button {
  background: #2160f3;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
  .jcb-chat-window {
    width: calc(100vw - 32px);
    height: 70vh;
  }
}



/* AI message formatting */
.ai-msg {
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #0f172a;
}

.ai-msg h2,
.ai-msg h3,
.ai-msg h4 {
  margin: 10px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.ai-msg ul {
  margin: 8px 0 8px 18px;
  padding-left: 12px;
}

.ai-msg li {
  margin-bottom: 6px;
}

.ai-msg code {
  background: #0b1220;
  color: #e5e7eb;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}
