/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
:root {
  --text-color: #FFFFFF;
  --icon-color: #ACACBE;
  --icon-hover-bg: #5b5e71;
  --placeholder-color: #dcdcdc;
  --outgoing-chat-bg: #343541;
  --incoming-chat-bg: #444654;
  --outgoing-chat-border: #343541;
  --incoming-chat-border: #444654;
  --silent-color: #757575;
}
.light-mode {
  --text-color: #343541;
  --icon-color: #a9a9bc;
  --icon-hover-bg: #f1f1f3;
  --placeholder-color: #6c6c6c;
  --outgoing-chat-bg: #FFFFFF;
  --incoming-chat-bg: #F7F7F8;
  --outgoing-chat-border: #FFFFFF;
  --incoming-chat-border: #D9D9E3;
  --silent-color: #757575;
}
body {
  background: var(--outgoing-chat-bg);
}

.mn-overlay {
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  background-color: #343541;
  background-image: url(../../assets/images/branding/icon_wht.png), url(../../assets/images/icons/ajax.gif);
  background-position: center center, 50% 60%;
  background-repeat: no-repeat;
  position: fixed;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
}

.overlay-message {
  color: white;
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 18px;
  font-weight: bold;
}
/* Chats container styling */
.chat-container {
  overflow-y: auto;
  max-height: 100vh;
  padding-bottom: 150px;
  max-width: 950px;
  margin: auto auto;
  margin-top: 100px;
}
:where(.chat-container, textarea)::-webkit-scrollbar {
  width: 6px;
}
:where(.chat-container, textarea)::-webkit-scrollbar-track {
  background: var(--incoming-chat-bg);
  border-radius: 25px;
}
:where(.chat-container, textarea)::-webkit-scrollbar-thumb {
  background: var(--icon-color);
  border-radius: 25px;
}
.default-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
  padding: 0 10px;
  text-align: center;
  color: var(--text-color);
}
.default-text h1 {
  font-size: 3.3rem;
}
.default-text p {
  margin-top: 10px;
  font-size: 1.1rem;
}
.chat-container .chat {
  padding: 25px 10px;
  display: flex;
  justify-content: center;
  color: var(--text-color);
}
.chat-container .chat.outgoing {
  background: var(--outgoing-chat-bg);
  border: 1px solid var(--outgoing-chat-border);
}
.chat-container .chat.incoming {
  background: var(--incoming-chat-bg);
  border: 1px solid var(--incoming-chat-border);
}
.chat .chat-content {
  display: flex;
  max-width: 1200px;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
}
span.material-symbols-rounded {
  user-select: none;
  cursor: pointer;
}
.chat .chat-content span {
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--icon-color);
  visibility: hidden;
}
.chat:hover .chat-content:not(:has(.typing-animation), :has(.error)) span {
  visibility: visible;
}
.chat .chat-details {
  display: flex;
  align-items: center;
}
.chat .chat-details img {
  width: 35px;
  height: 35px;
  align-self: flex-start;
  object-fit: cover;
  border-radius: 2px;
}
.chat .chat-details div.markdown {
  white-space: pre-wrap;
  font-size: 1.05rem;
  padding: 0 50px 20px 25px;
  color: var(--text-color);
  word-break: break-word;
}
.chat .chat-details div.markdown img.profile {
  width: 200px;
  height: 200px;
}
.chat .chat-details p.error {
  color: #e55865;
}
.chat .typing-animation {
  padding-left: 25px;
  display: inline-flex;
}
.typing-animation .typing-dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  margin: 0 3px;
  opacity: 0.7;
  background: var(--text-color);
  animation: animateDots 1.5s var(--delay) ease-in-out infinite;
}
.typing-animation .typing-dot:first-child {
  margin-left: 0;
}
@keyframes animateDots {
  0%,44% {
    transform: translateY(0px);
  }
  28% {
    opacity: 0.4;
    transform: translateY(-6px);
  }
  44% {
    opacity: 0.2;
  }
}

