/* Floating animation for the chatbot window */
@keyframes genieFloat {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0);
  }
}

/* Chatbot container styles */
.chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 340px;
  max-width: 95vw;
  max-height: 60vh;
  background: #ffffffa0;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(20, 30, 97, 0.18), 0 1.5px 8px rgba(20, 30, 97, 0.10);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
}

/* Chatbot header */
.chatbot-header {
  background: linear-gradient(90deg, #ffc107, #141E61);
  color: #fff;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  font-size: 1.13rem;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  position: relative;
  box-shadow: 0 2px 8px rgba(20, 30, 97, 0.08);
}

#chatbot-avatar img {
  background: transparent;
  padding: 0.05rem;
  box-shadow: 0 2px 8px rgba(20, 30, 97, 0.10);
}

.chatbot-close {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  opacity: 0.8;
}

.chatbot-close:hover {
  color: #ffc107;
  opacity: 1;
}

/* Chatbot body (messages area) */
#chatbot-body {
  background: transparent;
  padding: 1.1rem 1rem 0.7rem 1rem;
  flex: 1 1 auto;
  /* Grow and shrink as needed */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  scroll-behavior: smooth;
}

/* Message bubbles */
.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  font-size: 0.98rem;
  line-height: 1.5;
  word-break: break-word;
}

.message.user {
  align-self: flex-end;
  background: #e3e8fd;
  color: #141E61;
  border-radius: 16px 16px 4px 16px;
  padding: 0.6em 1em 0.5em 1em;
  box-shadow: 0 2px 8px rgba(20, 30, 97, 0.06);
  margin-right: 2px;
}

.message.bot {
  align-self: flex-start;
  background: #fffbe7;
  color: #222;
  border-radius: 16px 16px 16px 4px;
  padding: 0.6em 1em 0.5em 1em;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.08);
  margin-left: 2px;
}

.message-content {
  margin-bottom: 0.2em;
}

.message-time {
  font-size: 0.78em;
  color: #888;
  margin-top: 0.1em;
  text-align: right;
  opacity: 0.7;
}

/* Chatbot footer (input area) */
.chatbot-footer {
  display: flex;
  align-items: center;
  padding: 0.7rem 1rem 0.7rem 1rem;
  background: #f5f7fa;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  gap: 0.5rem;
}

#chatbot-input {
  flex: 1 1 auto;
  border: 1.5px solid #d1d9f0;
  border-radius: 10px;
  padding: 0.55em 1em;
  font-size: 1rem;
  outline: none;
  background: #fff;
  transition: border 0.2s;
}

#chatbot-input:focus {
  border-color: #141E61;
}

.chatbot-footer button {
  background: #141E61;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.55em 0.95em;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 0.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-footer button:hover {
  background: #ffc107;
  color: #141E61;
}

/* Scrollbar styling */
#chatbot-body::-webkit-scrollbar {
  width: 7px;
}

#chatbot-body::-webkit-scrollbar-thumb {
  background: #e3e8fd;
  border-radius: 8px;
}

#chatbot-body::-webkit-scrollbar-track {
  background: transparent;
}

.launcher-button {
  background-color: #ffc107aa;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
  animation: genieFloat 2.5s ease-in-out infinite;
}
.launcher-button2 {
  background-color: #141E61;
  color: #fff;
  position: fixed;
  bottom: 90px;
  right: 44px;
  border-radius: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1000;
  animation: genieFloat 2.5s ease-in-out infinite;
}

.launcher-button:hover {
  background-color: #b68900;
}

/* Responsive styles */
@media (max-width: 600px) {
  .chatbot-container {
    background-color: transparent;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-height: 90%;
    height: 90%;
    border-radius: 0;
    box-shadow: 0 -2px 24px rgba(20, 30, 97, 0.13);
    display: flex;
    flex-direction: column;
    /* Ensure flex works on mobile too */
  }

  #chatbot-body {
    background-color: #fff;
    flex: 1 1 auto;
    padding: 0.7rem 0.5rem;
    overflow-y: auto;
  }
  .launcher-button {
    width: 54px;
    height: 54px;
    bottom: 16px;
    right: 16px;
  }
  .launcher-button2{
    font-size: smaller;
    padding: 0.3rem;
    bottom: 72px;
    right: 30px;
  }
}