/* ============================= */
/* Chatbot Icon Button */
/* ============================= */

#chatbot-icon {
  position: fixed;
  bottom: 56px;
  right: 20px;
  cursor: pointer;
  z-index: 10001;
  width: 115px;
  height: 64px;
  background-color: transparent;
}

#chatbot-icon img {
  width: 115px;
  transition: all 0.3s ease;
}

img.close-icon {
  width: 65px !important;
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

div#chatbot-icon.chatbot-icon.cross-icon {
    right: -25px;
    bottom: 15px;
}

/* ============================= */
/* Chatbot Window */
/* ============================= */

.chnkellton-chatbot-window {
  position: fixed;
  bottom: 95px;
  right: 20px;
  width: 420px;
  height: 590px;
  /* background: #5b45a8ab; */
  border: 2px solid #ffffff78;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  background: linear-gradient(142.08deg, rgba(91, 69, 168, 0.3) 0%, rgba(91, 69, 168, 0.1) 100%);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  border-radius: 23px;
}

/* When Open */
.chnkellton-chatbot-window.chatbot-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ============================= */
/* Header */
/* ============================= */

.chatbot-header {
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px 18px 0 0;
}

.chatbot-header img {
  width: 54px;
  margin-right: 12px;
}

.chatbot-header span {
  font-weight: 400;
  font-size: 20px;
  flex: 1;
}

/* ============================= */
/* Body */
/* ============================= */

.chatbot-body {
  overflow-y: auto;
  height: 100%;
  flex: 1;
  padding: 22px 18px 12px 18px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.purpose_info {
  text-align: center;
  color: #fff;
  font-size: 16px;
  margin-bottom: 10px;
  padding: 0 10px;
}

.chatbot-body.window-body-layer {
  position: relative;
}

/* .chatbot-body.window-body-layer:after  */
.chnkellton-chatbot-window.chatbot-open.window-chat-layer:after {
    position: absolute;
    content: '';
    background: #5b45a8;
    width: 100%;
    height: 100%;
    left: 0;
    right: 0;
    left: 0;
    top: 77px;
}

/* ============================= */
/* Messages */
/* ============================= */

.chatbot-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.chatbot-message.chatbot-user {
  justify-content: flex-end;
}

.chatbot-bubble {
  max-width: 90%;
  font-size: 15px;
  line-height: 1.7;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Assistant Message */
.chatbot-message.chatbot-assistant .chatbot-bubble {
  background: #fff;
  color: #222;
  border-radius: 12px 12px 12px 12px;
}

/* User Message */
.chatbot-message.chatbot-user .chatbot-bubble {
  background: #5B45A8;
  color: #fff;
  border-radius: 12px 12px 0 12px;
}

/* ============================= */
/* Suggestions */
/* ============================= */

#chatbot-suggestions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chatbot-suggestion {
  border: none;
  background: #E1DCF3;
  color: #222;
  border-radius: 12px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.chatbot-suggestion:hover {
  background: #5B45A8;
  color: #fff;
}

/* ============================= */
/* Footer */
/* ============================= */

.chatbot-footer {
  padding: 18px;
  background: transparent;
  border-radius: 0 0 18px 18px;
}

/* Form Wrapper */
#chatbot-form {
  width: 100%;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  border: 2px solid #ccc;
  padding: 6px 14px;
  height: 58px;
  position: relative;
}

/* Input */
#chatbot-message {
  flex: 1;
  border: none;
  font-size: 15px;
  outline: none;
  color: #222;
  padding: 10px 6px;
  background: transparent;
  margin-left: 25px;
}

/* Send Button */
#chatbot-send {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#chatbot-send img {
  width: 22px;
}

/* ============================= */
/* Modern Scrollbar */
/* ============================= */
.chatbot-body {
    scrollbar-width: auto;
    scrollbar-color: rgba(255,255,255,0.4) transparent;
}

/* REMOVE ARROWS */
.chatbot-body::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

/* SCROLLBAR */
.chatbot-body::-webkit-scrollbar {
    width: 10px;
}

/* TRACK */
.chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}

/* THUMB */
.chatbot-body::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.4);
    border-radius: 999px;
}

/* ======== */
/* Sugestion form css */
/* ======== */
div#chatbot-dynamic-suggestions {
    margin-top: -10px;
}

div#chatbot-dynamic-suggestions button.chatbot-suggestion {
    margin-bottom: 10px;
    text-align: left;
    line-height: 22px;
    color: #222;
    padding: 6px 13px;
    background: #E1DCF3;
    max-width: 90%;
}
div#chatbot-dynamic-suggestions button.chatbot-suggestion:hover {
    background: #5B45A8;
    color: #fff;
}

/* ============================= */
/* CSS for Lead Form */
/* ============================= */
.chatbot-lead-form {
  position: relative;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid #eee;
  position: fixed;
  left: 8px;
  right: 8px;
  z-index: 9999;
  height: 470px;
  backdrop-filter: blur(50px);
  border-radius: 24px;
  box-shadow: 0px 4px 24px -1px rgba(0, 0, 0, 0.2);
  width: 96%;
  min-height: 490px;
  justify-content: center;
  /* Smooth Transition */
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center;
  top: 87px;
  border: 1px solid #5843a2;
  /*background-image: linear-gradient(to right bottom, #5843a2, #5f4ba7, #6752ac, #6e5ab1, #7562b6, #7e6cbd, #8877c4, #9181cb, #9f90d6, #aea0e0, #bcafeb, #cbbff6);
  background-image: linear-gradient(to right bottom, #5843a2, #5b45a9, #5d47b0, #6048b7, #634abe, #6d54c5, #775ecd, #8168d4, #947ddd, #a693e6, #b8a9ee, #cbbff6);
  background-image: linear-gradient(90deg,rgba(0, 0, 0, 1) 0%, rgba(81, 68, 94, 1) 0%, rgba(67, 79, 69, 1) 0%, rgba(102, 14, 140, 1) 100%);*/
  background: radial-gradient(circle, rgba(108, 77, 219, 1) 0%, rgba(45, 28, 59, 1) 100%, rgba(91, 69, 168, 1) 0%);
}

