@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css);
* {
  box-sizing: border-box;
  font-family: Montserrat, "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
}
html, body {
  background-color: #c1c1c1;
  margin: 0;
  width: 100%;
  height: 100%;
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
}
.chat-ai {
  display: flex;
  width: 655px;
  height: 100%;
}
.chat-ai .open-sidebar {
  position: absolute;
  display: none;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  top: 20px;
  left: 0;
  width: 50px;
  height: 50px;
  background-color: #2e3137;
  border-radius: 0 5px 5px 0;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
  z-index: 2;
}
.chat-ai .open-sidebar i {
  color: #fff;
  font-size: 20px;
}
.chat-ai .open-sidebar:hover {
  background-color: #292c31;
}
.chat-ai .conversations {
  position: relative;
  display: flex;
  flex-flow: column;
  align-items: center;
  width: 280px;
  min-width: 280px;
  height: 100%;
  background-color: #292c31;
  z-index: 2;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
}
.chat-ai .conversations .new-conversation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px;
  margin: 20px 0;
  width: calc(100% - 35px);
  color: #fff;
  border: 1px solid #696b6f;
  border-radius: 5px;
  font-size: 14px;
  transition: border .2s ease;
}
.chat-ai .conversations .new-conversation i {
  margin-right: 7px;
}
.chat-ai .conversations .new-conversation:hover {
  border: 1px solid #fff;
}
.chat-ai .conversations .list {
  display: flex;
  flex-flow: column;
  flex: 1;
  overflow-y: auto;
  width: 100%;
  height: 100%;
}
.chat-ai .conversations .list .conversation {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 43px;
  min-height: 43px;
  padding: 12px 16px;
  width: calc(100% - 35px);
  color: #fff;
  font-size: 14px;
  margin: 0 auto 5px auto;
  border-radius: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-ai .conversations .list .conversation i {
  margin-right: 10px;
}
.chat-ai .conversations .list .conversation:hover {
  background-color: #1d2023;
}
.chat-ai .conversations .list .conversation.selected {
  background-color: #16181b;
}
.chat-ai .conversations .footer {
  display: flex;
  width: 100%;
  padding: 12px;
  border-top: 1px solid #35383f;
}
.chat-ai .conversations .footer a {
  display: inline-flex;
  text-decoration: none;
  color: #696b6f;
  padding: 10px;
}
.chat-ai .conversations .footer a.close-sidebar {
  margin-left: auto;
}
.chat-ai .conversations .footer a:hover {
  color: #bfc0c1;
}
.chat-ai .content {
  /* background-color: #444850; */
  color: #308e75;
  background-color: #fff;
  position: relative;
  width: 100%;
  overflow:hidden;
}
.chat-ai .content::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 125px;
  width: 655px;
  /* background: linear-gradient(to top, #444850 50%, transparent); */
  /* background: linear-gradient(to top, #308e75 90%, transparent); */
  background-color: #308e75;
}
.chat-ai .content .welcome {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  font-size: 20px;
  padding-bottom: 200px;
}
.chat-ai .content .welcome h1 {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 40px;
  color: white;
  /* background-color: #f3ec78; */
  /* background-image: linear-gradient(45deg, #12C2E9 0%, #c471ed 50%, #f64f59 100%); */
  /* background-size: 100%; */
  /* background-clip: text; */
  /* -webkit-background-clip: text; */
  /* -moz-background-clip: text; */
  /* -webkit-text-fill-color: transparent; */
  /* -moz-text-fill-color: transparent; */
}
.chat-ai .content .welcome h1 .ver {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  width: 55px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  margin-left: 15px;
  font-weight: 500;
  background-color: #383c42;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -moz-background-clip: border-box;
  -webkit-text-fill-color: currentcolor;
  -moz-text-fill-color: currentcolor;
}
.chat-ai .content .welcome p {
  margin: 0;
  font-size: 20px;
  padding: 40px 0 60px 0;
}
.chat-ai .content .welcome p a {
  color: #c5c8ce;
  font-size: inherit;
  text-decoration: none;
  border-bottom: 1px dotted #c5c8ce;
}
.chat-ai .content .welcome p a:hover {
  color: #e1e2e5;
}
.chat-ai .content .welcome .open-database {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  padding: 12px 15px;
  background-color: #316bc2;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: background-color .2s ease;
}
.chat-ai .content .welcome .open-database i {
  margin-right: 8px;
}
.chat-ai .content .welcome .open-database:hover {
  background-color: #2e64b6;
}
.chat-ai .content .messages {
  display: flex;
  flex-flow: column;
  flex-direction: column-reverse;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  border-bottom: 1px solid #3f434a;
    /* padding-bottom: 120px; */
}
.conversation-title {
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-all;
  padding: 15px;
  /*border-bottom: 1px solid #3f434a;*/

  /* position: fixed; */
  top: 0;
  width:655px;
  /* background-color: #444850; */
  background-color: #308e75;
  min-height:110px;
  flex-direction: column;
}
.conversation-title h2 .text {
  font-size: 24px;
  font-weight: 500;
  color: #ecedee;
}
.conversation-title h2 i {
  cursor: pointer;
  position: relative;
  font-size: 14px;
  top: -3px;
  margin-left: 10px;
  color: #8f9196;
}
.conversation-title h2 i:hover {
  color: #c7c8cb;
}
.chat-ai .content .messages .message {
  padding: 25px;
}
.chat-ai .content .messages .message .wrapper {
  display: flex;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.chat-ai .content .messages .message .wrapper .avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  max-width: 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #3a71c5;
  font-weight: 500;
  /* color: #444850; */
  color: #308e75;
  background-color: #fff;
}
.chat-ai .content .messages .message.user .wrapper .avatar {
  background-color: #308e75;
  color: #fff;
}

