#chatbot-button {
  position: fixed;
  bottom: 20px;
  right: 18%;
  z-index: 9999;
  padding: 15px;
  border-radius: 50%;
  background-color: #337ab7;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

#botui-container {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 5%;
  width: 320px;
  max-height: 600px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  border: 1px solid #ccc;
  z-index: 9998;
  overflow: hidden;
}

#chat-header {
  background-color: #337ab7;
  color: white;
  padding: 10px;
  cursor: move;
  font-weight: bold;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#chat-header img {
  height: 32px;
  width: 32px;
  border-radius: 50%;
}

#botui-app {
  padding: 10px;
  font-family: Arial, sans-serif;
  flex: 1 1 auto;
  overflow-y: auto;
}

#chat-footer {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
  background-color: #f9f9f9;
  flex-shrink: 0;
}

#chat-input {
  flex-grow: 1;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#send-button {
  margin-left: 8px;
  padding: 6px 12px;
  background-color: #337ab7;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#send-button:hover {
  background-color: #005fa3;
}


.botui-message-content {
  background-color: #f1f1f1 !important;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 4px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.botui-message-content.human {
  background-color: #d9edf7 !important;
}

.disabled-input {
  background-color: #eee !important;
  color: #777 !important;
}

.disabled-button {
  background-color: #999 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.disabled-button:hover,
.disabled-button:active,
.disabled-button:focus {
  background-color: #999 !important;
  color: #fff !important;
  box-shadow: none !important;
}

#bot-spinner {
  display: none;
  width: 40%;
  padding: 8px 12px;
  margin: 10px 10px;
  background-color: #f1f1f1;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.botui-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #337ab7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: transparent;
  z-index: 10000;
}

.resize-handle-br { bottom: 0; right: 0; cursor: se-resize; }
.resize-handle-bl { bottom: 0; left: 0; cursor: sw-resize; }
.resize-handle-tr { top: 0; right: 0; cursor: ne-resize; }
.resize-handle-tl { top: 0; left: 0; cursor: nw-resize; }

.timeout-message {
  background-color: #ffeaea;
  color: #c0392b;
  border-left: 4px solid #e74c3c;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 6px 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}