/* FWTC AI chatbot widget */

.chatbot-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: #b59573;
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transition: 0.3s ease;
}

.chatbot-toggle:hover {
  background-color: #866a4e;
  color: #fff;
}

.chatbot-toggle-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #4caf50;
  border: 2px solid #fff;
}

.chatbot-window {
  position: fixed;
  right: 24px;
  bottom: 94px;
  width: 350px;
  max-width: calc(100vw - 48px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: "Google Sans", sans-serif;
}

.chatbot-window.open {
  display: flex;
}

/* Header */

.chatbot-header {
  background-color: #000;
  color: #fff;
  padding: 16px 14px 16px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #fff;
  flex-shrink: 0;
}

.chatbot-header h6 {
  margin: 0;
  font-family: "Google Sans", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: #fff;
}

.chatbot-status {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chatbot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4caf50;
  box-shadow: 0 0 0 rgba(76, 175, 80, 0.6);
  animation: chatbot-pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes chatbot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Messages */

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: #fff;
}

.chatbot-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chatbot-row.user {
  justify-content: flex-end;
}

.chatbot-row.error {
  justify-content: center;
}

.chatbot-row-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #f2ede7;
  flex-shrink: 0;
}

.chatbot-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.chatbot-row.assistant .chatbot-msg {
  background-color: #f7f1ea;
  color: #222;
  border-bottom-left-radius: 4px;
}

.chatbot-row.user .chatbot-msg {
  background-color: #b59573;
  color: #000;
  border-bottom-right-radius: 4px;
}

.chatbot-row.error .chatbot-msg {
  background-color: #f8d7da;
  color: #842029;
  font-size: 12.5px;
}

.chatbot-row.typing .chatbot-msg {
  background-color: #f7f1ea;
  color: #888;
  font-style: italic;
}

/* Quick replies */

.chatbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #f0ebe4;
}

.chatbot-quick-replies.hidden {
  display: none;
}

.chatbot-chip {
  background-color: #fff;
  border: 1px solid #b59573;
  color: #866a4e;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.2s ease;
}

.chatbot-chip:hover {
  background-color: #b59573;
  color: #000;
}

/* Input */

.chatbot-input-row {
  display: flex;
  align-items: center;
  border-top: 1px solid #f0ebe4;
  padding: 12px 14px;
  gap: 10px;
}

.chatbot-input-row input {
  flex: 1;
  border: 1.5px solid #e2ddd6;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  outline: none;
  transition: 0.2s ease;
}

.chatbot-input-row input:focus {
  border-color: #b59573;
  box-shadow: 0 0 0 3px rgba(181, 149, 115, 0.18);
}

.chatbot-send {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s ease;
}

.chatbot-send:hover {
  background-color: #b59573;
  color: #000;
}

.chatbot-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.chatbot-disclaimer {
  margin: 0;
  padding: 0 14px 12px;
  text-align: center;
  font-size: 11px;
  color: #999;
}
