/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
  --main-color: #1f3c70;
  --hover-color: #173670;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

.chatbot-toggler {
  position: fixed;
  bottom: 0px;
  right: 0px;
  outline: none;
  border: none;
  height: 48px;
  width: 48px;
  display: flex;
  cursor: pointer;
  align-items: center;
  padding: 0 12px;
  border-radius: 24px 24px 4px 24px;
  background: linear-gradient(135deg, #1f3c70, #4381f5); /* Modern gradient */
  transition: width 0.3s ease, border-radius 0.3s ease;
  overflow: visible;
}

.chatbot-toggler:hover {
  width: 130px;
}
/* Override the hover effect when body.show-chatbot is active */
body.show-chatbot .chatbot-toggler:hover {
  width: 48px; /* Or set it to whatever width you want when show-chatbot is active */
}

/* Remove position: absolute from this selector */
.chatbot-toggler span {
  color: #fff;
  transition: transform 0.2s ease-in-out;
}

.chatbot-toggler span:last-child,
body.show-chatbot .chatbot-toggler span:first-child  {
  opacity: 0;
  transform: rotate(90deg); /* Rotate the first symbol 90 degrees */
}

/* Hover text styling */
.chatbot-toggler-message {
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  margin-left: 10px; /* Spacing between the icon and the text */
  opacity: 0; /* Hidden initially */
  transform: translateX(-10px); /* Slide effect */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Reveal message text only on hover */
.chatbot-toggler:hover .chatbot-toggler-message {
  opacity: 1;
  transform: translateX(0); /* Slide into view */
}
body.show-chatbot .chatbot-toggler:hover .chatbot-toggler-message{
  opacity: 0; /* Or set it to whatever width you want when show-chatbot is active */
}
body.show-chatbot .chatbot-toggler:hover .toggler-indicator{
  opacity: 0; /* Or set it to whatever width you want when show-chatbot is active */
}
/* Reveal message text only on hover */
.chatbot-toggler:hover .toggler-indicator {
 display: block;
}

/* Chat icon styling */
.chat-icon {
  font-size: 26px;
  transform: scaleX(-1);
  align-items: center;
  vertical-align: center;
}

/* Common styling for both icons */
.chatbot-toggler .chat-icon,
.chatbot-toggler .material-symbols-outlined {
  font-size: 26px;
  color: #fff;
  position: absolute; /* Position icons absolutely to overlap */
  right: 10px;
  transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth transitions */
}


.chatbot-textbox {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 5px;
  margin-top: 10px;
  background-color: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Light shadow */
  font-size: 14px;
  color: #333;
  max-width: 250px;
  gap: 8px;
  white-space: normal;
  position: relative; /* For positioning the close button */
  
}



.textbox-close {
  position: absolute;
  top: -10px; /* Move it slightly outside the box */
  right: 0px; /* Move it slightly outside the box */
  width: 25px; /* Set width and height to be equal */
  height: 25px; /* Set width and height to be equal */
  font-size: 16px;
  color: #666;
  cursor: pointer;
  font-weight: bold;
  background: whitesmoke;
  border-radius: 50%; /* Makes it perfectly round */
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for button */
}

/* Show the close button on hover */
.chatbot-textbox:hover .textbox-close {
  display: flex;
}

/* Optional: style for hover effect on the close button */
.textbox-close:hover {
  color: #333;
  background: #d0d0d0;
}



/* Hide the text box when the chatbot is open */
body.show-chatbot .chatbot-textbox {
  display: none;
}




.chatbot {
  position: fixed;
  right: 35px;
  bottom: 60px;
  width: calc(100vw - 40px); /* Adjust the subtraction value as needed */
  height: calc(100vh - 68px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: bottom right;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.05), 0 4px 6px -3px rgba(0, 0, 0, 0.3);

  transition: all 0.1s ease;
}
body.show-chatbot .chatbot {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.chatbot header {
  padding: 18px 0;
  position: relative;
  color: #fff;
  background: var(--main-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chatbot-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 30px;
  width: auto;
}

.chatbot header span {
  position: absolute;
  right: 15px;
  top: 50%;
  /*display: none;*/
  cursor: pointer;
  transform: translateY(-50%);
}
header h2 {
  font-size: 1.4rem;
}
.chatbot .chatbox {
  overflow-y: auto;
  scrollbar-width: thin;
  height: calc(100vh - 150px); /* Adjust the subtraction value as needed */
  padding: 25px 20px 110px;
  background-color: #fffefe;
}

.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;
  width: 100%;
}
.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: var(--main-color);
  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: 75%;
  color: #fff;
  font-size: 2.9vw; /* 2% of the viewport width */
  background: var(--main-color);
  line-height: 1.5;
}

/*.chatbox .incoming p {
  border-radius: 10px 10px 10px 0;
}*/

.chatbox .chat p.error {
  color: #721c24;
  background: #f8d7da;
}
.chatbox .incoming p {
  color: #000;
  background: #f2f2f2;
  border-radius: 10px 10px 10px 0;
}
.chatbot .chat-input {
  display: flex;
  gap: 0px;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #fffefe;
  padding: 10px 16px 28px 16px;
  align-items: center;
}

.chat-input textarea {
  height: 48.2px; /* 5% of the viewport height */
  width: 100%;
  border: 1px solid transparent; /* Initial border */
  outline: none;
  resize: none;
  max-height: 180px;
  padding: 13px 40px 13px 15px;
  font-size: 12px; /* 2% of the viewport width */
  background-color: #f3f3f3; /* Slight grey color */
  border-radius: 15px; /* Make it a bubble */
  transition: background-color 0.3s ease-in-out, 
              transform 0.3s ease-in-out,
              border-color 0.3s ease-in-out;
  overflow-y: auto; /* Enable vertical scrolling */
  scrollbar-width: thin;
  scrollbar-color: #888 #f3f3f3;
}

.chat-input textarea::-webkit-scrollbar {
  width: 4px; /* Width of the scrollbar */
  margin-right: 5px; /* Move the scrollbar slightly to the right */
}

.chat-input textarea::-webkit-scrollbar-track {
  background: #f3f3f3; /* Match the textarea background */
  border-radius: 0 15px 15px 0; /* Round the right corners */
}

.chat-input textarea::-webkit-scrollbar-thumb {
  background: #888; /* Color of the scrollbar thumb */
  border-radius: 10px; /* Round the scrollbar thumb */
}

.chat-input textarea:focus {
  background-color: #f8f8f8;
  border-color: var(--main-color); /* Highlighted border color */
  transform: scale(1.01); /* Slightly enlarge on focus */
}

.chat-input textarea:active {
  background-color: #fffefe;
  transform: scale(1.01); /* Slightly reduce size on active */
}

.chat-input textarea:focus::placeholder {
  opacity: 0;
  transition: opacity 0.25s ease; /* Only transition the opacity */
}



.chat-input span {
  position: absolute;
  right: 28px;
  color: #848484;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5vw;
  width: 1.2em;
  height: 1.2em;
  transition: color 0.2s ease;
  z-index: 1; /* Ensure the span is above the pseudo-element */
  line-height: 1; 
}

.chat-input span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background-color: transparent;
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
  transform: translate(-50%, -50%) scale(0);
  z-index: -1; /* Place the pseudo-element behind the span content */
}

.chat-input span:hover::before {
  transform: translate(-50%, -50%) scale(1.75);
  background-color: #eceaea;
  
}

.chat-input span:active::before {
  transform: translate(-50%, -50%) scale(1.6);
  background-color: rgba(0, 73, 120, 0.1);
}

.chat-input span:active {
  color: var(--main-color);
}

.chat-input span:hover {
  color: var(--main-color);
}



#chat-messages li {
  list-style-type: none; /* Removes the default list item marker */
  padding: 0; /* Adjusts padding as needed for your design */
  margin-bottom: 15px;
}
/* Styles for customer messages */
.chatbox .customer-message {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.chatbox .customer-message p {
  white-space: pre-wrap;
  padding: 12px 16px;
  border-radius: 10px 10px 0 10px;
  max-width: 75%;
  color: #fff;
  background: var(--main-color); /* Blue background for customer */
  font-size: 2.9vw; /* 2% of the viewport width */
  line-height: 1.5;
  margin-bottom: 15px;
}

/* Styles for agent messages */
.chatbox .agent-message {
  display: flex;
  margin-bottom: 15px;
  justify-content: flex-start;
}

.chatbox .agent-message p {
  white-space: pre-wrap;
  padding: 12px 16px;
  border-radius: 10px 10px 10px 0;
  max-width: 75%;
  color: #333; /* Dark text for better contrast */
  background: #f3f3f3; /* Light background for agent */
  font-size: 2.9vw; /* 2% of the viewport width */
  line-height: 1.5;
}
.agent-favicon {
  width: 3vw; /* 3% of the viewport width */
  height: 3vw; /* 3% of the viewport width */
  margin-right: 1vw; /* Adds some space between the icon and the text */
  align-self: flex-end; /* Aligns the icon at the bottom of the flex container */
  border-radius: 5px; /* rounded edges */
}



.modal {
  display: none;
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 50% auto; /* Adjust this to change the vertical position */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* You might want to adjust this for better mobile responsiveness */
  text-align: center;
}


#signUpForm {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 20px 20px;
  height: calc(75vh - 60px); /* Adjust for header height */
}

