/* Chat Input Area - Update for Flexbox */
.chat-input {
    padding: 10px 15px; /* Adjusted padding */
    display: flex;      /* Use Flexbox */
    align-items: center; /* Vertically align items */
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa; /* Slightly different background */
    flex-shrink: 0;
}

.chat-input input#userInput { /* Target input specifically */
    flex-grow: 1; /* Allow input to take available space */
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px; /* Space between input and button */
    font-size: 14px;
    line-height: 1.4; /* Ensure text fits */
}

.chat-input button#sendButton { /* Target button specifically */
    flex-shrink: 0; /* Prevent button from shrinking */
    background: linear-gradient(274deg, #fe5515, #db3400); /* Send button color */
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Circular */
    font-size: 16px; /* Adjust icon size */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.chat-input button#sendButton:hover {
    background: linear-gradient(274deg, #ba3300, #ff490f);
}

/* Disabled state for send button */
.chat-input button#sendButton:disabled {
     background: #ccc;
     cursor: not-allowed;
     opacity: 0.7;
}

/* Hide Font Awesome text if accidentally rendered */
.chat-input button#sendButton i {
    line-height: 1;
}
/* Add this to your existing CSS */
a.whatsapp-link {
    color: #007bff; /* Standard link blue */
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}

a.whatsapp-link:hover {
    color: #0056b2; /* Darker blue on hover */
}
.help-button {
  position: fixed;
  bottom: 15px;
  right: 10px;
  z-index: 9999;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.help-button:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.8));
}

.bubble {
    position: relative;
    background: #FFC107;
    color: #222;
    padding: 5px 10px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    right: 55px;
    animation: botBounce 1.5s infinite alternate;
    top: 10px;
}

.bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 15px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #FFC107;
}

.text {
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
}


.chat-image-icon {
  width: 95px;
  height: 95px;
  object-fit: contain;
  
}

@keyframes botBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.help-button:hover .bubble {
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (max-width: 480px) {
  .chat-window {
    width: 90%;
    right: 5%;
  }
  .chat-image-icon {
    width: 70px;
    height: 70px;
  }
}

.bubble {
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.bubble.hidden {
  opacity: 0;
  visibility: hidden;
  display: none;
}

.bot-icon {
  animation: botBounce 1.5s infinite alternate;
}

.bot-icon.hidden {
  opacity: 0;
  visibility: hidden;
   /* Optionally stop animation when hidden */
   animation-play-state: paused;
   display: none;
}
  /* Chat Window */
  .chat-window {
    position: fixed;
    bottom: 00px;
    right: 3px;
    width: 370px;
    max-height: 550px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: fadeInUp 0.4s ease;
  }

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

  /* Chat Header */
  .chat-header {
    background: linear-gradient(274deg, #fe5515, #db3400);
    color: #fff;
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
  }
  .chat-header button {
    background: #fff;
    border: none;
    color: #dc0000;
    font-size: 32px;
    cursor: pointer;
    border-radius: 20px;
  }

  /* Chat Content */
  .chat-content {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    background: #f5f5f5;
  }

  /* Message Styling */
  .chat-message {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    margin-top: 12px;
  }
  .chat-message.bot {
    flex-direction: row;
  }
  
  .avatar {
    width: 35px;
    height: 35px;
    background: #ff5500;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }
  
  /* Change user message direction */
.chat-message.user {
    flex-direction: row; /* Changed from row-reverse */
    justify-content: flex-end;
}

/* Adjust message bubble positioning */
.chat-message.user .message-content {
    order: 1;
    margin-left: 0;
    margin-right: 10px;
    border-radius: 25px 5px 25px 25px;
    background: #ff6c00;
    color: #fff;
}
.chat-message.user .message-time {
    font-size: .7rem;
    display: block;
    text-align: right;
    margin-top: 3px;
    color: #fff;
}

.chat-message.user .avatar {
    order: 2;
}
.message-time{
    font-size: .7rem;
    color: #6c757d;
    display: block;
    text-align: right;
    margin-top: 3px;
}
  .message-content {
    max-width: 75%;
    margin: 0 10px;
    background: #fff;
    padding: 15px 10px 15px 10px;
    border-radius: 5px 25px 25px 25px;
  }
  .message-content span {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
  }
  /* Message bubbles with square top-left */
    .chat-message.bot .message-content span {
      background: #e0e0e0;
      color: #333;
      border-radius: 0 18px 18px 18px;
      display: inline-block;
      padding: 10px 15px;
    }
    
    .chat-message.user .message-content span {
      background: #0072ff;
      color: #fff;
      border-radius: 18px 0 18px 18px;
      display: inline-block;
      padding: 10px 15px;
      
    }

  /* Suggestion Buttons */
  .suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }
  .suggestion-item {
    background: #0072ff;
    color: #fff;
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  .suggestion-item:hover {
    background: #0056D2;
  }
  .inline-suggestions .suggestion-item {
  background: #ffe6e6;
  color: #ff6216;
  padding: 8px 14px;
  border-radius: 20px;
  margin-top: 10px;
  margin-right: 8px;
  font-weight: bold;
  border: 1px solid #ff5c00;
}
.inline-suggestions .suggestion-item:hover {
  background: #ed6d0f;
  color: white;
  cursor: pointer;
}
#typing-indicator {
  opacity: 0.6;
  font-style: italic;
}
#typing-indicator .message-content span {
  color: #666;
}
/* Add typing animation */
@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.typing span::after {
  content: '...';
  display: inline-block;
  animation: dotPulse 1.4s infinite;
}
.whatsapp-btn {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
}

.whatsapp-btn:hover {
    background-color: #1EBE57;
}

.inline-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-item {
    background-color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.suggestion-item:hover {
    background-color: #ddd;
}
