.main-chat {
  top: 0;
  width: 100%;
  position: absolute;
  height: 100vh;
  z-index: 9999;
  line-height: 22px !important;
  font-size: 14px !important;
  font-weight: normal !important;
  font-family: 'Poppins', sans-serif;
  /* backdrop-filter: blur(2px); */
}

.chat-modules{
  position: relative;
}

.main-chat-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #f0f0f0;
  border-radius: 25px;
}

.main-chat-input {
  border: none;
  outline: none;
  background: none;
  flex-grow: 1;
  font-size: 16px;
}

.main-send-btn {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #D3D3D3;
  padding: 2px 8px;
  width: 100%;
  transition: width 0.3s ease, height 0.3s ease;
  height: 42px;
  border-radius: 8px;
  /* margin-top: 10px; */
}

.chat-input {
  border: none;
  outline: none;
  background: none;
  width: calc(100% - 60px);
  font-size: 1rem;
  padding-left: 12px;
}

.chat-error-msg {
  background-color: #fa3246;
  color: #fff;
  border-color: transparent;
}

.chat-error-msg .arrow::after {
  border-top-color: #fa3246;
}

.chat-error-msg .popover-body {
  color: #fff;
}

.send-btn {
  border: none;
  border-radius: 50%;
  padding: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #D3D3D3;
}

.scroll-to-bottom {
  border: none;
  border-radius: 50%;
  padding: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  position: absolute;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, .1);
  bottom: 10%;
  left: calc(50% - 20px);
  display: none;
}

.scroll-to-bottom.active {
  display: block;
}

.mini-expand {
  background-color: #f0f0f0;
  height: 500px;
}

#main-chatbot-div {
  position: absolute;
  z-index: 1000000;
  top: 0px;
  /* margin-top: 100px; */
  /* position: fixed;
  z-index: 5;
  margin-top: 10px; */
  border-radius: 10px;
  flex-direction: column;
  justify-content: flex-end;
  max-height: 90vh; 
  /* overflow: hidden;  */
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  /* left: 5%; */
  box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
    /* backdrop-filter: blur(10px); */
    /* padding: 20px 20px 0px 20px; */
}

#main-chatbot-div.expanded {
  animation: expand-Div 1s ease-in-out forwards;
  /* width: 50%; */
}

@keyframes expand-Div {
  from {
    width: 100%;
    height: 50%;
  }
  to {
    width: 100%; /* Final width */
    height: 90%;
  }
}

#main-chatbot-div.minimize {
  animation: expand-Div-mini 1s ease-in-out forwards;
  /* width: 50%; */
}

@keyframes expand-Div-mini {
  from {
    width: 100%; /* Initial width */
    height: 90%;
  }
  to {
    width: 100%;
    height: 50%;
  }
}

#main-chatbot-div.expand {
  width: 100%;
  overflow: hidden;
  animation: expandDiv 1s ease-in-out forwards;
}

#main-chatbot-div.collaspe {
  animation: collapseDiv 1s ease-in-out forwards;
}

@keyframes collapseDiv {
  0% {
      height: 100%;
  }
  100% {
    height: 0;
  }
}

@keyframes expandDiv {
  0% {
      /* width: 100%; */
      height: 0;
  }
  100% {
      /* width: 100%; */
      height: 100%;
  }
}

.hidden {
  display: none;
}

.show {
  display: block;
}

#chat-recaptcha {
  margin-bottom: 0px;
  position: relative;
  transform: scale(0.8);
  transform-origin: 0 0;
}

#mini-exp-seend-btn{
  border: 1px solid #ccc;
  height: 35px;    
  border-left: none;
  background: #D3D3D3;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

#mini-exp-seend-btn.expanded {
  top: 10px;
  position: relative;
  border-bottom-left-radius: 0;
}

/* questions section */
.main-question span{
  color: #FFF;
  padding: 10px;
} 

.suggested-questions {
  display: flex;
  margin-top: 13px;
  overflow-x: scroll;
  /* max-width: calc(2.5 * 212px);  */
  white-space: nowrap;
  scrollbar-width: none; 
  -ms-overflow-style: none; 
  width: 100%;
  display: none; 
}

.suggested-questions::-webkit-scrollbar {
  display: none; 
}

