/* LucenPress Chatbot Widget */
#lucenpress-chat-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  font-family: 'Segoe UI', sans-serif;
  z-index: 9999;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Tooltip */
#chat-launcher {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#chat-tooltip {
  background: #F59C45;
  color: white;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 20px;
  margin-bottom: 6px;
  white-space: nowrap;
}

/* Chat Button */
#chat-button {
  background: #F59C45;
  width: 100px;
  height: 100px;
  border: none;
  border-radius: 70%;
  color: white;
  font-weight: bold;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

#chat-button:hover {
  transform: scale(1.1);
  background: #b38e3f;
}

/* Chat Window */
#chat-window {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 400px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 15px;
  border: 1px solid #ddd;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  padding: 15px;
  z-index: 9999;
  color: #222;
  transition: all 0.3s ease;
}

#chat-window.open {
  display: flex !important;
  flex-direction: column;
}

/* Chat Header */
#chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#minimize-chat {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #333;
}

/* Inputs & Buttons */
#chat-window input,
#chat-window button {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 18px;
  color: #000;
  background-color: #fff;
}

#chat-window input::placeholder {
  color: #777;
}

#chat-window h4 {
  margin-top: 0;
  color: #333;
  font-weight: 600;
  font-size: 18px;
}

#chat-window button {
  background-color: #F59C45;
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

#chat-window button:hover {
  background-color: #F59C45;
}

/* Chat Messages */
#chat-messages {
  height: 280px;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f9f9f9;
  padding: 10px 1rem;
  border-radius: 10px;
  border: 1px solid #eee;
  margin-bottom: 10px;
  scroll-behavior: smooth;
}

#chat-messages div {
  margin: 5px 0;
  font-size: 14px;
  line-height: 1.4;
}

#chat-messages .user {
  background: #e0f7fa;
  border-radius: 15px 15px 0 15px;
  display: inline-block;
  padding: 8px 12px;
  margin: 5px 0;
  max-width: 80%;
}

#chat-messages .bot {
  background: #f3f3f3;
  border-radius: 15px 15px 15px 0;
  display: inline-block;
  padding: 8px 12px;
  margin: 5px 0;
  max-width: 80%;
}

#chat-messages .typing {
  font-style: italic;
  color: #888;
}

/* Animation */
.fade-in {
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#chat-input-area {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 10px;
}

/* Responsive */
@media (max-width: 500px) {
  #chat-window {
    width: 90vw;
    right: 5vw;
    border-radius: 12px;
    height: auto;
    max-height: 95vh;
  }

  #chat-messages {
    max-height: 50vh;
  }
}