/* Import Google font - Poppins */

:root {
  --fa-icon: rgb(0, 0, 0);
  --formContainer-chat-bg: rgb(239, 246, 255);
  --text-color: rgb(0, 0, 0);
  --icon-color: rgb(0, 0, 0);
  --outgoing-chat-color: rgb(0, 0, 0);
  --icon-hover-bg: rgb(239, 246, 255);
  --placeholder-color: rgb(220, 220, 220);
  --outgoing-chat-bg: rgb(219, 234, 254);
  --incoming-chat-bg: rgb(255, 255, 255);
  --container-chat-bg: rgb(255, 255, 255);
  --outgoing-chat-border: rgb(219, 234, 254);
  --incoming-chat-border: rgb(219, 234, 254, 0);
  --text-error: #000;
  --text-customMessage: #000;
  --send-button: rgb(8, 47, 73);
  --send-button-text: rgb(224, 242, 254);
  --link-color: rgb(0, 0, 255);
}

/* fallback */
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 100 700;
  src: url(https://fonts.gstatic.com/s/materialsymbolsrounded/v177/sykg-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190Fjzag.woff2) format('woff2');
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.chat-popup .container-chat {
  max-width: 40rem;
  max-height: 50rem;
}

/* Chats container styling */
.chat-container {
  overflow-y: auto;
  height: 40rem;
  max-height: 60vh;
  background: var(--container-chat-bg);
  /* padding-bottom: 150px; */
}

:where(.chat-container, textarea)::-webkit-scrollbar {
  width: 0.375rem;
}

:where(.chat-container, textarea)::-webkit-scrollbar-track {
  background: var(--incoming-chat-bg);
  border-radius: 1.5625rem;
}

:where(.chat-container, textarea)::-webkit-scrollbar-thumb {
  background: var(--icon-color);
  border-radius: 1.5625rem;
}

.default-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  text-align: center;
  color: var(--text-color);
}

.customMessage {
  padding: 10px;
  margin-top: -25px;
  width: 100%;
  background: var(--incoming-chat-bg);
  color: var(--text-customMessage);
  box-shadow: 0px 0px 15px 0px #d5d6de66;
}

.default-text h1 {
  font-size: 2.3rem;
}

.default-text p {
  margin-top: 0.625rem;
  font-size: 0.875rem;
}

.chat-container .chat {
  padding: 1rem .5rem;
  display: flex;
  justify-content: center;
  color: var(--text-color);
}

.chat-container .chat.outgoing {
  background: rgb(250 250 250);
  /* color: var(--outgoing-chat-color); */
  /* border: 0.0625rem solid var(--outgoing-chat-border); */
}

.chat-container .chat.incoming {
  background: var(--incoming-chat-bg);
  color: var(--outgoing-chat-color);
  border: 0.0625rem solid var(--incoming-chat-border);
}

.chat .chat-content {
  display: flex;
  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: flex-start;
}

.chat .chat-details img {
  width: 2.1875rem;
  height: 2.1875rem;
  align-self: flex-start;
  object-fit: cover;
  border-radius: 0.125rem;
}

.chat .chat-details p {
  white-space: pre-wrap;
  font-size: 13px;
  padding: 0.2rem .25rem 0 1.5625rem;
  color: var(--text-color);
  word-break: break-word;
}

.chat .chat-details p.error {
  color: var(--text-error);
}

.warning-msg {
  color: red;
  padding: 12px;
  font-size: 16px;
}

.fa-headset,
.fa-user,
.fa-rocketchat {
  color: var(--fa-icon);
}

.chat .typing-animation {
  padding-left: 1.5625rem;
  display: inline-flex;
  margin-top: 12px;
}

.typing-animation .typing-dot {
  height: 0.4375rem;
  width: 0.4375rem;
  border-radius: 50%;
  margin: 0 0.1875rem;
  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(-0.375rem);
  }

  44% {
    opacity: 0.2;
  }
}

/* Typing container styling */
.typing-container {
  display: flex;
  border-radius: 0 0 0.625rem 0.625rem;
  justify-content: center;
  color: var(--outgoing-chat-color);
  background: var(--formContainer-chat-bg);
  width: 100%;
  border-top: 0.0625rem solid #eaeaea;
}