.form-scroll-area {
  width: 100%;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  margin-bottom: 5px; /* Space above the button */
  max-height: calc(100% - 100px); /* Adjust this value to leave space for the button */
}

#signUpForm input[type="text"],
#signUpForm input[type="email"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

#signUpForm #userMessage {
  width: 100%;
  padding: 10px;
  margin-bottom: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

#signUpForm #userMessage {
  height: 100px; /* Fixed height for the message area */
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
  white-space: pre-wrap;
}

#signUpForm label {
  width: 100%;
  margin-bottom: 5px;
  font-size: 1rem;
  text-align: left;
  color: #333;
  display: block;
}

#startChatBtn {
  padding: 10px 20px;
  background-color: var(--main-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease-in-out;
  margin-top: auto; /* Push the button to the bottom */
}

#startChatBtn:hover {
  background-color: var(--hover-color);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 10px 10px;
  height: 100%; /* Ensure full height of header */
}

.left-section, .right-section {
  flex: 1; /* Both sections take equal space */
  display: flex;
  align-items: center;
}

.left-section {
  justify-content: flex-start; /* Aligns content to the left */
  margin-left: 7.5px;
}

.right-section {
  justify-content: flex-end; /* Aligns content to the right */
  margin-right: 7.5px;
}

.livechat-header {
  display: flex;
  align-items: center;
  font-size: 13.5px;
  color: #fffefe; /* Matches your design */
}

  .online-indicator {
    position: relative;
    width: 10px;
    height: 10px;
    justify-content: center;
    margin-left: 7.5px;
    border-radius: 50%;
    background-color: #fffefe;
    border: 1px solid rgb(238, 238, 238);
  }

  
  .online-indicator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgb(238, 238, 238);
    transform: translate(-50%, -50%) scale(1);
    animation: ring-animation 1.25s infinite;
    pointer-events: none;
  }
  
  @keyframes ring-animation {
    0% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
    100% {
      transform: translate(-50%, -50%) scale(2);
      opacity: 0;
    }
  }