.main-question {
  min-width: 200px; 
  padding: 10px;
  box-sizing: border-box;
  flex-shrink: 0; 
  background: #555;
  border-radius: 25px;
  border: solid orange 2px;
  padding: 6px;
  color: #FFF;
  margin-right: 8px;
}
 
/* expand button */

.expand-btn {
  display: none;
  position: absolute;
  top: 0px;
  right: 0px;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.expand-btn.show {
  opacity: 1; /* Fade in when shown */
}

.ico-file {
  position: relative;
  top: 4px;
  margin-left: 4px;
}

/* @keyframes moveForwardAndBack {
  0% { transform: scale(1); }     
  50% { transform: scale(1.3); }   
  100% { transform: scale(1); }     
}

.expand-btn.animate {
  animation: moveForwardAndBack 0.9s ease-in-out;
} */

@keyframes moveForwardLeftAndRight {
  0% {
    transform: translateZ(0) translateX(0);
  }
  40% {
    transform: scale(1.3); /* Moves forward */
  }
  70% {
    transform: translateZ(20px) translateX(-20px); /* Moves left */
  }
  100% {
    transform: translateZ(0) translateX(0); /* Moves back to original position */
  }
}

.expand-btn.animate {
  animation: moveForwardLeftAndRight 0.9s ease-in-out;
}
  
/* response  */
  
#main-content {
    padding: 10px;
    overflow-y: auto;
    height: calc(100% - 35px);
    width: 100%;
}

#main-content.expanded{
  height: 95% !important;
}

.message-container {
  display: flex;
  justify-content: flex-end; 
  width: 100%;
  margin-top: 10px;
}

.user-message {
    background-color: #FFA500; 
    color: white;
    padding: 10px;
    border-radius: 15px;
    margin: 10px 0;
    width: fit-content;
    align-self: flex-start; 
    word-wrap: break-word; 
    overflow-wrap: break-word;
}

.bot-message {
    background: #E9E9E9;
    color: black;
    padding: 10px;
    border-radius: 15px;
    margin: 10px 0;
    max-width: 80%;
    align-self: flex-end; 
    word-wrap: break-word; 
    overflow-wrap: break-word;
    overflow: hidden; 
}

.bot-message p {
  color: #333 !important;
  margin-top: 0;
  margin-bottom: 1rem;
  position: relative;
}

.bot-message pre {
  display: block;
  margin-top: 0;
  margin-bottom: 16px;
  font-size:  12px;
  line-height: 0px;
  overflow-y: hidden;
  overflow-x: auto;
}

.bot-message pre code {
  font-size: inherit;
  color: inherit;
  word-break: normal;
  line-height: normal;
  height: auto !important;
  display: block;
}

.bot-message form label {
  font-weight: 600;
}

.bot-message h1 {
  font-size: 36px;
  margin-top: 0;
  margin-bottom: .5rem;
  color: var(--panelBg);
}

.bot-message h2 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: .5rem;
}

.bot-message h3 {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  margin-top: 0;
  margin-bottom: .5rem;
}

.bot-message h4 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: .5rem;
}

.bot-message ul {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.bot-message a {
  color: #f2932a;
  font-weight: 500;
}

#chat-history-container {
  height: 100%;
  padding: 11px 10px 11px 10px;
  padding-top: 0;
  margin-top: 120px;
  overflow-x: hidden;
  scrollbar-width: none; /* For Firefox */
  -ms-overflow-style: none;  /* For Internet Explorer and Edge */
}


/* side bar section */

#inner-mian-chatbot-div{
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#main-sidebar{
  width: 25%;
  height: 100%;
  background: #C0C0C0;
  display: none;
  overflow-x: scroll;
  scrollbar-width: none;
  padding-bottom: 20px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

#inner-mian-chatbot-div.expanded {
  width: 100% !important; 
  height: 100% !important; 
}

#main-content-div{
  width: 100%;
}

#main-content-div.expanded{
  width:75% !important
}

/* today history */

.message-container-history {
    font-family: Arial, sans-serif;
    width: 90%;
    margin: 8px;
    padding: 2px;
    background-color: #f0f0f0;
    border-radius: 10px;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    padding-top: 10px;
    padding-left: 3%;
    width: 90%;
}

.message-header span {
    font-weight: bold;
    color: #555;
}

.header-line {
    flex-grow: 1;
    margin-left: 10px;
    border: none;
    border-top: 1px solid #ccc;
}

