.floating-chatbot {
  width: 440px;
}

@media (max-width: 550px) {
  .floating-chatbot {
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
  }
}

.floating-chatbot-button {
  width: auto;
  height: auto;
  padding: 0 16px 0 4px;
  background: url(/gradient) 50% / cover no-repeat !important;
  border-radius: 10px;
}

.floating-chatbot-button::before {
  position: absolute;
  z-index: -1;
  inset: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  content: "";
}

.floating-chatbot-button::after {
  padding-bottom: 2px;
  color: #000;
  font: 700 16px Avenir Normal, sans-serif;
  text-wrap: nowrap;
  content: "Ask our AI agent";
}

.floating-chatbot-button svg {
  fill: #000 !important;
  height: 40px !important;
  transform: scaleX(0.9);
}

.pre-chat-message {
  position: fixed;
  right: 25px;
  bottom: 70px;
  padding: 8px 12px;
  background: #fff;
  color: #181d27;
  border-radius: 8px;
  box-shadow:
    0 2px 2px -1px rgba(10, 13, 18, 0.04),
    0 4px 6px -2px rgba(10, 13, 18, 0.03),
    0 12px 16px -4px rgba(10, 13, 18, 0.08);
  font: 700 12px Avenir Normal, sans-serif;
}

.pre-chat-message::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  z-index: -1;
  display: block;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 1px;
  transform: rotate(45deg) translateY(50%);
  content: "";
}

.pre-chat-message .close-pre-chat-message,
.pre-chat-message .close-pre-chat-message:focus {
  padding-bottom: 2px;
  width: 16px;
  height: 16px;
  min-width: unset;
  min-height: unset;
  background: #fff;
  color: #181d27;
  font-size: 12px;
  box-shadow: 0 4px 16px 0 rgba(10, 13, 18, 0.18);
}

@media (max-width: 550px) {
  .pre-chat-message {
    right: 10px;
    bottom: 55px;
  }
}

.mxchat-chatbot-wrapper .chatbot-top-bar {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #000 !important;
}

.mxchat-chatbot-wrapper .chatbot-top-bar .chatbot-title {
  padding: 0;
  font: 700 18px Avenir Normal, sans-serif;
}

.mxchat-chatbot-wrapper .chatbot-top-bar button.exit-chat {
  width: 12px;
  min-width: unset;
}

.mxchat-chatbot-wrapper .chatbot-top-bar .chatbot-title-container {
    justify-content: flex-start;
    gap: 1.5rem;
}

.mxchat-chatbot-wrapper .chatbot-top-bar .chat-mode-indicator {
    border-radius: 999px;
    padding: 1px 8px;
    background: rgb(148 148 148) !important;
}

.mxchat-chatbot .chat-container .chat-box {
  padding: 20px;
  margin-right: 5px;
}

.mxchat-chatbot .chat-container .chat-box::-webkit-scrollbar {
  width: 12px;
}

.mxchat-chatbot .chat-container div.bot-message,
.mxchat-chatbot .chat-container div.user-message {
  position: relative;
  max-width: 288px;
  padding: 10px 14px;
  margin-bottom: 19px !important;
  overflow: visible !important;
  font: 400 16px Avenir Normal, sans-serif;
  overflow-wrap: break-word;
}

.mxchat-chatbot .chat-container div.bot-message {
  left: 52px;
  background: rgba(24, 29, 39, 1) !important;
  border-radius: 0 8px 8px 8px !important;
}

.mxchat-chatbot .chat-container div.bot-message::before {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 40px;
  height: 40px;
  background: url(/ai-for-good-logo-circle-small) 50% / cover no-repeat !important;
  border-radius: 50%;
  transform: translateX(-52px);
  content: "";
}

.mxchat-chatbot .chat-container div.user-message {
  border: 1px solid rgba(233, 234, 235, 1);
  border-radius: 8px 0 8px 8px !important;
  box-shadow: none;
}

.mxchat-chatbot .chat-container .input-container {
  padding: 0;
  border: 1px solid rgba(223, 234, 235, 1);
  border-radius: 999px;
  margin: 0 20px 8px;
}

.mxchat-chatbot .chat-container .input-container .chat-input {
  height: 1lh !important;
  padding: 10px 16px !important;
  border: none !important;
  box-sizing: content-box !important;
  background: transparent !important;
}

.mxchat-chatbot .chat-container .input-container .chat-input::placeholder {
  text-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mxchat-chatbot .chat-container .input-container #send-button-default.send-button {
  position: static;
  width: 16px;
  padding: 0 16px;
  box-sizing: content-box;
  filter: invert(34%) sepia(8%) saturate(695%) hue-rotate(182deg) brightness(92%) contrast(86%); /* rgba(83, 88, 98, 1) */
  transform: none;
}

.mxchat-chatbot .chat-container .mxchat-popular-questions {
  display: none;
}

/* Modern thinking loader */
.aifg-thinking-loader {
  line-height: 1.5;
}

.aifg-thinking-text {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.aifg-thinking-dots {
  display: inline-flex;
  vertical-align: baseline;
  gap: 3px;
  margin-left: 4px;
  padding-bottom: 2px;
}

.aifg-thinking-dots span {
  display: inline-block;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: aifg-wave 1.4s ease-in-out infinite;
}

.aifg-thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.aifg-thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes aifg-wave {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
