/* ---------- CHATBOT (Modern Look) ---------- */
.chatbot {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 340px; /* Thoda chauda */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  z-index: 1000;
}

/* --- Header --- */
.chat-header {
  background: #0f3d91;
  color: #fff;
  padding: 12px 15px; /* Thoda compact */
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 2;
}
.chat-header h4 {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}
.chat-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
  width: auto;
  margin-top: auto;
}
.chat-header button:hover {
  opacity: 1;
}

/* --- Chat Body (Clean White) --- */
.chat-body {
  padding: 15px;
  height: 300px;
  overflow-y: auto;
  background: #ffffff; /* CLEAN WHITE BG */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Message Bubbles --- */
.chat-message {
  padding: 10px 14px;
  border-radius: 18px;
  max-width: 80%;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word; /* Lambe text ke liye */
}

/* Bot Bubble (Left, Grey) */
.chat-message.bot {
  background: #f1f1f1; /* Light Grey */
  color: #111; /* Dark text */
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* User Bubble (Right, Blue) */
.chat-message.user {
  background: #0f3d91;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* --- Typing Indicator (Grey) --- */
.typing-indicator {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #f1f1f1; /* Grey, bot jaisa */
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.typing-indicator span {
  height: 8px;
  width: 8px;
  margin: 0 2px;
  background-color: #aaa;
  border-radius: 50%;
  display: inline-block;
  animation: bounce 1.3s infinite;
}
.typing-indicator span:nth-of-type(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-of-type(3) {
  animation-delay: 0.4s;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* --- Input Area (Modern) --- */
.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ddd;
  padding: 10px 15px;
  background: #f9f9f9; /* Halka grey area */
}

.chat-input input {
  flex: 1;
  border: 1px solid #ddd;
  padding: 10px 15px; /* Thoda bada */
  outline: none;
  font-size: 0.9rem;
  border-radius: 20px; /* Pill shape */
  transition: border-color 0.2s;
}
.chat-input input:focus {
  border-color: #0f3d91;
}

/* Send Button (Icon) */
.chat-input button {
  background: #0f3d91;
  color: #fff;
  border: none;
  border-radius: 50%; /* Round */
  width: 40px; /* Fixed size */
  height: 40px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}
.chat-input button:hover {
  background: #0b2b6f; /* Darker blue */
}


/* --- Toggle Button --- */
#chat-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #0f3d91;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.2s;
}
#chat-toggle:hover {
  transform: scale(1.1);
}