#new-session-btn {
  padding: 10px 20px;
  background-color: var(--main-color); /* Use the chatbot theme color */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease-in-out;
}

#new-session-btn:hover {
  background-color: var(--hover-color); /* A darker shade for hover state */
}

.message-container {
  
  flex-direction: column;
  word-wrap: break-word; /* Ensure long words break and wrap to the next line */
  overflow-wrap: break-word; /* Ensure long words break and wrap to the next line */
  line-height: 1.5; /* Adjust line height for better alignment */
}


/* CSS for the loading indicator itself */
.loading-indicator {
  display: block; /* Makes the indicator appear on a new line */
  font-size: 2.5vw; /* 2% of the viewport width */
  color: #888; /* A less prominent color */
  text-align: center; /* Center align the text */
  margin-top: -15px; /* Space above the indicator */
  display: flex;
  justify-content: flex-end;
}

.agent-favicon {
  width: 30px; /* Set the width of the icon */
  height: 30px; /* Set the height of the icon */
  margin-right: 10px; /* Adds some space between the icon and the text */
  align-self: flex-end; /* Aligns the icon at the bottom of the flex container */
  border-radius: 5px; /* Rounded edges */
}

#chatbot-iframe {
  position: fixed;
  bottom: 30px;
  right: 35px;
  width: 50px;
  height: 50px;
  z-index: 1000;
  border: none;
}

