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

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

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

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

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

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

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

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

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

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

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

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

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

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

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