/*
Theme Name: Hailey Chatbot
Template: wp-bootstrap-starter
Version: 1.0
*/

#chatbot-icon {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  cursor: pointer;
  background: transparent;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#chatbot-icon:hover {
  background: rgba(0, 0, 0, 0.04);
 }

#chatbot-sidebar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 380px;
  width: 100%;
  font-family: Inter;
  
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInSlideUp 0.3s ease-out forwards;
  animation-delay: 0.2s;
}

@keyframes fadeInSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Card */
    
.chatbot-wrapper {
  padding: 1rem 0px 5px;
  right: 5rem;
  position: relative;
  width: 400px;
  border-radius: 10px;
  box-shadow: 1px 1px 5px 3px rgb(16 24 40 / 13%);
  background: #F5EEFF;
  overflow: visible; /* allows avatar to pop out */
}

/* Header */
.chatbot-header {
  padding: 16px;
  font-weight: 500;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-wrapper .chatbot-close-btn {
    position: absolute;
    background: none;
    border: 0px;
    outline: 0px;
    cursor: pointer;
    padding: 0;
    right: -67px;
    bottom: 0;
    z-index: 99;
    width: 97px;
    height: 154px;
}

/* Messages */
.chatbot-messages {
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 5px 12px 12px;
    height: 380px;
    overflow-y: scroll;
    padding: 12px;
    height: 380px;
}

.chatbot-messages::-webkit-scrollbar {
  display: none;
}

.chatbot-message {
  display: flex;
  margin-bottom: 10px;
}

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

.chatbot-message.bot {
  justify-content: flex-start;
}

.chatbot-bubble {
  font-weight: 500;
  font-family: Inter;
  line-height: 1.5;
  font-size: 13px;
  text-align: justify;
  box-sizing: border-box;
  padding: 10px 10px;
  max-width: 100%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.chatbot-bubble p{
  margin: 0px;
}

.chatbot-message.bot .chatbot-bubble {
  border-radius: 5px 5px 5px 0;
}

.chatbot-message.user .chatbot-bubble {
  border-radius: 5px 5px 0 5px;
  background-color: rgb(127, 86, 217);
  color: white;
}

/* Input */
.chatbot-input-row {
   margin: 0px 10px 5px 10px;
}

.chatbot-input-wrapper {
    display: inline-flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
    vertical-align: top;
    width: 100%;
}

.chatbot-input-wrapper-2{
	line-height: 1.4375em;
    color: #1E1F21;
    box-sizing: border-box;
    align-items: center;
    width: 100%;
    position: relative;
    padding-right: 14px;
    display: inline-flex;
    align-items: center;
    width: 100%;
    position: relative;
}

#chatbot-input {
  font-family: inherit;
  font-size: 14px;
    letter-spacing: inherit;
    color: currentColor;
    padding: 10px;
    border: 0;
    box-sizing: content-box;
    height: 1.4375em;
    margin: 0;
    display: block;
    min-width: 0;
    width: 100%;
    padding-right: 1.8rem;
    border-radius: 4px;
}

#chatbot-send {
  color: white;
  border: none;
  margin-left: 8px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
}

#chatbot-send-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  width: 24px;
  height: 24px;
  margin: 0px 5px;
  max-height: 2em;
}

#chatbot-send-icon svg {
  width: 100%;
  height: 100%;
  fill: #7c3aed; /* Change color as needed */
  transition: fill 0.2s ease;
}

#chatbot-send-icon:hover svg {
  fill: #5b21b6;
}

/* Footer */
.chatbot-footer {
  display: inline-flex;
  font-weight: 600;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  color: rgba(0, 0, 0, 0.6);
  width: 100%;
  background-color: transparent;
  justify-content: center;
  align-items: center;
  gap: 5px;
  }
  
  /* Chatbot Popup */
 #hailey-popup-message {
  display: none;
  position: fixed;
  font-family: inter;
  bottom: 110px; /* Adjust distance above the chatbot icon */
  right: 30px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  max-width: 300px;
  font-family: Inter, sans-serif;
  border: 1px solid #ccc;
  animation: fadeInPop 0.2s ease;
}

/* Message Arrow */
#hailey-popup-message-arrow {
  content: '';
  position: absolute;
  bottom: -5px; 
  right: 30px; 
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 1px solid #ccc;
  transform: rotate(45deg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 2;
}


#hailey-popup-intro,
#hailey-popup-help,
#hailey-popup-msg {
  display: block;
  margin-bottom: 6px;
  font-size: 90%;
  line-height: 1.4;
}

/* Gradient text */
#hailey-popup-intro {
  font-weight: 700;
  font-size: 150%;
  background: linear-gradient(90deg, #5A35B2, #FA4F96);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

#hailey-start-msg{
  font-size: 70%;
  color: #8396A8;
  display: block;
  text-align: right;
}

/* Fade In Animation */
@keyframes fadeInPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 767px) {
  #chatbot-sidebar {
    position: fixed;
    bottom: 20px;
    right: 35px;
    z-index: 9999;
    width: 75%;
    font-family: Inter;
    animation: fadeInSlideUp 0.3s ease-out forwards;
    animation-delay: 0.2s;
  }
  
  .chatbot-wrapper {
    padding: 1rem 0px 5px;
    right: 2.7rem;
    position: relative;
    width: 100%;
    border-radius: 10px;
    box-shadow: 1px 1px 5px 3px rgb(16 24 40 / 13%);
    background: #F5EEFF;
    overflow: visible;
  }

  .chatbot-wrapper .chatbot-close-btn{
    width: 100px;
    height: fit-content;
    display: block;
    position: absolute;
    background: none;
    border: 0px;
    outline: 0px;
    cursor: pointer;
    padding: 0;
    right: -55px;
    bottom: 0;
    z-index: 99;
  }
  
  #hailey-svg{
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80%;
  }
  
  #chatbot-input{
    font-size:13px;
  }
}