/*
AI
Assistant
Styles
*/

/* AI Assistant Styles */

/* Assistant Icon */
#ai-assistant-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 95px;
  height: 95px;
  background-color: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  
  z-index: 999;
  transition: transform 0.3s ease;
  overflow: hidden;
}

#ai-assistant-icon:hover {
  transform: scale(1.1);
}

.ai-icon-img {
  width: 513%;
  height: 108%;
  object-fit: cover;
}

#ai-assistant-icon i {
  color: white;
  font-size: 28px;
}

/* Assistant Modal */
#ai-assistant-modal {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  max-width: 90vw;
  height: 500px;
  max-height: 70vh;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transition: all 0.3s ease;
}

#ai-assistant-modal.ai-assistant-hidden {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}

/* Header */
.ai-assistant-header {
  padding: 15px;
  background-color: #1d58c0;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.ai-assistant-title {
  display: flex;
  align-items: center;
}

.ai-assistant-logo {
  width: 33px;
  height: 33px;
  margin-right: 10px;
  border-radius: 50%;
 
}

.ai-assistant-header h3 {
  margin: 0;
  font-size: 18px;
}

#ai-assistant-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Conversation Area */
.ai-assistant-conversation {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

/* Message Styles */
.ai-assistant-message {
  display: flex;
  margin-bottom: 15px;
  max-width: 85%;
}

.ai-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-assistant-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
}

.ai-message .ai-assistant-avatar {
  background-color: #fff;
  color: white;
}

.user-message .ai-assistant-avatar {
  background-color: #2196F3;
  color: white;
}

.ai-assistant-bubble {
  padding: 10px 15px;
  border-radius: 18px;
  max-width: calc(100% - 50px);
  word-wrap: break-word;
}

.ai-message .ai-assistant-bubble {
  background-color: white;
  border-top-left-radius: 42px;
}

.user-message .ai-assistant-bubble {
  background-color: #2196F3;
  color: white;
  border-top-right-radius: 5px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  padding: 10px 15px;
}

.typing-indicator span {
  height: 8px;
  width: 8px;
  background-color: #4CAF50;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  animation: typing 1.3s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

@keyframes typing {
  0% {
    transform: translateY(0px);
    background-color: #4CAF50;
  }
  28% {
    transform: translateY(-5px);
    background-color: #45a049;
  }
  44% {
    transform: translateY(0px);
    background-color: #4CAF50;
  }
}

/* FAQ Container and Toggle Styles */
.ai-assistant-faq-container {
  background-color: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.faq-header {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-header h4 {
  margin: 0;
  font-size: 14px;
  color: #555;
}

.faq-toggle-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.faq-toggle-btn:hover {
  color: #333;
}

/* FAQ Section */
.ai-assistant-faq {
  padding: 0 15px 10px;
  max-height: 150px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.ai-assistant-faq.faq-collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

#ai-assistant-faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-assistant-faq-item {
  padding: 8px 12px;
  margin-bottom: 5px;
  background-color: #eef7ee;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ai-assistant-faq-item:hover {
  background-color: #e0f2e0;
}

.ai-assistant-faq-item:last-child {
  margin-bottom: 0;
}

/* Form Styles */
#ai-assistant-form {
  padding: 15px;
  border-top: 1px solid #e0e0e0;
}

.ai-assistant-input-container {
  display: flex;
  position: relative;
}

#ai-assistant-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  padding-right: 45px;
}

#ai-assistant-input:focus {
  border-color: #4CAF50;
}

#ai-assistant-send {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #4CAF50;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#ai-assistant-send:hover {
  background-color: #45a049;
}

/* Responsive Styles */
@media (max-width: 768px) {
  #ai-assistant-modal {
    bottom: 80px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: none;
    height: calc(100% - 160px);
    max-height: none;
  }
  
  #ai-assistant-icon {
    bottom: 24px;
    right: 7px;
    width: 70px;
    height: 57px;
  }
}

/* Beta Tag */
.beta-tag {
  font-size: 10px;
  background-color: #ff9800;
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: top;
  display: inline-block;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Language Support */
.language-support {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
  font-style: italic;
}

/* Welcome Bubble */
.ai-welcome-bubble {
  position: fixed;
  bottom: 123px;
  right: 49px;
  max-width: 250px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 998;
  animation: bubbleAppear 0.5s forwards;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.ai-welcome-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.ai-welcome-fade-out {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.welcome-content {
  padding: 12px 15px;
  border-radius: 10px;
}

.welcome-content p {
  margin: 0;
  font-size: 14px;
  color: #333;
}

.welcome-content strong {
  color: #4CAF50;
}

.welcome-arrow {
  position: absolute;
  bottom: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid white;
}

@keyframes bubbleAppear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .ai-welcome-bubble {
    bottom: 85px;
    right: 15px;
  }
}