.typing-container .typing-content {
  display: flex;
  width: 100% !important;
  hight: 1000%;
  align-items: flex-end;
}

.typing-container .typing-textarea {
  width: 100%;
  display: flex;
  position: relative;
}

.typing-textarea textarea {
  resize: none;
  max-height: 3.75rem;
  min-height: 4.75rem;
  width: 100%;
  border: none;
  padding-left: 0.9375rem;
  padding-bottom: 0.9375rem;
  padding-top: 1.0625rem;
  padding-right: 3.25rem;
  color: var(--text-color);
  font-size: 13px;
  border-radius: 0.25rem;
  overflow-y: auto;
  background: var(--incoming-chat-bg);
  outline: 0.0625rem solid var(--incoming-chat-border);
}

.typing-textarea textarea::placeholder {
  color: var(--placeholder-color);
}

.typing-content span {
  width: 3.4375rem;
  height: 3.75rem;
  min-height: 3.75rem;
  display: flex;
  border-radius: 0.25rem;
  font-size: 1.35rem;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
}

.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: 0.4375rem;
  font-size: 1.4rem;
  background: var(--incoming-chat-bg);
  outline: 0.0625rem solid var(--incoming-chat-border);
}

.typing-controls span:hover {
  background: var(--icon-hover-bg);
  border: 1px solid var(--outgoing-chat-bg);
}


.icon-chat {
  padding: 12px 0;
}

.welcome-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  font-size: 24px;
  padding: 12px 0;
  justify-content: center;
}

.chat-container:has(.chat) .welcome-msg {
  display: none;
}

/* .relativeItem{
positionrelative;} */
/* Button used to open the chat form - fixed at the bottom of the page */
.open-button {
  background-color: var(--send-button);
  color: white;
  max-width: fit-content;
  position: fixed;
  bottom: 1.4375rem;
  right: 1.75rem;
  font-size: 3.6rem;
  min-height: 8rem;
  min-width: 8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100%;
  border: none;
  z-index: 999;
}

/* The popup chat - hidden by default */
.chat-popup {
  display: none;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  background: white;
  border-radius: 0.625rem;
  box-shadow: 20px 20px 60px #bebebe,
    -20px -20px 60px #ffffff;
  z-index: 999;
  scale: 1;
  width: 32rem;
}

/* Add styles to the form container */
.form-container {
  max-width: 18.75rem;
  padding: 0.625rem;
  background-color: white;
}

/* Set a style for the submit/send button */
.typing-textarea button.btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--send-button);
  color: var(--send-button-text);
  border-radius: 4px;
  top: 0;
  bottom: 0;
  margin-block: auto;
  padding: 1rem;
  border: none;
  cursor: pointer;
  width: fit-content;
  right: 0;
  height: fit-content;
  margin-right: 0.5rem;
  opacity: 0.8;
}

/* Add a red background color to the cancel button */
.form-container .cancel {
  background-color: red;
}

/* Add some hover effects to buttons */
.typing-textarea button.btn:hover,
.open-button:hover {
  cursor: pointer;
  opacity: 1;
}

.closeicon {
  display: flex;
  cursor: pointer;
  background: var(--send-button);
  justify-content: space-between;
  padding: 1rem;
  font-size: 1.5rem;
  color: var(--placeholder-color);
  border-radius: 0.625rem 0.625rem 0 0;
  border-bottom: 1px solid #eaeaea;
  align-items: center;
}

.fa-headset,
.fa-user,
.fa-rocketchat {
  color: rgb(113 113 113);
}

.closeicon i {
  padding: 0 8px;
}

.chat-content a {
  color: var(--link-color);
}

.typing-inner-container {
  width: 100%;
}

.chat-details i {
  element.style {
    padding: 8px 9px;
    background: #eaeaea;
    border-radius: 50%;
  }

  ;

  element.style {
    padding: 8px 9px;
    background: #eaeaea;
    border-radius: 50%;
  }

  ;

  element.style {
    padding: 8px 9px;
    background: #eaeaea;
    border-radius: 50%;
  }

  ;
}

.chat-details i {
  padding: 8px 9px;
  background: #eaeaea;
  border-radius: 50%;
}