/* Chatbot Toggler Button */
.chatbot-toggler {
  position: fixed;
  bottom: 25px;
  right: 30px;
  outline: none;
  border: none;
  height: 60px;
  width: 60px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0dbb98, #06a77d);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  z-index: 9999;
  animation: glow 1.5s infinite alternate, sparkle 1s infinite;
}

.chatbot-toggler:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(13, 187, 152, 0.8);
}

.chatbot-toggler span {
  color: white;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.chatbot-toggler:hover span {
  transform: scale(1.1);
}

/* Glowing Animation */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(13, 187, 152, 0.8), 0 0 15px rgba(13, 187, 152, 0.6), 0 0 25px rgba(13, 187, 152, 0.4);
  }
  100% {
    box-shadow: 0 0 10px rgba(13, 187, 152, 1), 0 0 30px rgba(13, 187, 152, 0.8), 0 0 50px rgba(13, 187, 152, 0.6);
  }
}

/* Sparkling Animation */
@keyframes sparkle {
  0% {
    background: linear-gradient(135deg, #0dbb98, #06a77d);
  }
  50% {
    background: linear-gradient(135deg, #06a77d, #0dbb98);
  }
  100% {
    background: linear-gradient(135deg, #0dbb98, #06a77d);
  }
}

/* Chatbot Container */
.chatbot {
  position: fixed;
  right: 30px;
  bottom: 90px;
  width: 350px;
  height: 480px;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: bottom right;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  z-index: 9998;
}

.chatbot-toggler:active + .chatbot,
body.show-chatbot .chatbot {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Chatbot Header */
.chatbot header {
  padding: 16px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #178397, #193d82);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot header .close-btn {
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  transition: 0.3s ease;
}

.chatbot header .close-btn:hover {
  transform: scale(1.2);
  color: #ff4f4f;
}

/* Chatbox */
.chatbot .chatbox {
  overflow-y: auto;
  height: 390px;
  padding: 15px 20px 100px;
  background: #f8f9fa;
  scrollbar-width: thin;
}

.chatbox::-webkit-scrollbar {
  width: 6px;
}

.chatbox::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 5px;
}

.chatbox .chat {
  display: flex;
  list-style: none;
  align-items: center;
  margin: 15px 0;
}

/* Incoming Message */
.chatbox .incoming {
  justify-content: flex-start;
}

.chatbox .incoming span {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, #178397, #193d82);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 35px;
  font-size: 1.2rem;
  margin-right: 10px;
}

.chatbox .incoming p {
  background: #e9f0ff;
  color: #333;
  padding: 12px 16px;
  border-radius: 15px 15px 15px 5px;
  max-width: 75%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Outgoing Message */
.chatbox .outgoing {
  justify-content: flex-end;
}

.chatbox .outgoing p {
  background: #0dbb98;
  color: white;
  padding: 12px 16px;
  border-radius: 15px 15px 5px 15px;
  max-width: 75%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Chat Input */
.chatbot .chat-input {
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: white;
  padding: 10px 20px;
  border-top: 1px solid #ddd;
}

.chat-input textarea {
  width: 100%;
  height: 45px;
  border: none;
  outline: none;
  resize: none;
  font-size: 1rem;
  padding: 10px;
  border-radius: 5px;
  background: #f5f5f5;
}

.chat-input span {
  font-size: 1.8rem;
  color: #0dbb98;
  cursor: pointer;
  transition: 0.3s;
  padding: 5px;
}

.chat-input span:hover {
  color: #0a8f76;
  transform: scale(1.2);
}

/* Mobile Responsive */
@media (max-width: 780px) {
 .chatbot-toggler {
  position: fixed;
  bottom: 85px;
  left: 10px;
  outline: none;
  border: none;
  height: 40px;
  width: 40px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0dbb98, #06a77d);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  z-index: 9999;
  animation: glow 1.5s infinite alternate, sparkle 1s infinite;
}


  .chatbot {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .chatbot .chatbox {
    height: 75%;
    padding: 20px 15px 100px;
  }

  .chatbot .chat-input {
    padding: 8px 15px;
  }
}