/* Menu container styling */
.menu-container {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  padding: 10px;
  justify-content: center;
  background: var(--outgoing-chat-bg);
  border-bottom: 1px solid var(--incoming-chat-border);

}

.light-mode .menu-container,.light-mode .typing-container{
  background-color: #d2dad3;
}

.menu-container .menu-content{
  max-width: 950px;
  width: 100%;
  display: flex;
  max-width: 950px;
  width: 100%;
  align-items: flex-end;
  position: relative;
}

.menu-container .logo-area {
  width: 100%;
  display: flex;
  position: relative;
}

.menu-container .site-name{
  font-weight: bold;
  width: auto;
  padding-left: 5px;
  padding-right: 5px;
}

.menu-container .site-version{
  font-size: small;
  padding-left: 3px;
}

.superscript { position: relative; top: -0.5em; font-size: 80%; }
.subscript { position: relative; bottom: -0.5em; font-size: 80%; }

.menu-content span {
  width: 55px;
  height: 55px;
  display: flex;
  border-radius: 4px;
  font-size: 1.35rem;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
  cursor: pointer;
}


.menu-controls {
  display: flex;
}
.menu-controls span {
  margin-left: 7px;
  font-size: 1.0rem;
  background: var(--incoming-chat-bg);
  outline: 1px solid var(--incoming-chat-border);
}
.menu-controls span:hover {
  background: var(--icon-hover-bg);
}

.logo{
  filter: invert(0) hue-rotate(180deg) brightness(0.6);
}


.light-mode .logo{
  filter: invert(0) hue-rotate(180deg) brightness(0.6);
}



/* Typing container styling */
.typing-container {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  padding: 25px 10px;
  justify-content: center;
  background: var(--outgoing-chat-bg);
  border-top: 1px solid var(--incoming-chat-border);
}
.typing-container .typing-content {
  display: flex;
  max-width: 950px;
  width: 100%;
  align-items: flex-end;
}
.typing-container .typing-textarea {
  width: 100%;
  display: flex;
  position: relative;
}
.typing-textarea textarea {
  resize: none;
  height: 55px;
  width: 100%;
  border: none;
  padding: 15px 45px 15px 20px;
  color: var(--text-color);
  font-size: 1rem;
  border-radius: 4px;
  max-height: 250px;
  overflow-y: auto;
  background: var(--incoming-chat-bg);
  outline: 1px solid var(--incoming-chat-border);
}
.typing-textarea textarea::placeholder {
  color: var(--placeholder-color);
}
.typing-content span {
  width: 55px;
  height: 55px;
  display: flex;
  border-radius: 4px;
  font-size: 1.35rem;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
  cursor: pointer;
}
.typing-textarea span {
  position: absolute;
  right: 0;
  bottom: 0;
  visibility: hidden;
}
.typing-textarea textarea:valid ~ span {
  visibility: visible;
}
.typing-controls {
  display: flex;
}
.typing-controls span {
  margin-left: 7px;
  font-size: 1.0rem;
  background: var(--incoming-chat-bg);
  outline: 1px solid var(--incoming-chat-border);
}
.typing-controls.leftcon span {
  margin-right: 7px;
}
#speak-btn.listening{
  background-color: #e93a3a;
  color: #ccc;
}

#sound-btn.sound{
  background-color: #368aa3;
  color: #ccc;
}

#speechctrl-btn.speech{
  background-color: #368aa3;
  color: #ccc;
}

.typing-container .transcript{
  position: absolute;
  top: 6px;
  color: var(--icon-color);
  font-size: small;
}

.typing-container .footer{
  position: absolute;
  bottom: 2px;
  color: var(--silent-color);
  font-size: small;
}

.typing-container .footer a{
  text-decoration: none;
  color: var(--silent-color);
}

.typing-controls span:hover {
  background: var(--icon-hover-bg);
}

