/* RAPIRA Chatbot Styles */

/* Chatbot Toggle Button */
.chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(111, 66, 193, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  color: white;
  font-size: 24px;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(111, 66, 193, 0.4);
}

/* Chatbot Container */
.chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 500px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  display: none;
  flex-direction: column;
  z-index: 1001;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Chatbot Header */
.chatbot-header {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 15px 15px 0 0;
}

.chatbot-title {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

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

/* Messages Container */
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(0, 0, 0, 0.8);
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* Message Styles */
.message {
  display: flex;
  margin-bottom: 10px;
}

.user-message {
  justify-content: flex-end;
}

.bot-message {
  justify-content: flex-start;
}

.message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.user-message .message-content {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  color: white;
  border-bottom-right-radius: 6px;
}

.bot-message .message-content {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 6px;
}

/* Link Styles in Messages */
.message-content a {
  color: #6f42c1;
  text-decoration: underline;
  font-weight: 500;
  transition: all 0.3s ease;
}

.message-content a:hover {
  color: #e83e8c;
  text-decoration: none;
  background-color: rgba(111, 66, 193, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
}

.user-message .message-content a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.user-message .message-content a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Input Container */
.chatbot-input-container {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
}

#chatbot-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 12px 16px;
  color: white;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

#chatbot-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#chatbot-input:focus {
  border-color: #6f42c1;
  box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.2);
}

#chatbot-send {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 16px;
}

#chatbot-send:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
}

/* Suggestion Buttons */
.chatbot-suggestions {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.suggestion-btn:hover {
  background: rgba(111, 66, 193, 0.3);
  border-color: #6f42c1;
  color: white;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .chatbot-container {
    width: 320px;
    height: 450px;
    bottom: 10px;
    right: 10px;
  }
  
  .chatbot-toggle {
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .chatbot-messages {
    padding: 15px;
  }
  
  .chatbot-input-container {
    padding: 12px 15px;
  }
  
  .chatbot-suggestions {
    padding: 12px 15px;
  }
}

@media (max-width: 480px) {
  .chatbot-container {
    width: calc(100vw - 20px);
    height: 400px;
    bottom: 10px;
    right: 10px;
    left: 10px;
  }
  
  .message-content {
    max-width: 90%;
    font-size: 13px;
  }
  
  .suggestion-btn {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* Animation for message appearance */
.message {
  animation: messageSlideIn 0.3s ease-out;
}

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

/* Typing indicator (optional for future enhancement) */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}
