/* Root container */
#robodesk-bot-chat-root {
  align-items: flex-end;
  bottom: 100px;
  display: flex;
  flex-direction: column-reverse; /* Chat panel will appear above the button */
  font-family: Arial, sans-serif;
  left: 100px;
  position: fixed;
  z-index: 99999;
}

/* Floating chat button */
#robodesk-bot-button {
  align-items: center;
  background: #1f8ef1;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgb(31 142 241 / 30%);
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 24px;
  font-weight: bold;
  height: 56px;
  justify-content: center;
  transition: transform 0.2s;
  user-select: none;
  width: 56px;
}

#robodesk-bot-button:hover {
  transform: scale(1.1);
}

/* Chat panel */
#robodesk-bot-panel {
  animation: slide-up 0.2s ease;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 15%);
  display: flex;
  flex-direction: column;
  margin-bottom: 12px; /* spacing above button */
  max-height: 70vh;
  overflow: hidden;
  width: 460px;
}

#robodesk-bot-panel.hidden {
  display: none;
}

/* Slide up animation */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
#robodesk-bot-header {
  align-items: center;
  background: #f7f7f8;
  display: flex;
  font-size: 14px;
  font-weight: bold;
  justify-content: space-between;
  padding: 12px;
}

/* Messages container */
#robodesk-bot-messages {
  background: white;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;
}

/* Individual messages */
.robodesk-bot-msg {
  border-radius: 8px;
  margin-bottom: 8px;
  max-width: 85%;
  overflow-wrap: break-word;
  padding: 8px 12px;
}

.robodesk-bot-user {
  align-self: flex-end;
  background: #dcf8c6;
}

.robodesk-bot-assistant {
  align-self: flex-start;
  background: #f1f1f1;
}

/* Input area */
#robodesk-bot-input {
  background: #fafafa;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  padding: 8px;
}

#robodesk-bot-user-input {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  flex: 1;
  padding: 8px;
}

#robodesk-bot-send {
  background: #1f8ef1;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  padding: 8px 12px;
  transition: background 0.2s;
}

#robodesk-bot-send:hover {
  background: #1668c1;
}

.ai-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 4px 0;
  padding: 8px;
}

.chip {
  background: rgb(71 71 237);
  border: none;
  border-radius: 999px;
  margin: 4px;
  padding: 4px 8px;
}