.system_text{
  font-size:smaller;
  color:#ccc;
}

body.light-mode .system_text{
  font-size:smaller;
  color:#817b7b;
}



.switch {
  display: inline-block;
  position: relative;
  width: 32px;
  height: 15px;
  border-radius: 20px;
  background: #848385;
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  vertical-align: middle;
  cursor: pointer;
}
.switch::before {
  content: '';
  position: absolute;
  top: 0px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #c9c7ce;
  border-radius: 50%;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), background 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.switch:active::before {
  box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 0 0 20px rgba(128,128,128,0.1);
}
input:checked + .switch {
  background: #72da67;
}
input:checked + .switch::before {
  left: 18px;
  background: #f7eaea;
}
input:checked + .switch:active::before {
  box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 0 0 20px rgba(0,150,136,0.2);
}

.response-list{
  border: 1px dashed #848385;
  padding: 5px !important;
  margin-top: 5px !important;
}

.response-list li{
  padding: 5px;
  margin: 10px !important;
  color: #cdb3e7;
}
/* Reponsive Media Query */
@media screen and (max-width: 600px) {
  .default-text h1 {
    font-size: 2.3rem;
  }
  :where(.default-text p, textarea, .chat p) {
    font-size: 0.95rem!important;
  }
  .chat-container .chat {
    padding: 20px 10px;
  }
  .chat-container .chat img {
    height: 32px;
    width: 32px;
  }
  .chat-container .chat p {
    padding: 0 20px;
  }
  .chat .chat-content:not(:has(.typing-animation), :has(.error)) span {
    visibility: visible;
  }
  .typing-container {
    padding: 29px 10px;
  }
  .typing-textarea textarea {
    height: 45px;
    padding: 10px 40px 10px 10px;
  }
  .typing-content span {
    height: 45px;
    width: 45px;
    margin-left: 5px;
  }
  span.material-symbols-rounded {
    font-size: 1.25rem!important;
  }
}

/* Markdown */
.markdown {
  max-width: unset
}

.markdown pre {
  margin-top: .5rem
}

.markdown h1 {
  font-weight: 700;
  letter-spacing: -.04rem
}

.markdown h1:first-child {
  margin-top: 0
}

.markdown h2 {
  font-weight: 600;
  margin-bottom: 0rem;
  margin-top: 1rem
}

.markdown h2:first-child {
  margin-top: 0
}

.markdown h3 {
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 1rem
}

.markdown h3:first-child {
  margin-top: -1rem;
}

.markdown h4 {
  font-weight: 600;
  margin-bottom: .5rem;
  margin-top: 1rem
}

.markdown h4:first-child {
  margin-top: 0
}

.markdown h5 {
  font-weight: 600
}

.markdown h5:first-child {
  margin-top: 0
}

.markdown blockquote {
  --tw-border-opacity: 1;
  border-color: rgb(155 155 155/var(--tw-border-opacity));
  line-height: 1.5rem;
  margin: 0;
  padding-bottom: .5rem;
  padding-top: .5rem
}

[dir=ltr] .markdown blockquote {
  border-left-width: 2px;
  padding-left: 1rem
}

[dir=rtl] .markdown blockquote {
  border-right-width: 2px;
  padding-right: 1rem
}

.markdown blockquote>p {
  margin: 0
}

.markdown blockquote>p:after,.markdown blockquote>p:before {
  display: none
}

.markdown table {
  --tw-border-spacing-x: 0px;
  --tw-border-spacing-y: 0px;
  border-collapse: separate;
  border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
  margin-bottom: .25rem;
  margin-top: .25rem;
  width: 100%
}

.markdown p {
  margin-bottom: -.5rem
}

.markdown p:not(:first-child) {
  margin-top: -.5rem
}

.markdown p+:where(ol,ul) ,.markdown ul {
  margin-top: -41px;
  padding: inherit;
}

