/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* body {
  background: #E3F2FD;
} */

.chatbot-toggler {
  position: fixed;
  bottom: 30px;
  right: 35px;
  outline: none;
  border: none;
  height: 50px;
  width: 50px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0072ff;
  transition: all 0.2s ease;
  z-index: 9999;
}

body.show-chatbot .chatbot-toggler {
  transform: rotate(90deg);
}

.chatbot-toggler span {
  color: #fff;
  position: absolute;
}

.chatbot-toggler span:last-child,
body.show-chatbot .chatbot-toggler span:first-child {
  opacity: 0;
}

body.show-chatbot .chatbot-toggler span:last-child {
  opacity: 1;
}

.chatbot {
  position: fixed;
  right: 35px;
  bottom: 80px;
  width: 575px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: bottom right;
  box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1),
    0 32px 64px -48px rgba(0, 0, 0, 0.5);
  transition: all 0.1s ease;
  z-index: 9999;
}

body.show-chatbot .chatbot {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.chatbot header {
  padding: 16px 0;
  position: relative;
  text-align: center;
  color: #fff;
  background: #0072ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chatbot header span {
  position: absolute;
  right: 15px;
  top: 50%;
  display: none;
  cursor: pointer;
  transform: translateY(-50%);
  color: #fff;
}

header h2 {
  font-size: 1.4rem;
}

.chatbot .chatbox {
  overflow-y: auto;
  height: 510px;
  padding: 30px 20px 100px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar {
  width: 6px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-track {
  background: #fff;
  border-radius: 25px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 25px;
}

.chatbox .chat {
  display: flex;
  list-style: none;
}

.chatbox .outgoing {
  margin: 20px 0;
  justify-content: flex-end;
}

.chatbox .incoming span {
  width: 32px;
  height: 32px;
  color: #fff;
  cursor: default;
  text-align: center;
  line-height: 32px;
  align-self: flex-end;
  background: #0072ff;
  border-radius: 4px;
  margin: 0 10px 7px 0;
}

.chatbox .chat p {
  /* white-space: pre-wrap; */
  padding: 12px 16px;
  border-radius: 10px 10px 0 10px;
  max-width: 85%;
  color: #fff;
  font-size: 0.95rem;
  background: #0072ff;
}

.chatbox .incoming p {
  border-radius: 10px 10px 10px 0;
}

.chatbox .chat p.error {
  color: #721c24;
  background: #f8d7da;
}

.chatbox .incoming p {
  color: #000;
  background: #f2f2f2;
}

.chatbot .chat-input {
  display: flex;
  gap: 5px;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #fff;
  padding: 3px 20px;
  border-top: 1px solid #ddd;
}

.chat-input textarea {
  height: 55px;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  max-height: 180px;
  padding: 15px 15px 15px 0;
  font-size: 0.95rem;
}

.chat-input span {
  align-self: flex-end;
  color: #0072ff;
  cursor: pointer;
  height: 55px;
  display: flex;
  align-items: center;
  visibility: hidden;
  font-size: 1.35rem;
}

.chat-input textarea:valid~span {
  visibility: visible;
}

@media (max-width: 490px) {
  .chatbot-toggler {
    right: 20px;
    bottom: 20px;
  }

  .chatbot {
    right: 0;
    bottom: 0;
    height: 100%;
    border-radius: 0;
    width: 100%;
  }

  .chatbot .chatbox {
    height: 90%;
    padding: 25px 15px 100px;
  }

  .chatbot .chat-input {
    padding: 5px 15px;
  }

  .chatbot header span {
    display: block;
  }


  .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -moz-font-feature-settings: 'liga';
  -moz-osx-font-smoothing: grayscale;  
}
}


.prompt-buttons {
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 8px; 
  padding: 25px 15px 0px 50px;
  justify-content: flex-start;
}

.prompt-btn {
  background-color: #0072ff;
  color: white;
  border: none;
  padding: 8px 14px;
  /* border-radius: 20px; */
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s;
}

.prompt-btn:hover {
  background-color: #005fa3;
}


.prompt-btn-floating {
  /* position: fixed; */
  bottom: 90px; /* slightly above chatbot toggle */
  right: 25px;
  background-color: #0078d4;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 999;
}

.prompt-btn-floating:hover {
  background-color: #005fa3;
  transform: scale(1.05);
}


.prompts-below {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  background: #f9f9ff;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(15px);
}

.fade-in {
  animation: fadeInPrompts 0.6s ease forwards;
}

@keyframes fadeInPrompts {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.prompts-below .prompt-btn {
  background-color: #ece8ff;
  border: 1px solid #d0c8ff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.prompts-below .prompt-btn:hover {
  background-color: #0072ff;
  color: #fff;
  transform: scale(1.05);
}


.loading {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-start;
  height: 20px;
}

.loading span {
  width: 8px;
  height: 8px;
  background: #4a90e2;
  border-radius: 50%;
  animation: bounce 0.8s infinite alternate;
}

.loading span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  from { transform: translateY(0); opacity: 0.5; }
  to { transform: translateY(-6px); opacity: 1; }
}


.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInOut 1.4s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

/* --- PROMPT CONTAINER SCROLL FIX --- */
.prompt-container {
  max-height: 150px;      /* You can increase/decrease */
  overflow-y: auto;
  padding: 10px;
  background: #ffffff10;
  border-top: 1px solid #444;
}

/* Style prompt buttons */
.prompt-buttons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-buttons li,
.prompt-btn {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  background: #1e88e5;
  color: #fff;
  font-size: 14px;
  border: none;
  width: 100%;
  text-align: left;
}

.prompt-buttons li:hover, 
.prompt-btn:hover {
  background: #1565c0;
}


/* .inline-prompt-btn {
  display: inline-block;
  background: #e8f0fe;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 4px 0;
  cursor: pointer;
  font-size: 14px;
}

.inline-prompt-btn:hover {
  background: #d2e3fc;
} */


.inline-prompt-btn {
    display: inline-block;
    margin: 5px 5px 5px 0;
    padding: 10px 18px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(145deg, #6a82fb, #fc5c7d);
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(252, 92, 125, 0.4);
    transition: all 0.25s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.inline-prompt-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(252, 92, 125, 0.6);
    background: linear-gradient(145deg, #fc5c7d, #6a82fb);
}

.inline-prompt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* First-load (initial) prompt buttons */
/* Floating card-style first-load buttons */
.inline-prompt-btn.initial {
    display: inline-block;
    margin: 10px 5px;
    padding: 14px 22px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(145deg, #00c6ff, #0072ff);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 114, 255, 0.4);
    transition: all 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Hover lifts the button and adds glow */
.inline-prompt-btn.initial:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 114, 255, 0.6);
    background: linear-gradient(145deg, #0072ff, #00c6ff);
}

/* Optional glow effect for extra “lumsy” look */
/* Container inside the chat bubble for buttons */
.chat-incoming-buttons {
    display: flex;
    flex-wrap: wrap;        /* Allows multiple lines */
    gap: 10px;              /* Space between buttons */
    margin-top: 8px;
}

/* Floating card-style first-load buttons */
.inline-prompt-btn.initial {
    flex: 1 1 auto;         /* Grow/shrink naturally */
    min-width: 120px;       /* Minimum width of each button */
    max-width: 185px;       /* Maximum width */
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(145deg, #00c6ff, #0072ff);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.4);
    transition: all 0.3s ease, transform 0.3s ease;
    position: relative;
    text-align: center;
    min-height:110px;
}

/* Hover lift + glow effect */
.inline-prompt-btn.initial:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 114, 255, 0.6);
}