.chat-ai .content .messages .message .wrapper .details {
  flex: 1;
  display: flex;
}
.chat-ai .content .messages .message .wrapper .details .date {
  font-size: 12px;
  font-weight: 500;
  padding: 0 25px;
  color: #515151;
  float: right;
}
.chat-ai .content .messages .message .wrapper .details .text {
  margin: 5px 25px;
  padding: 8px;
  background-color: #e1e1e1;
  /* width: 100%; */
}
.chat-ai .content .messages .message.assistant .wrapper .details .text {
  border-top-right-radius: 8px; 
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  margin-left: 0px;
}
.chat-ai .content .messages .message.user .wrapper .details .text {
  border-top-left-radius: 8px; 
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  max-width: 90%;
  margin-right: 0px;
}
.chat-ai .content .messages .message.user .wrapper .details {
  text-align: right;
}
.chat-ai .content .messages .message .wrapper .details .text pre {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border-radius: 5px;
  background-color: #2d2f34;
}
.chat-ai .content .messages .message .wrapper .details .text pre code {
  text-indent: 40px;
  /* font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; */
  font-size: 14px;
}
.chat-ai .content .messages .message .wrapper .details .text .tokens {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 4px;
  background-color: #3b3e45;
  font-size: 12px;
  font-weight: 500;
  margin-top: 25px;
  color: rgba(255, 255, 255, 0.7);
}
.chat-ai .content .messages .message {
  /* border-top: 1px solid #3f434a;
  border-bottom: 1px solid #3f434a; */
  color: #444;
  background-color: white;
}
.chat-ai .content .messages .message.user .wrapper .avatar {
  background-color: #308e75;
}
.chat-ai .content .messages .message.assistant .wrapper .text .blink {
  animation: blink 1s infinite;
}
@keyframes blink {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.chat-ai .content .message-form {
  position: absolute;
  bottom: 50px;
  max-width: 600px;
  width: 572px;
  left: 5%;
  /* left: 0; */
  right: 0;
  /* margin-left: auto; */
  margin-right: auto;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background-color: white;
  z-index: 1;
}
.chat-ai .content .message-form textarea {
  width: 100%;
  height: 100%;
  padding: 15px 64px 15px 15px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  outline: 0;
  color: #444850;
  background-color: transparent;
  overflow: hidden;
  resize: none;
}
.chat-ai .content .message-form textarea::placeholder {
  color: #8e949f;
}
.chat-ai .content .message-form button.submitButton {
  position: absolute;
  right: -40px;
  top: 0;
  bottom: 19px;
  appearance: none;
  border: none;
  background-color: transparent;
  color: white;
  cursor: pointer;
  transition: color .2s ease;
  display: flex;
  align-items: flex-end; /* Aligns items to the end of the cross-axis (vertical axis in this case) */
}

.chat-ai .content .message-form button.talkButton {
  position: absolute;
  right: 10px;
  top: 0;
  bottom: 19px;
  appearance: none;
  border: none;
  background-color: transparent;
  color: #8e949f;
  cursor: pointer;
  transition: color .2s ease;
  display: none;
  align-items: flex-end; /* Aligns items to the end of the cross-axis (vertical axis in this case) */
}

.chat-ai .content .message-form button:hover {
  color: #b7bbc2;
}
.chat-ai .error-toast, .chat-ai .success-toast {
  display: flex;
  padding: 12px 15px;
  max-width: 100%;
  position: fixed;
  top: 25px;
  right: 25px;
  background-color: #ffc3c3;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-left: 3px solid #df4747;
  font-weight: 500;
  font-size: 14px;
  color: #bb3c3c;
  opacity: 1;
  transition: opacity 5s ease;
}
.chat-ai .success-toast {
  background-color: #c3ffdc;
  border-left: 3px solid #4bcc81;
  color: #50ad77;
}
.chat-ai-modal {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}
.chat-ai-modal .content {
  border-radius: 5px;
  overflow: hidden;
  transform: scale(0.5);
  background-color: #3c4047;
  box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.03);
  width: 400px;
}
.chat-ai-modal .content .heading {
  display: flex;
  padding: 20px;
  margin: 0;
  font-weight: 500;
  justify-content: space-between;
  color: #fff;
  border-bottom: 1px solid #464a52;
  align-items: center;
}
.chat-ai-modal .content .heading .modal-close {
  font-size: 24px;
  line-height: 24px;
  padding-bottom: 4px;
  cursor: pointer;
  color: gray;
}
.chat-ai-modal .content .heading .modal-close:hover {
  color: white;
}
.chat-ai-modal .content .footer {
  display: flex;
  border-top: 1px solid #464a52;
  background-color: #40444c;
  padding: 20px;
}
.chat-ai-modal .content form {
  display: flex;
  flex-flow: column;
  padding: 20px;
}
.chat-ai-modal .content form.file-manager-editor {
  padding: 0;
}
.chat-ai-modal .content form label {
  color: #fff;
  padding-bottom: 10px;
  font-size: 14px;
}
.chat-ai-modal .content form input {
  width: 100%;
}
.chat-ai-modal .content form input, .chat-ai-modal .content form select {
  font-size: 14px;
  border: none;
  border-radius: 4px;
  padding: 0 8px;
  height: 38px;
  margin-bottom: 15px;
  background-color: #535963;
  color: #b1b3b5;
}
.chat-ai-modal .content form input[type="checkbox"] {
  width: auto;
}
.chat-ai-modal .content form .group {
  display: flex;
}
.chat-ai-modal .content form .group > :first-child {
  margin-right: 10px;
}
.chat-ai-modal.large .content {
  width: 900px;
}
.chat-ai-modal.medium .content {
  width: 600px;
}
.chat-ai-modal.open {
  display: flex;
}
.chat-ai-modal.open .content {
  transform: scale(1);
  transition: all 0.2s ease;
}
.chat-ai-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  background-color: #316bc2;
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  height: 38px;
}
.chat-ai-modal .btn:hover {
  background-color: #2e64b6;
}
.chat-ai-modal .btn.alt {
  color: #fff;
  background-color: #31343a;
}
.chat-ai-modal .btn.alt:hover {
  background-color: #2f3237;
}
.chat-ai-modal .btn.disabled {
  pointer-events: none;
  background-color: #b1b3b4;
}
.chat-ai-modal .btn.disabled:hover {
  background-color: #a9abad;
}
.chat-ai-modal .btn.right {
  margin-left: auto;
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  position: relative;
  /* background-color: #444850; */
  background-color: #308e75;
  padding: 20px;
  padding-top: 40px; /* Extra padding to accommodate close button */
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: 500px;
  width: 90%;
  color: #fff;
  text-align: center;
  margin: calc(20% - 100px) auto;
}
.modal-content h2 {
  margin-top: 0;
  font-size: 24px;
}
.modal-content p {
  margin-bottom: 20px;
}
.modal-content .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}
.modal-content .close-button:hover {
  color: #ccc;
}
#startStopButton {
  background-color: #316bc2;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#submitButton {
  background-color: #4db007;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#startStopButton:hover {
  background-color: #2e64b6;
}
#recordedAudio {
  margin-top: 20px;
  width: 60%;
  margin: 30px auto auto auto;
}
.scroll-to-bottom {
  display:none; 
  position: absolute;
  right: 26px; 
  cursor: pointer; 
  z-index: 1000;
  bottom: 145px;
}


