h3 {
  color: royalblue;
}

/* ✅ Import Bootstrap & Bootstrap Icons */
@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css");

body {
  font-family: "Poppins", sans-serif;
  background: #f5f7fa;
  height: 100vh;
  margin: 0;
}

/* Floating Button */
.chatbot-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  top: 842px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  z-index: 999;
}

.chatbot-btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}

/* Chat Window */
.chatbot-box {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 360px;
  max-width: 90%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 998;
  height: 480px;
  transition: all 0.3s ease-in-out;
}

.chatbot-header {
  background: #007bff;
  color: #fff;
  padding: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header button {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.chatbot-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: #f9fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  display: flex;
  align-items: flex-end;
  max-width: 85%;
}

.bot-message {
  align-self: flex-start;
  flex-direction: row;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-text {
  padding: 0.6rem 1rem;
  border-radius: 15px;
  font-size: 14px;
  word-wrap: break-word;
  max-width: 80%;
}

.user-message .message-text {
  background: #007bff;
  color: white;
  border-bottom-right-radius: 4px;
}

.bot-message .message-text {
  background: #f1f1f1;
  color: #333;
  border-bottom-left-radius: 4px;
}

.bot-avatar,
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #007bff;
  color: #fff;
  margin: 0 8px;
  flex-shrink: 0;
  font-size: 16px;
}

.user-avatar {
  background: #6c757d;
}

.chatbot-footer {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid #ddd;
  background: #fff;
}

.chatbot-footer input {
  flex: 1;
  border: none;
  outline: none;
  background: #f1f1f1;
  border-radius: 20px;
  padding: 0.6rem 1rem;
  margin-right: 0.5rem;
}

.chatbot-footer button {
  border: none;
  background: #007bff;
  color: #fff;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: 0.3s;
}

.chatbot-footer button:hover {
  background: #0056b3;
}

@media (max-width: 576px) {
  .chatbot-box {
    right: 10px;
    bottom: 80px;
    height: 80vh;
  }
}

/* Responsive Floating Button */
@media (max-width: 768px) {
  .chatbot-btn {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 20px;
    font-size: 22px;
  }

  .chatbot-box {
    width: 92%;
    right: 4%;
    bottom: 90px;
    height: 75vh;
  }
}

@media (max-width: 480px) {
  .chatbot-btn {
    bottom: 16px;
    right: 80px;
    top: 585px;
    font-size: 20px;
  }

  .chatbot-box {
    width: 94%;
    right: 3%;
    bottom: 80px; /* avoid keyboard overlay */
    height: 70vh;
  }
}


