/* --- Floating Launcher Button --- */
#ai-chat-launcher {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(135deg, #007bff, #00bcd4);
  color: #fff;
  padding: 14px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: none; /* remove hover animation */
}

/* --- Chat Window --- */
#ai-chat-window {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 380px;
  height: 500px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display:flex;
  
  /* Hide visually but keep in DOM */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;

  transition: opacity 0.2s ease;
}

/* Show chat */
#ai-chat-window.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}




/* --- Chat Header --- */
#ai-chat-header {
  background: linear-gradient(135deg, #007bff, #00bcd4);
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Chat Body --- */
#ai-chat-body {
  flex: 1 1 auto;
  padding: 14px;
  overflow-y: auto;
  background: #f7f9fc;
  min-height: 350px;
}

/* --- Input Area --- */
#ai-chat-input {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 10px;
}

#ai-chat-input input {
  flex: 1;
  border: none;
  padding: 12px;
  outline: none;
  border-radius: 12px;
  background: #f2f4f7;
  font-size: 14px;
  text-transform: none !important;
}

#ai-chat-input button {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
}

/* --- Message Bubbles --- */
.ai-bubble {
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.7;
  font-size: 15px;
  word-wrap: break-word;
  max-width: 80%;
  white-space: pre-line;
}

.ai-assistant { 
  background: #e6f0ff; 
  color: #0a1f44; 
  align-self: flex-start; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.ai-user { 
  background: #007bff; 
  color: #fff; 
  align-self: flex-end; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- Typing indicator --- */
.thinking { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  background: #e6f0ff; 
  color: #007bff; 
  font-style: italic; 
  padding: 12px 16px; 
  border-radius: 16px; 
}

.thinking .dot { 
  width: 6px; 
  height: 6px; 
  background-color: #007bff; 
  border-radius: 50%; 
  animation: blink 1.4s infinite both; 
}

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

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* --- Quick Reply / Consultation Buttons --- */
#quick-replies {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-top: 1px solid #ddd;
  background: #f7f9fc;
}

.quick-btn {
  flex: 1 1 32%;
  border-radius: 30px;
  border: 1px solid #007bff;
  background: #fff;
  color: #007bff;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.quick-btn:hover {
  background: #007bff;
  color: #fff;
  transform: translateY(-2px);
}

.quick-btn:active { transform: translateY(0); }

/* Consultation Button Styling */
.consult-btn {
  display: block;
  width: 100%;
  padding: 12px 0;
  margin: 8px 0 10px 0;
  background: #ffffff;
  color: #007bff;
  border: 1px solid #007bff;
  border-radius: 4px; /* minimal rounding */
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.consult-btn:hover {
  background: #007bff;
  color: #ffffff;
}



/* --- Hidden --- */
.hidden { display: none; }