@media screen and (max-width: 800px) {
  .scroll-to-bottom {
    right: 10px;
  }
  .chat-ai {
    width: 100%;
  }      
  .chat-ai .open-sidebar {
    display: flex;
  }
  .chat-ai .conversations {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
  }
  .chat-ai .content {
    width: 100%;
  }
  .chat-ai .content .messages .message {
    padding: 20px;
  }
  .chat-ai .content .messages .message .wrapper .avatar {
    min-width: 40px;
    max-width: 40px;
    width: 40px;
    height: 40px;
  }
  .chat-ai .content .messages .message .wrapper .details .date {
    padding: 0 15px;
  }
  .chat-ai .content .messages .message .wrapper .details .text {
    padding: 5px 15px;
  }
  .chat-ai .content .message-form {
    bottom: 25px;
    width: unset;
    margin-right: 55px;
  }
  .modal-content {
    margin: calc(50% - 100px) auto;
  }
  .chat-ai .content .conversation-title {
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
    padding: 15px;
    border-bottom: 1px solid #3f434a;
    /* position: fixed; */
    top: 0;
    width:100% !important;
    min-height:110px;
    flex-direction: column;
  }  
  .message-form .talkButton {
    display: none !important;
  }
}



/* WebKit browsers (Chrome, Safari) */
.messages::-webkit-scrollbar {
  width: 8px; /* Width of the scrollbar */
}

.messages::-webkit-scrollbar-track {
  background: #f1f1f1; /* Background of the scrollbar track */
  border-radius: 10px; /* Rounded corners for the track */
  margin-top: 1px;
  margin-bottom: 1px;
}

.messages::-webkit-scrollbar-thumb {
  background: #888888; /* Color of the scrollbar thumb */
  border-radius: 10px; /* Rounded corners for the thumb */
}

.stimulus {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.message.user .wrapper .details {
  justify-content: right;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  animation: fadeIn 0.3s forwards;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  transform: scale(0.95);
  transition: transform 0.3s ease-in-out;
  animation: scaleIn 0.3s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes scaleIn {
  to { transform: scale(1); }
}

.zoom-text {
  font-size: 12px;
  color: #666;
  /* margin-top: 5px; */
  text-align: center;
}