/* Close state for this specific layer */
.chatbot-lead-form.fade-out {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  margin-top: -100px; /* Optional: slides it up as it vanishes */
}

/* Close Button Positioned Inside Top-Right */
.inner-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
}

/* Input lines */
.chatbot-lead-form input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.6);
  padding: 8px 0;
  color: white;
  outline: none;
}

button#close-lead-form {
    width: 40px;
    height: 40px;
    position: absolute;
    top: -10px;
    right: -6px;
    background: linear-gradient(90deg,rgba(91, 69, 168, 1) 0%, rgba(131, 114, 189, 1) 50%, rgba(184, 184, 255, 0.37) 100%);
    border: 1px solid #fff;
}

.chatbot-lead-form button {
  background: #fff;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
}

.chatbot-lead-form h4 {
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 1.1rem;
}

/* Individual Input Styling */
.chatbot-lead-form input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7); /* The thin white line */
  padding: 10px 0;
  margin-bottom: 0;
  color: #FFFFFF;
  outline: none; /* Removes the default browser highlight */
  font-size: 1rem;
  transition: border-bottom 0.3s ease;
}

/* Placeholder text color (to match the light grey/white look) */
.chatbot-lead-form input::placeholder {
  color: rgba(255, 255, 255, 0.8); 
  font-weight: 300;
}

/* Hover/Focus effect for the underline */
.chatbot-lead-form input:focus {
  border-bottom: 1px solid #FFFFFF;
}

/* Submit Button Styling */
#submit-lead {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background-color: #5B45A8; /* Or use the purple from the logo */
  color: #FFFFFF;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  font-size: 16px;
  width: 85%;
  margin: 0 auto;
  margin-top: 10px;
}

#submit-lead:hover {
  opacity: 0.9;
}

.open-lead-form{
  color:#5B45A8;
  font-weight:400;
  margin-top: 10px;
  display: block;
}
.chnkellton-chatbot-window.chatbot-open.window-chat-layer {
    background: #5b45a8;
}
button#close-lead-form svg {fill: white;filter: brightness(0) invert(1);color: #fff;}

/* ============================= */
/* Voice Icone - CSS */
/* ============================= */

#chatbot-voice {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  margin-right: 0;
  position: absolute;
  left: 11px;
  opacity: 0.7;
  top: 15px;
}

#chatbot-voice.listening {
  color: red;
}
#chatbot-voice.listening {
  background: #ff4d4f;
  color: white;
  border-radius: 50%;
  animation: pulse 1s infinite;
}
#voice-status{
  display: none;
}

.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
  position: absolute;
  left: 9px;
  display: none;
}

.voice-wave span {
  width: 4px;
  height: 8px;
  background-color: #5B45A8; /* Adjust to match your UI */
  border-radius: 4px;
  animation: wave-pulse 1s ease-in-out infinite;
}

.voice-wave span:nth-child(2) { animation-delay: 0.2s; }
.voice-wave span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave-pulse {
  0%, 100% { height: 8px; }
  50% { height: 18px; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}


/* ============================= */
/* Css - Typing Dots */
/* ============================= */
/* Chat row */
.chatbot-row {
  display: flex;
  align-items: flex-end;
  margin-bottom: 14px;
}

/* Avatar */
.chatbot-avatar {
  width: 34px;
  height: 34px;
  margin-right: 10px;
  flex-shrink: 0;
}

.chatbot-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Bubble */
.chatbot-bubble.typing-bubble {
  /* background: #ffffff;
  border-radius: 16px;
  padding: 10px 14px; */
  max-width: 70%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-size: 14px;
}

/* Typing bubble */
.typing-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}

/* Dots container */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 60px;
  justify-content: center;
}

/* Dots */
.typing-dots span {
  width: 6px;
  height: 6px;
  background: #1a1919;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

/* Stagger animation */
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Text */
.typing-text {
  font-size: 14px;
  color: #000;
  margin-left: 4px;
}
/*
.typing-dots span {
  display: inline-block;
  font-size: 20px;
  margin: 0 2px;
  opacity: 0;
  animation: blink 1.4s infinite;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}
*/

/* Animation */
@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================= */
/* Form Css  */
/* ============================= */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.error-msg {
  font-size: 15px;
  color: #fe1d1d;
  margin-top: 4px;
  display: none;
  margin-bottom: -10px;
}

input.error {
  border-bottom: 1px solid #ff0000;
}

/* ============================= */
/* Responsive - Mobile */
/* ============================= */

@media (max-width: 480px) {

  #chatbot-icon {
    bottom: 12px;
    right: 16px;
    width: 60px;
  }

  div#chatbot-icon.chatbot-icon.cross-icon {
    right: 0px;
    bottom: 0;
  }

  #chatbot-icon img {
    width: 60px;
  }

  .chnkellton-chatbot-window {
    bottom: 76px;
    right: 0;
    left: 11px;
    width: 95%;
    height: 100%;
    max-height: 81%;
    border-radius: 22px;
  }

  img.close-icon {
    width: 45px !important;
  }

}