.markdown ol{
  margin-top: -30px;
  padding-left: 15px ;
  counter-reset: item; /* Reset the counter */
  margin-bottom: -3rem;
}

.markdown ol li{
  list-style: none; /* Remove default list numbering */
  counter-increment: item; /* Increment the counter */
}

.markdown ol li, .markdown ul li {
  margin-top: -11px;
  padding: inherit;
  margin-bottom: -5px;
 
}

.markdown ol li::before {
  content: "(" counter(item) ") "; /* Add custom numbering format */
  font-weight: bold;
  /* color: #0056b3; */
}

.markdown ol ol {
  padding-left: 20px;
  counter-reset: sublist;
}

.markdown ol ol > li {
  list-style: none;
  counter-increment: sublist;
}

.markdown ol ol > li::before {
  content: "(" counter(sublist, lower-alpha) ") ";
  font-weight: bold;
  /* color: #28a745; */
}

/* .markdown ol ol ol {
  padding-left: 20px;
  counter-reset: subclause;
}

.markdown ol ol ol > li {
  list-style: none;
  counter-increment: subclause;
}

.markdown ol ol ol > li::before {
  content: "(" counter(subclause, lower-alpha) ") ";
  font-weight: bold;
  color: #3328a7;
} */

.markdown :where(ol,ul)>li>:last-child {
  margin-bottom: 0
}

.markdown :where(ol,ul)>li>:first-child {
  margin-bottom: -41px;
  margin-top: 0;
}

.markdown th {
  background-color: var(--border-light);
  border-bottom-width: 1px;
  border-color: var(--border-medium);
  border-top-width: 1px;
  padding: .25rem .75rem
}

[dir=ltr] .markdown th {
  border-left-width: 1px
}

[dir=rtl] .markdown th {
  border-right-width: 1px
}

[dir=ltr] .markdown th:first-child {
  border-top-left-radius: .375rem;
  padding-left: .75rem
}

[dir=rtl] .markdown th:first-child {
  border-top-right-radius: .375rem;
  padding-right: .75rem
}

[dir=ltr] .markdown th:last-child {
  border-right-width: 1px;
  border-top-right-radius: .375rem;
  padding-right: .75rem
}

[dir=rtl] .markdown th:last-child {
  border-left-width: 1px;
  border-top-left-radius: .375rem;
  padding-left: .75rem
}

.markdown td {
  border-bottom-width: 1px;
  border-color: var(--border-medium);
  padding: .25rem .75rem
}

[dir=ltr] .markdown td {
  border-left-width: 1px
}

[dir=rtl] .markdown td {
  border-right-width: 1px
}

[dir=ltr] .markdown td:first-child {
  padding-left: .75rem
}

[dir=rtl] .markdown td:first-child {
  padding-right: .75rem
}

[dir=ltr] .markdown td:last-child {
  border-right-width: 1px;
  padding-right: .75rem
}

[dir=rtl] .markdown td:last-child {
  border-left-width: 1px;
  padding-left: .75rem
}

[dir=ltr] .markdown tbody tr:last-child td:first-child {
  border-bottom-left-radius: .375rem
}

[dir=rtl] .markdown tbody tr:last-child td:first-child {
  border-bottom-right-radius: .375rem
}

[dir=ltr] .markdown tbody tr:last-child td:last-child {
  border-bottom-right-radius: .375rem
}

[dir=rtl] .markdown tbody tr:last-child td:last-child {
  border-bottom-left-radius: .375rem
}

.markdown a {
  color: var(--link);
  font-weight: 400;
  text-decoration-line: none
}

@media (hover: hover) and (pointer:fine) {
  .markdown a:hover {
      color:var(--link-hover)
  }
}

.gizmo .markdown>:not(pre),.gizmo .markdown>:not(pre)>:not(a) {
  color: var(--text-primary)
}

.markdown .float-image+p {
  margin-top: 0
}

