/* Chat container */
#ai-chatbot-container {
  position: fixed;
  bottom: 10px;
  right: 32px;
  font-family: "Segoe UI", sans-serif;
  z-index: 9999;
}

/* Floating chat button */
#ai-chatbot-container #chat-toggle {
  all: unset;
  width: 68px;
  height: 68px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#ai-chatbot-container #chat-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#ai-chatbot-container #chat-toggle:hover {
  transform: translateY(-1px);
}

#chat-nudge {
  position: absolute;
  right: 6px;
  bottom: 56px;
  border: none;
  border-radius: 0;
  background: transparent url("/img/chatbubble.webp") no-repeat center/contain;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  width: 132px;
  height: 48px;
  padding: 0 10px 6px 0;
  box-shadow: none;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#chat-nudge::after {
  display: none;
}

#chat-nudge.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Chat box */
#chat-header {
  height: 60px;              /* fixed height */
  flex-shrink: 0;
  background: #000000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 16px;
  font-weight: 600;
}

#chat-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#chat-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* User message bubble */
.user-msg {
  background: #dcf8c6;
  padding: 10px 14px;
  border-radius: 18px 4px 18px 18px;
  margin: 6px 0 6px auto;
  max-width: 85%;
  font-size: 14px;
}

.bot-msg {
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 4px 18px 18px 18px;
  margin: 6px auto 6px 0;
  max-width: 85%;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Input area */
#user-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 14px;
}

#send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #EE1C25;
  color: #fff;
  font-weight: 600;
  cursor: pointer;

  display: flex;         /* center text/icon */
  align-items: center;
  justify-content: center;
}

#ai-chatbot-container {
  font-family: "Inter", "Segoe UI", sans-serif;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

#chat-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 360px;
  height: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5efe6;
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  #ai-chatbot-container #chat-toggle {
    width: 62px;
    height: 62px;
  }
 
  #chat-nudge {
    right: 2px;
    bottom: 46px;
    font-size: 12px;
    width: 120px;
    height: 44px;
    padding: 0 8px 5px 0;
  }

  #chat-box {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(84vw, 280px);
    height: 340px;
  }
}

/* Messages scroll */
#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Input pinned */
#chat-input {
  flex-shrink: 0;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #ddd;
}

/* Typing indicator floats */
#typing-indicator {
  position: absolute;
  bottom: 80px; /* just above input */
  left: 20px;
  font-size: 13px;
  color: #666;
}
