/* Chatbot Toggle Button */
.chatbot-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: black;
  border-radius: 50%;
  border: black 4px solid;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 179, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 179, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 179, 0, 0);
  }
}

.chatbot-toggle:hover {
  background-color: #00b300;
  transform: scale(1.05);
}

.chatbot-toggle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* Chat Bubble */
.chat-bubble {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: white;
  border: 2px solid #00b300;
  border-radius: 12px;
  padding: 15px;
  max-width: 250px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

.chat-bubble-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble-text {
  font-size: 0.9rem;
  color: black;
  line-height: 1.4;
  margin: 0;
}

.chat-bubble-dismiss {
  align-self: flex-end;
  background: #00b300;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.chat-bubble-dismiss:hover {
  background: #008000;
}

.chat-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #00b300;
}

/* Chatbot Container */
.chatbot-container {
  width: 100%;
  max-width: 500px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 80vh;
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.chatbot-container.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.chat-header {
  background-color: black;
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-header-info h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.chat-header-info p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #f8f9fa;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.4;
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-message {
  background-color: white;
  border: 1px solid #e0e0e0;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.user-message {
  background-color: #00b300;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.input-container {
  display: flex;
  padding: 15px;
  border-top: 1px solid #e0e0e0;
  background-color: white;
}

.user-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 24px;
  outline: none;
  font-size: 1rem;
}

.user-input:focus {
  border-color: #00b300;
}

.send-btn {
  background-color: #00b300;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
}

.send-btn:hover {
  background-color: #008000;
}

.send-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.options-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.option-btn {
  background-color: white;
  border: 1px solid #00b300;
  color: #00b300;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.option-btn:hover {
  background-color: #00b300;
  color: white;
}

.form-group {
  margin-top: 10px;
}

.form-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 5px;
  font-size: 1rem;
}

.form-input:focus {
  border-color: #00b300;
  outline: none;
}

.submit-btn {
  background-color: black;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 15px;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: #333;
}

.success-message {
  background-color: #00b300;
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.error-message {
  background-color: orangered;
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.typing-indicator {
  display: inline-block;
  background-color: white;
  border: 1px solid #e0e0e0;
  padding: 12px 16px;
  border-radius: 18px;
  border-bottom-left-radius: 5px;
}

.typing-dots {
  display: flex;
}

.typing-dots span {
  height: 8px;
  width: 8px;
  background-color: #bbb;
  border-radius: 50%;
  display: block;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-5px);
  }
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 600px) {
  .chatbot-container {
    width: calc(100% - 40px);
    height: 70vh;
    right: 20px;
    bottom: 90px;
  }

  .chatbot-toggle {
    bottom: 20px;
    right: 20px;
  }

  .chat-bubble {
    right: 20px;
    bottom: 80px;
    max-width: 200px;
  }

  .message {
    max-width: 90%;
  }
}

@media (max-width: 400px) {
  .chatbot-container {
    width: calc(100% - 20px);
    right: 10px;
  }

  .chatbot-toggle {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .chatbot-toggle img {
    width: 100%;
    height: 100%;
  }

  .chat-bubble {
    right: 10px;
    bottom: 75px;
    max-width: 180px;
  }
}