.message-card {
  background: #FFFFFF40;
  border-radius: 10px;
  box-shadow: 0px 0px 5px 0px #00000026;
  padding: 10px;
  align-items: center;
  justify-content: space-between;
}

.message-text {
    margin: 0;
    font-size: 14px;
    color: #000000;
    white-space: nowrap;       
    overflow: hidden;  
    text-overflow: ellipsis;
}

.support-button {
    background: #D27400CC;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: 5px;
    font-family: SF Pro;
}

.support-button .support-icon {
    margin-right: 5px;
}


/* yesterday history */

.message-card-yes {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0px 0px 4px 0px #00000026;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.message-text-yes {
    margin: 0;
    font-size: 14px;
    color: #000000;
}

.support-button-yes {
    background: #3C62D0;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: 5px;
    font-family: SF Pro;
}

.support-button-yes .support-icon-yes {
    margin-right: 5px;
}

/* user new chat */

.chat-container.expanded {
  width: 100% !important;
}

.chat-container.minimize {
  width: 75% !important;
}


.chat-container {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* Full height of the viewport */
  box-sizing: border-box;
  width: 75%;
  position: relative;
}

.chat-header-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Aligns content to the left */
  margin-right: 20px; /* Margin from the right */
  padding: 20px;
}

.center-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1; /* Ensures it takes up available space */
}

.chat-header {
  margin: 0 0 20px 0; /* Space between the header and suggested questions */
  text-align: left;
}

.chat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid #ccc;
}

.main-chat-input {
  padding: 10px;
  color: #000;
  box-sizing: border-box;
  width: calc(100% - 60px);
  background: #D3D3D3;
  border-top: 1px solid;
  border-image-source: linear-gradient(180deg, rgba(245, 245, 245, 0.5) 0%, rgba(102, 102, 102, 0.5) 3.5%);
  border-bottom-right-radius: 10px;
}

.main-chat-input::placeholder {
  color: rgb(117, 117, 117) !important;
}

.main-send-btn {
  border: none;
  background: #D3D3D3;
  border-radius: 4px;
  padding: 0px;
  cursor: pointer;
  display: flex;
  align-items: center;
}


/* new question */

.new-main-question span{
  color: #FFF;
  padding: 10px;
} 

.new-suggested-questions {
  display: flex;
  overflow-x: scroll;
  white-space: nowrap;
  scrollbar-width: none; 
    width: 100%;
}

.new-suggested-questions::-webkit-scrollbar {
  display: none; 
}

.new-main-question {
  min-width: 200px; 
  padding: 10px;
  box-sizing: border-box;
  flex-shrink: 0; 
  border-radius: 25px;
  background-color: orange;
  padding: 6px;
  color: #FFF;
  margin-right: 8px;
}

/* active */
.message-card.active {
  box-shadow: 0px 0px 4px 0px #00000026;
  border: 2.5px solid #00000080;
  background: #FFFFFFBF;
}

#loading_gif {
  display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

#loading_gif.expanded {
  width: 125%;
}
#loading_gif .loading {
  width: 70px;
  height: 70px;
  border: none;
  outline: none;
}


.btn-close-collapse {
    position: absolute;
    background: #C0C0C0;
    top: -27px;
    right: 0px;
    font-size: 12px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    transition: opacity 0.5s ease;
    padding: 3px 4px 3px 4px;
    gap: 2px;
    border-radius: 10px 10px 0px 0px;
    border:none;
    box-shadow: 0px 0px 5px 0px #00000026;
}