.no-personal-info {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 4px;
  background: #fffefe; /* Match the background color of the chat messages */
  font-size: 2.2vw; /* 2% of the viewport width */
  color: #a0a0a0; /* Match the text color */
  position: absolute;
  bottom: 79px; /* Adjusted to be above the chat input */
  left: 50%; /* Center horizontally */
  transform: translateX(-50%); /* Center horizontally */
  width: calc(100% - 30px); /* Add margin on the sides */
  text-align: center;
  font-style: italic;
}

/* Additional media query for mobile devices */
.mobile-device .chatbot {
  position: fixed;
  right: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1), 0 8px 12px -6px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.mobile-device .chatbox .chat p {
  white-space: pre-wrap;
  padding: 12px 16px;
  border-radius: 10px 10px 0 10px;
  max-width: 75%;
  color: #fff;
  font-size: 3.5vw; /* 2% of the viewport width */
  background: var(--main-color);
  line-height: 1.5;
}

.mobile-device .chatbox .incoming p {
  color: #000;
  background: #f2f2f2;
  border-radius: 10px 10px 10px 0;
}

.mobile-device .chatbox .agent-message p {
  white-space: pre-wrap;
  padding: 12px 16px;
  border-radius: 10px 10px 10px 0;
  max-width: 75%;
  color: #333; /* Dark text for better contrast */
  background: #f3f3f3; /* Light background for agent */
  font-size: 3.5vw; /* 2% of the viewport width */
  line-height: 1.5;
}

.mobile-device .chatbox .customer-message p {
  white-space: pre-wrap;
  padding: 12px 16px;
  border-radius: 10px 10px 0 10px;
  max-width: 75%;
  color: #fff;
  background: var(--main-color); /* Blue background for customer */
  font-size: 3.5vw; /* 2% of the viewport width */
  line-height: 1.5;
  margin-bottom: 15px;
}

.mobile-device .system-message {
  display: flex;
  justify-content: flex-start;
  max-width: 75%; /* Align width calculation */
  background: #f3f3f3;
  color: #333;
  border-radius: 10px;
  font-size: 3.5vw; 
  line-height: 1.5;
  margin-bottom: 15px; /* Adds more space above and below each message */
}


.mobile-device .chatbot header {
  padding: 20px 0;
}

.mobile-device .header-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  position: relative;
}

.mobile-device .online-indicator {
    position: relative;
    width: 10px;
    height: 10px;
    justify-content: center;
    margin-left: 7.5px;
    border-radius: 50%;
    background-color: #fffefe;
    border: 1px solid rgb(238, 238, 238);
}

.mobile-device .left-section,
.mobile-device .right-section {
  flex: 0 0 auto;
  width: auto;
}

.mobile-device .chatbot-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 27.5px;
}

.mobile-device .livechat-header {
  font-size: 3.5vw;
}

.mobile-device .online-indicator {
  width: 8px;
  height: 8px;
}

.mobile-device .dropdown-toggle {
  font-size: 20px;
  margin-right: 50px;
}

