#khbd-chatbot-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

#khbd-chatbot-root * {
  box-sizing: border-box;
}

.khbd-fab {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
  font-size: 22px;
}

.khbd-fab:hover {
  transform: translateY(-1px);
}

.khbd-panel {
  display: none;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 100px));
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

.khbd-panel.open {
  display: flex;
}

.khbd-head {
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, #1e1b4b, #4f46e5 60%, #06b6d4);
}

.khbd-head strong {
  display: block;
  font-size: 15px;
}

.khbd-head span {
  font-size: 12px;
  opacity: 0.9;
}

.khbd-log {
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.khbd-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 14px;
  white-space: pre-wrap;
}

.khbd-msg.bot {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.khbd-msg.user {
  margin-left: auto;
  color: #fff;
  background: #4f46e5;
  border-bottom-right-radius: 4px;
}

.khbd-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.khbd-form textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 90px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
}

.khbd-form button {
  border: 0;
  border-radius: 12px;
  background: #4f46e5;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}