.btn-close-main-chat {
  position: absolute;
  background: #C0C0C0;
  top: -26px;
  right: 16px;
  font-size: 12px;
  cursor: pointer;
  display: none;
  z-index: 10;
  transition: opacity 0.5s ease;
  padding: 4px 8px;
  border:none;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.btn-close-main-chat svg {
  position: relative;
    top: 0px;
    margin-right: 4px;
}

.main-chat .btn-close-main-chat {
  display: block;
}

.button-container {
  display: flex;
  gap: 10px; 
}

.branding-button { 
  color: #00000080;
  background: #00000026;
  border: 1px dashed #EBEBEB;
  font-family: SF Pro;
  /* font-size: 8px; */
  font-weight: 590;
  line-height: 9.55px;
  text-align: left;
  border-radius: 15px; 
  padding: 10px 20px; 
  font-size: 13px; 
  cursor: pointer; 
  outline: none;
}

.new-chat-button {
  background: #FFFFFF80;
  color: #444444;
  border: none; 
  line-height: 1;
  text-align: left;
  font-size: 12px;

  border-radius: 15px; 
  padding: 8px 12px;
  cursor: pointer; 
  outline: none;
  display: flex;
  align-items: center; 
}

.new-chat-button span {
  line-height: 9.55px;
  text-align: left;
  margin-left: 5px;
}

.main-header {
  position: absolute;
  background: transparent;
  padding: 11px 10px 11px 10px;
  width: 25%;
  /* height: 16%; */
}



/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;  /* Adjust the width as needed */
  height: 26px; /* Decrease the height */
  margin-right: 10px; /* Space between switch and text */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px; /* Make sure the border-radius matches the height for a perfect circle */
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; /* Smaller knob */
  width: 18px; /* Smaller knob */
  left: 3px;  /* Center the knob */
  bottom: 3px; /* Center the knob */
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

/* When the toggle is checked (Dark Mode) */
input:checked + .slider {
  background-color: #1a1a1a; /* Darker background for the slider */
  border: 1px solid #555; /* Adding a border for better distinction */
}

input:checked + .slider:before {
  background-color: #222222; /* Light gray handle for contrast */
  transform: translateX(26px);
}

#theme-toggle-text {
  font-size: 14px;
  display: block;
}

/* Light Mode Styles */
#main-chatbot-div.light-mode #theme-toggle-text {
  color: #000;
}

#main-chatbot-div.light-mode .switch .slider {
  background-color:#222222;
  border: 1px solid #aaa; /* Adding a border to the slider in light mode */
}

/* Dark Mode Styles */
#main-chatbot-div.dark-mode #theme-toggle-text {
  color: #fff;
}

#main-chatbot-div.dark-mode .switch .slider {
  background-color: #444; /* Darker slider background */
  border: 1px solid #666; /* Adding a border for distinction */
}

/* Dark Mode Styles */
#main-chatbot-div.dark-mode #inner-mian-chatbot-div #main-sidebar {
  background-color: #222222;
  color: #fff;
}

#main-chatbot-div.dark-mode #inner-mian-chatbot-div .chat-container{
  background-color: #333333;
}

#main-chatbot-div.dark-mode #inner-mian-chatbot-div .chat-header-container .chat-header{
  color: #EEEEEE;
}

#main-chatbot-div.dark-mode #inner-mian-chatbot-div .chat-header-container .new-suggested-questions .new-main-question{
  background: #975C13;
}

#main-chatbot-div.dark-mode #inner-mian-chatbot-div .chat-container{
  background-color: #333333;
  color: #fff;
}


#main-chatbot-div.dark-mode #inner-mian-chatbot-div #main-sidebar #chat-history-container .message-header span{
    color: #888888;
}

#main-chatbot-div.dark-mode #inner-mian-chatbot-div #main-sidebar #chat-history-container .message-container-history{
  background: #333333;
}

#main-chatbot-div.dark-mode {
  border: 1px solid #333;
  background: #333333;
}

#main-chatbot-div.dark-mode #main-content-div #main-content .message-container .user-message{
  background: #975C13;
}

#main-chatbot-div.dark-mode #main-content-div #main-content .bot-message  {
  background: #444444;
}

#main-chatbot-div.dark-mode #main-content-div #main-content .bot-message * {
  color: #EEEEEE;
}

#main-chatbot-div.dark-mode #mini-exp-seend-btn input{
  background: #BDBDBD;

}

#main-chatbot-div.dark-mode .main-send-btn {
  background-color: #222222;
  color: #BBBBBB;
  border: 1px solid #555;
}

#main-chatbot-div.dark-mode .branding-button {
  background-color: #222222;
  color: #BBBBBB;
  border: 1px solid #555;
}

#main-chatbot-div.dark-mode .theme-toggle .slider {
  background-color: #fff; /* Light slider in dark mode */
}

.pre-wrapper {
  position: relative;
  margin-top: 40px;
  margin-bottom: 20px;
}

.copy-button {
  position: absolute;
  background: #E9E9E9;
  opacity: 1;
  width: 26px;
  height: 26px;
  color: #fff;
  border: none;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
  right: -6px;
  top: -32px;
}

.copy-button svg {
  position: absolute;
  top: 5px;
  left: 5px;
}

.bot-message img {
  display: block;
  margin: 4px 0;
}