.mobile-device .dropdown-menu {
  right: 0;
  left: auto;
}

.mobile-device header h2 {
  font-size: 1.2rem;
}

.mobile-device body.show-chatbot .chatbot-toggler {
  transform: rotate(90deg);
}

.mobile-device .chatbot-toggler span {
  color: #fff;
  position: absolute;
}

.mobile-device .chatbot-toggler span:last-child,
.mobile-device body.show-chatbot .chatbot-toggler span:first-child {
  opacity: 0;
}

.mobile-device body.show-chatbot .chatbot-toggler span:last-child {
  opacity: 1;
}

.mobile-device .chat-input textarea {
  height: 48.2px; /* 5% of the viewport height */
  width: 100%;
  border: 1px solid transparent; /* Initial border */
  outline: none;
  resize: none;
  max-height: 180px;
  padding: 13px 40px 13px 15px;
  font-size: 16px; /* 2% of the viewport width */
  font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif; /* Fonts that look smaller */
  background-color: #f3f3f3; /* Slight grey color */
  border-radius: 15px; /* Make it a bubble */
  transition: background-color 0.3s ease-in-out, 
              transform 0.3s ease-in-out,
              border-color 0.3s ease-in-out;
  overflow-y: auto; /* Enable vertical scrolling */
  scrollbar-width: thin;
  scrollbar-color: #888 #f3f3f3;
  -webkit-text-size-adjust: 100%; /* Prevent auto zoom */
  text-size-adjust: 100%;
}

.mobile-device .chatbot .chatbox {
  padding: 20px 15px 200px; 
  height: calc(100vh); /* Adjust the subtraction value as needed */
  overflow-y: auto; 
  -webkit-overflow-scrolling: touch; 
  scroll-behavior: smooth; 
}

.mobile-device .chat-input {
  padding: 14px 10px;
  bottom: 12px;
}

.mobile-device .chat-input textarea:focus {
  background-color: #f8f8f8;
  border-color: var(--main-color); /* Highlighted border color */
  transform: scale(1.01); /* Slightly enlarge on focus */
}

.mobile-device .chat-input span {
  position: absolute;
  font-size: 1.2rem;
  right: 30px; /* 3% of the viewport width */
  cursor: pointer;
  display: flex;
  align-items: center;
}

.mobile-device .cendo-powered-by {
  opacity: 1;
  padding: 3px 0; /* Padding for spacing */
}


.feedback-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 5px 0;
}

.feedback-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  background-color: transparent; /* Remove the background color */
  position: relative;
}

.feedback-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feedback-content p {
  margin: 0 0 5px;
  font-size: 0.8em; /* Smaller font size for the text */
  color: #a0a0a0;
}

.emoji-buttons {
  display: flex;
  justify-content: center;
}

.emoji-buttons button {
  background: none;
  border: none;
  font-size: 1.5em; /* Keep emojis large */
  cursor: pointer;
  margin: 0 5px;
  transition: transform 0.2s;
}

.emoji-buttons button:hover {
  transform: scale(1.2);
}

.close-btn-feedback {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
}

.skip-button {
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8em;
  border-radius: 5px;
  background-color: transparent; /* Remove the background color */

}

.skip-button:hover {
  transform: scale(1.2);
}

.confirmation-message {
  font-size: 0.75rem; /* Smaller font size */
  color: #666; /* Lighter color for confirmation message */
  text-align: center; /* Center the text */
  padding: 8px 0; /* Reduced padding for a more compact look */
  background: transparent; /* No background color */
  border: none; /* No border */
  width: 100%;
}


#message-counter {
  position: absolute;
  top: 0px; /* Adjust as needed */
  right: 0px; /* Adjust as needed */
  background-color: red;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  z-index: 10; /* Ensure it appears above other elements */
  display: none; /* Initially hidden */

  /* Center the content */
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Dropdown container */
.dropdown {
  position: relative;
  display: inline-block;
  margin-right: 35px;
  width: 24px; /* Set button width */
  height: 24px; /* Set button height to match width */
}

