/* 🌸 RAIYA Chatbot Styles (Visible on all pages, bottom-right corner) */

#chatbot-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

/* 🔘 Chat Icon */
#chat-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: orangered;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 10000;
}

#chat-icon i {
  color: #fff;
  font-size: 28px;
}

#chat-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 💬 Chat Window */
#chat-window {
  width: 600px;
  height: 600px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  transform: translateY(25px);
  opacity: 0;
  transition: all 0.3s ease;
}

#chat-window.hidden {
    pointer-events: none !important;
}

#chat-window:not(.hidden) {
  transform: translateY(0);
  opacity: 1;
}

.hidden {
  display: none;
}

/* 🟣 Header */
.chat-header {
  background: linear-gradient(135deg, #1e4a5f 0%, #2c5f7c 100%);
  color: #fff;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.chat-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* 🌸 Chat Body */
.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  scroll-behavior: smooth;
}

/* 🌟 Intro (hello) message — top heading style */
.intro-message {
  text-align: center;
  margin-top: 25px;
  margin-bottom: 25px;
  align-self: center;
  width: 100%;
  animation: fadeIn 1s ease-in-out;
}

.intro-message p {
  background: none;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  border: none;
  box-shadow: none;
  max-width: 85%;
  margin: 0 auto;
}

/* 💫 Fade animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🗨️ Chat Bubbles */
.user-message,
.bot-message {
  margin-bottom: 10px;
  display: flex;
  width: 100%;
}

/* ✅ User message (purple bubble) */
.user-message {
  justify-content: flex-end;
}

.user-message p {
  background: #2c5f7c;
  color: #fff;
  padding: 8px 12px;
  border-radius: 15px 15px 0 15px;
  max-width: 70%;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-in-out;
}

/* ✅ Bot message — clean, no background */
.bot-message {
  justify-content: flex-start;
}

.bot-message p {
  background: none; /* 🚫 no box */
  color: #111;
  padding: 5px 8px;
  border-radius: 0;
  max-width: 80%;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-in-out;
  font-size: 15px;
  line-height: 1.5;
}

/* 💬 Chat Footer */
.chat-footer {
  display: flex;
  padding: 10px;
  background: #f1f3f6;
  border-top: 1px solid #e5e7eb;
}

.chat-footer input {
  flex: 1;
  border: none;
  border-radius: 15px;
  padding: 8px 12px;
  outline: none;
  background: #fff;
  font-size: 15px;
}

.chat-footer button {
  background: orangered;
  border: none;
  border-radius: 50%;
  color: white;
  width: 36px;
  height: 36px;
  margin-left: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.chat-footer button:hover {
  transform: scale(1.1);
}
#chat-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}


/* mobile view css  ******************************************************************/

/* 📱 Mobile Responsive Fix */
@media (max-width: 600px) {
  #chat-window {
    width: 90% !important;
    height: 80% !important;
    right: 5% !important;
    bottom: 20px !important;
    border-radius: 15px !important;
  }

  #chat-icon {
    width: 55px;
    height: 55px;
    right: 20px !important;
    bottom: 20px !important;
  }

  .chat-footer input {
    font-size: 14px;
  }

  .bot-message p,
  .user-message p {
    font-size: 14px;
  }
}
