/* Chat Widget Button */
@keyframes small-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(-1px); }
}

.vote-buttons {
    margin-top: 5px;
    display: flex !important; /* Force display */
    gap: 10px;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s ease-in-out;
}

.vote-btn.upvote {
    color: green;
}

.vote-btn.downvote {
    color: red;
}

.vote-btn:hover {
    transform: scale(1.2);
}

.vote-confirm {
    font-size: 14px;
    color: gray;
    font-style: italic;
}

.fas.fa-robot.shake {
  animation: small-shake 0.6s infinite ease-in-out;
}

#close-chat i {
    color: #ffffff; /* Change this to your desired color */
}
/* Chat Widget Button */
.chat-btn {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background-color: #9025ec;
  color: white;
  border: none;
  border-radius: 8px 0 0 8px;
  width: 50px;
  height: auto;
  font-size: 20px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 5px;
  transition: transform 0.2s ease-in-out;
}

.chat-btn i {
  font-size: 24px;
}

.chat-text {
  font-size: 12px;
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
}

/* Chat Box */
.chat-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  background: white;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  z-index: 10000;
}

/* Chat Header */
.chat-header {
  background: #9025ec;
  color: white;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.chat-title i {
  margin-right: 5px;
}

.live-status {
  font-size: 12px;
  color: #55ed42;
  margin-left: 5px;
}

/* Chat Messages */
.chat-messages {
  height: 350px;
  overflow-y: auto;
  padding: 10px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

.chat-messages .message {
  max-width: 100%;
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 6px;
  word-break: break-word;
}

.chat-messages .user-message {
  background: #bfdbfe;
  align-self: flex-end;
  color: #000;
}

.chat-messages .bot-message {
  background: #e5e7eb;
  align-self: flex-start;
  color: #000;
}

/* Default styling for FAQ suggestions */
a.faq-suggestion {
  color: #9025ec; /* Blue color */
  text-decoration: none; /* Remove underline */
  font-weight: 500; /* Make it stand out */
  padding: 5px 0; /* Adds some padding for better clickability */
}

/* Hover effect */
a.faq-suggestion:hover {
  color: #1e40af; /* Darker blue on hover */
  text-decoration: underline; /* Add underline on hover */
  cursor: pointer; /* Indicate it's clickable */
}

/* Optional: Active effect (when clicked) */
a.faq-suggestion:active {
  color: #102a75; /* Even darker blue when clicked */
}
/* End - FAQ Suggestion Links */

/* Chat Input */
.chat-input {
  display: flex;
  border-top: 1px solid #e5e7eb;
  background: white;
  padding: 6px;
}

.chat-input input {
  flex: 1;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

/* Prevents iOS Zoom Issue */
.chat-input input {
  font-size: 16px;
}

.chat-input button {
  background: #9025ec;
  color: white;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 6px;
}

.chat-input button:hover {
  background: #1d4ed8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .chat-container {
    width: 100%;
    height: 100%; /* Reduces height from both top & bottom */
    top: 0; /* Push down from top */
    bottom: 0; /* Push up from bottom to avoid overlap */
    right: 0;
    border-radius: 0;
    z-index: 10000;
  }

  .chat-messages {
    height: calc(100vh - 140px); /* Adjusted for new top & bottom spacing */
    overflow-y: auto;
  }

  .chat-input {
    position: relative;
    z-index: 10000; /* Ensures input is clickable above navigation */
    background: white;
  }
}

/* Prevents mobile zoom-in on typing */
@media (max-width: 768px) and (orientation: portrait) {
  .chat-input input {
    font-size: 16px;
  }
}