.dropdown-toggle {
  background-color: var(--main-color); /* Light blue color for the button */
  border: none;
  cursor: pointer;
  display: inline-flex; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  width: 24px; /* Set button width */
  height: 24px; /* Set button height to match width */
  font-size: 22px; /* Font size for the icon */
  line-height: 24px; /* Adjust line height to match button height */
  padding: 0; /* Remove padding */
  margin: 0; /* Remove margin */
  color: white; /* Icon color */
  position: relative; /* Add relative positioning */
}

/* Pseudo-element to adjust icon position */
.dropdown-toggle::before {
  content: "..."; /* Use the desired icon or text here */
  position: absolute;
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(-50%, -75%); /* Fine-tune icon position */
  font-size: 24px; /* Font size for the icon */
  line-height: 1; /* Adjust line height for icon */
  color: white; /* Icon color */
}

/* Hide original content */
.dropdown-toggle > * {
  visibility: hidden; /* Hide original button content */
}

/* Hover effect for the toggle button */
.dropdown-toggle:hover {
  background-color: var(--hover-color); /* Background color on hover */
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--hover-color); /* Creates an outer shadow that makes the button appear larger */
  transition: box-shadow 0.2s ease, background-color 0.2s ease; /* Smooth transition for box-shadow and background-color */
}

/* Dropdown menu */
.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff; /* Light gray background */
  border-radius: 8px; /* Rounded corners */
  min-width: 150px; /* Increased minimum width for menu items */
  padding: 8px 0; /* Vertical padding for the dropdown container */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  z-index: 1;
  right: 0;
}

/* Menu items */
.dropdown-menu a {
  color: #333; /* Dark text color */
  padding: 12px 16px; /* Adequate padding for spacing */
  text-decoration: none;
  display: block;
  background-color:#fff; /* White background for items */
  transition: background-color 0.3s ease; /* Smooth transition on hover */
  white-space: nowrap; /* Prevent text from wrapping */
}

/* Hover effect */
.dropdown-menu a:hover {
  background-color: #f6f6f6; /* Slight gray hover effect */
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Dropdown animation */
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px); /* Slide from top */
  }
  to {
    opacity: 1;
    transform: translateY(0); /* Position in place */
  }
}


.chatbot-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fffefe;      /* match your watermark bg */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 0;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: rgba(0, 0, 0, 0.6);
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 10;                    /* sit above chat content */
}
.chatbot-footer:hover {
  opacity: 1;
}

/* Privacy link */
.chatbot-footer .privacy-link {
  margin: 0 6px;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}
.chatbot-footer .privacy-link:hover {
  text-decoration: underline;
  color: rgba(0, 0, 0, 0.8);
}

/* Separator dot */
.chatbot-footer .footer-separator {
  margin: 0 6px;
  color: rgba(0, 0, 0, 0.4);
  user-select: none;
}

/* Powered-by link */
.chatbot-footer .powered-by {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, color 0.2s ease;
}
.chatbot-footer .powered-by:hover {
  transform: scale(1.1);
  color: rgba(0, 0, 0, 0.8);
}
.chatbot-footer .powered-logo {
  height: 14px;
  margin-left: 3px;
  display: block;
}


.close-btn:hover {
  background-color: var(--hover-color); /* Background color on hover */
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--hover-color); /* Creates an outer shadow that makes the button appear larger */
  transition: box-shadow 0.2s ease, background-color 0.2s ease; /* Smooth transition for box-shadow and background-color */
}



.mobile-banner {
  position: fixed;
  bottom: 10px; /* Stick to the bottom */
  left: 5%;
  right: 5%;
  background-color: white;
  color: black;
  text-align: center;
  padding: 20px 15px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); /* Reduced shadow */
  border-radius: 8px;
  z-index: 2147483635;
  font-size: 12px; /* Smaller font size */
}

.mobile-banner .text {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between items */
  margin-bottom: 5px; /* Space between text and buttons */
  text-align: left;
  padding-right: 20px;
}

