/* Loading placeholder for API call */
.loading-placeholder {
  height: 25px;
  width: 75%;
  margin: 20px 0; /* Increased margin for separation */
  border-radius: 15px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@media (max-width:600px) {
  .loading-placeholder {
    width: 100% !important;
  }
}

#fusionbot-ai-overview {
  position: relative;
  display: block;
  margin-bottom: 0;
}

#fusionbot-ai-response {
  height: 200px; /* Fixed initial height */
  width: 100%;
  overflow: hidden; /* Hide excess initially */
  background-color: #eee;
  border-radius: 10px 10px 0 0;
  white-space: pre-wrap;
  padding: 20px;
  font-family: Arial, sans-serif;
  line-height: 1.3;
  transition: height .5s ease;
}

#fusionbot-ai-response a {
  color: black;
  text-decoration: underline;
  font-size: .9em;
}

/* Show More button styling */
#show-more-btn {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background-color: rgb(127, 169, 35);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  opacity: 0.9;
  transition: opacity 0.3s;
  display: none;
}

#show-more-btn:hover {
  opacity: 1;
}

/* Gradient overlay for readability */
#fusionbot-ai-response::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent);
  pointer-events: none;
  display: none;
}

#fusionbot-ai-response.overflow::before {
  display: block;
}

/* Follow-up form styling */
#follow-up-form {
  display: none;
  width: 100%;
  margin-top: 0;
}

#follow-up-input {
  width: calc(100% - 100px);
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

#follow-up-submit {
  width: 100px;
  padding: 8px;
  font-size: 16px;
  background-color: rgb(127, 169, 35);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  float: right;
}

#follow-up-submit:hover {
  background-color: rgb(150, 200, 50);
}

/* User question styling */
.user-question {
  color: #0066cc; /* Blue for distinction */
  margin: 20px 0; /* Increased margin for separation */
  font-style: italic;
  font-weight: bold;
}

/* Response styling */
#Xfusionbot-ai-response:not(.user-question) {
  margin: 20px 0; /* Match question margin */
}