.mobile-banner .text img {
  height: 40px; /* Smaller height */
  border-radius: 50%;
}

.mobile-banner button {
  border: 1px solid var(--main-color); /* Add border to all buttons */
  padding: 5px 5px; /* Smaller padding */
  cursor: pointer;
  margin-top: 3px; /* Smaller margin */
  margin-bottom: 0;
  border-radius: 4px;
  font-size: 14px; /* Smaller font size */
  width: 100px; /* Fixed width for consistency */
}

.mobile-banner .standard-btn {
  background-color: var(--main-color);
  color: white;
  margin-left: 10px;
}

.mobile-banner .standard-btn:hover {
  background-color: var(--hover-color);
}

.mobile-banner .inverted-btn {
  background-color: white;
  color: var(--main-color);
  margin-right: 10px;
}

.mobile-banner .inverted-btn:hover {
  background-color: var(--main-color);
  color: white;
}

.mobile-banner .close-btn {
  position: absolute;
  background-color: transparent;
  top: 5px; /* Adjusted to px */
  right: 5px; /* Adjusted to px */
  color: var(--main-color);
  border: none;
  padding: 5px; /* Adjusted padding */
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px; /* Adjusted to px */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 16px; /* Adjusted to px */
  width: 16px; /* Adjusted to px */
}

.mobile-banner .close-btn:hover {
  color: #fff;
  background-color: var(--main-color);
}

.typing-indicator {
  display: inline-block;
}
.typing-indicator span {
  animation: blink 1.4s infinite both;
  animation-fill-mode: both;
  height: 8px;
  width: 8px;
  background: var(--main-color);
  border-radius: 50%;
  display: inline-block;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0% {
      opacity: 0.1;
  }
  20% {
      opacity: 1;
  }
  100% {
      opacity: 0.1;
  }
}


.system-message-livechat {
  font-size: 0.70rem;
  color: #666; /* A lighter color for system messages */
  text-align: center; /* Center the message */
  padding: 10px 0; /* Space around the message */
  background: transparent; /* No background color */
  border: none; /* No border */
}



.suggested-questions-container {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
}

.suggested-questions-container button {
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 20px;
  background-color: #ffffff;
  color: #495057;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.suggested-questions-container button:hover {
  background-color: #f1f3f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .suggested-questions-container {
    flex-wrap: wrap;
  }
  
  .suggested-questions-container button {
    flex: 1 0 calc(50% - 8px);
    font-size: 2vw;
  }
}




/* Make all form elements consistent */
.input, select.input, .input option, input.input {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem; /* Explicitly set the same font size for all */
  line-height: 1.5; /* Consistent line height */
  height: auto; /* Let height be determined by content and padding */
  padding: 8px; /* Consistent padding */
}

/* Ensure select dropdown has the exact same appearance */
select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 30px; /* Make room for the dropdown arrow */
}

/* Fix any browser-specific sizing differences */
select.input, input.input {
  box-sizing: border-box;
  width: 100%;
}

/* Ensure dropdown options have consistent styling too */
select.input option {
  font-size: 0.85rem;
  padding: 5px 8px;
}






.input-group {
  position: relative;
  margin: 10px 0;
}

.input {
  border: solid 1.5px #000000;
  border-radius: 0.8rem;
  background: none;
  padding: 8px;
  font-size: 0.75rem;
  color: #000000;
  transition: border 150ms cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%; /* Ensure full width */
}

.user-label {
  position: absolute;
  left: 10px;
  color: #000000;
  pointer-events: none;
  transform: translateY(8px);
  font-size: 0.85rem; /* Smaller label text */
  transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center; /* Standardize scaling */
}

.input:focus,
.input:valid {
  outline: none;
  border: 1.5px solid #000000;
}

.input:focus ~ .user-label,
.input:valid ~ .user-label {
  transform: translateY(-50%) scale(0.70);
  background-color: #212121;
  padding: 0 .2em;
  color: #ffffff;
}



.lead-form-text {
  font-size: 2.9vw; /* Matches agent message font size */
  margin-bottom: 10px; /* Space between text and input fields */
  color: #333; /* Matches agent message text color */
  line-height: 1.5; /* Consistent line height */
}



.lead-form {
  background-color: #f3f3f3; /* Matches agent message background */
  border-radius: 10px 10px 10px 0; /* Same border radius as agent messages */
  padding: 12px 16px; /* Matches padding of other messages */
  font-family: 'Arial', sans-serif;
  max-width: 75%; /* Keeps form width consistent */
}


.lead-form-row {
  display: flex;
  gap: 5px; /* Spacing between fields */
  margin-bottom: 10px;
}

.lead-form-field {
  flex: 1;
}

.lead-form-label {
  font-size: 0.75rem;
  color: #495057;
  margin-bottom: 5px;
  font-weight: bold;
}

.lead-form-input {
  width: 100%;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #ced4da;
  font-size: 0.75rem;
}

.lead-form-input:focus {
  outline: none;
  border-color: var(--main-color);
}

.lead-form-submit {
  background-color: var(--main-color);
  color: white;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
}


.lead-form-submit:hover {
  background-color: var(--hover-color);
}

.lead-form-submit:active {
  transform: translateY(1px);
}

.lead-form-close {
  float: right;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: -15px -8px 0 0;
  transition: color 0.3s;
}

.lead-form-close:hover {
  color: #343a40;
}

@media (max-width: 480px) {
  .lead-form-row {
    flex-direction: column;
    gap: 8px; /* Further reduced gap for smaller screens */
  }
}



.confirmation-wrapper {
  display: flex;
  align-items: center;
  padding-left: 0;
}

.system-message {
  display: flex;
  justify-content: flex-start;
  max-width: 75%; /* Align width calculation */
  background: #f3f3f3;
  color: #333;
  border-radius: 10px;
  font-size: 2.9vw; 
  line-height: 1.5;
  margin-bottom: 15px; /* Adds more space above and below each message */
}

.system-message p {
  margin: 0;
  white-space: pre-wrap;
  padding: 12px 16px;

}

.confirmation-content {
  display: flex-end;
  align-items: center;
}


#checkmark-animation {
  width: 30px; /* Set the width of the icon */
  height: 30px; /* Set the height of the icon */
  margin-right: 10px; /* Adds some space between the icon and the text */
  align-self: flex; /* Aligns the icon at the bottom of the flex container */
  border-radius: 5px; /* Rounded edges */
}



.car-image-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.car-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.2s;
}

.image-gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px;
  max-width: 100%;
  position: relative;
}

.car-image-container {
  margin: 10px 0 0 0;  display: inline-block;
  vertical-align: top;
}


.image-wrapper {
  max-width: 300px;
  margin: 5px 0;
  position: relative;
}

.car-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.car-gallery-image:hover {
  transform: scale(1.05);
}

.image-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none; /* This allows clicks to pass through to the link */
}

.image-wrapper:hover .image-controls {
  opacity: 1;
}

.control-btn {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  color: #333;
  padding: 10px;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
  pointer-events: auto; /* Re-enable pointer events for buttons */
  z-index: 2;
}

.control-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}


.prev-btn, .next-btn {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  color: #333;
  padding: 10px;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.prev-btn:hover, .next-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.car-image-viewer {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

.viewer-image {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.viewer-close-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* Scrollbar styling */
.car-image-container::-webkit-scrollbar {
  height: 6px;
}

.car-image-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.car-image-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.car-image-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.dynamic-link {
  color: inherit; /* Use the text color from the surrounding element */
  text-decoration: underline; /* Optional hover effect */
  background-color: transparent; /* Ensure no background color is applied */
}

.dynamic-link {
  color: inherit; /* Use the text color from the surrounding element */
  text-decoration: underline; /* Optional hover effect */
  background-color: transparent; /* Ensure no background color is applied */
}