.wz-chat-wrapper {
  position: fixed;
  z-index: 9999;
}

.fill-black {
  fill: #252324;
}

.fill-brown {
  fill: #684d22;
}

.fill-gold {
  fill: #d6b787;
}

.fill-white {
  fill: #ffffff;
}

.wz-main {
  background-color: #d6b787;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 200ms ease-out;
}

.wz-main:hover {
  transform: scale(1.1);
}

.wz-chat-svg {
  width: 35px;
  height: 35px;
}

.wz-chat-second-svg,
.wz-chat-svg.inactive,
.wz-resize-btn-small.inactive,
.wz-resize-btn-big.inactive,
.wz-resize-btn-small {
  display: none;
}

.wz-chat-second-svg.active,
.wz-resize-btn-small.active {
  display: block;
}

.wz-essentifai-chat {
  position: fixed;
  bottom: 10%;
  right: 2%;
  width: 400px;
  height: 650px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition:
    width 0.2s ease,
    height 0.2s ease;
  animation: wz-close 500ms cubic-bezier(0.2, 1.1, 0.4, 1) forwards;
}

@media (max-width: 500px) {
  .wz-essentifai-chat {
    width: 95%;
  }
}

.wz-essentifai-chat.full {
  width: 98%;
  height: calc(87% - 10px);
  right: 1%;
}

.wz-essentifai-chat.active {
  display: flex;
  animation: wz-open 500ms cubic-bezier(0.2, 1.1, 0.4, 1) forwards;
}

.wz-chat-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#wz-chat-input:focus,
#wz-send-btn:focus {
  outline: none;
}

.wz-chat-footer {
  font-size: 11px;
  color: #999;
  margin: 0;
  padding-left: 15px;
}

.wz-chat-date {
  text-align: center;
  font-size: 12px;
  color: rgb(117, 117, 117);
  margin: 10px 0;
}

.wz-spin-fade {
  animation: spinAndFade 1s forwards;
}

.wz-chat-input-area {
  border: 1px solid rgba(0, 0, 0, 0.105);
  border-radius: 20px;
  padding: 10px;
  height: 37px;
  display: flex;
}

#wz-chat-input {
  flex-grow: 1;
  padding: 8px;
  border-radius: 5px;
  border: none;
  color: #252324;
}

#wz-send-btn {
  background-color: #d6b787;
  color: #fff;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  padding: 0 20px;
}

#wz-send-btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.wz-user-msg {
  display: flex;
  justify-content: end;
  margin: 10px 0;
}

.wz-user-msg p {
  background-color: #252324;
  color: #fff;
  border-radius: 12px;
  border-top-right-radius: 0;
  padding: 10px;
  margin: 0;
  font-size: 15px;
  max-width: 75%;
}

.wz-ai-msg,
.wz-ai-error-msg {
  word-break: break-word;
  font-size: 15px;
  max-width: 85%;
  display: flex;
  justify-content: start;
  flex-direction: column;
  align-items: start;
}

.wz-ai-msg,
.wz-ai-error-msg {
  background-color: #faf9f6;
  border: 1px solid #f4f3ef;
  border-radius: 12px;
  border-top-left-radius: 0;
  padding: 10px;
}

.wz-ai-msg p,
.wz-ai-error-msg p {
  margin: 0;
}

.wz-chat-header {
  background-color: #252324;
  color: #fff;
  text-align: center;
  padding: 12px;
  padding-left: 12px;
  height: 50px;
  display: flex;
  justify-content: start;
  align-items: center;
  position: relative;
  padding-left: 20px;
  gap: 10px;
}

.header-svg {
  flex-grow: 1;
}

#wz-chat-messages {
  flex-grow: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.wz-resize-btn {
  cursor: pointer;
}

@keyframes spinAndFade {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes wz-open {
  from {
    transform: scale(0.65);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes wz-close {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.65);
    opacity: 0;
  }
}

.chat-highlight {
  display: block;
  color: #a58d6c;
  font-weight: bold;
  margin-bottom: 5px;
}

.wz-chat-header-text {
  font-size: 12px;
  text-align: left;
}

.wz-chat-header-text p {
  margin: 0;
}

.chat-title {
  font-weight: bold;
  font-size: 16px;
}

.wz-chat-header-text p:last-child {
  color: rgb(167, 167, 167);
}

.wz-ai-msg.wz-chat-welcome-msg {
  background-color: #faf9f6;
  display: block;
}

.wz-ai-msg.wz-chat-welcome-msg p {
  line-height: 20px;
}

.wz-source-badge {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #a58d6c;
  transition: all 0.2s ease;
}

.wz-sources-wrapper {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.wz-source-badge {
  align-self: flex-start;
}

.wz-chain-link {
  stroke: #a58d6c;
  width: 14px;
  height: 14px;
  vertical-align: sub;
  margin-right: 4px;
}

.wz-essentifai-chat.full .wz-ai-msg {
  width: fit-content;
  max-width: 1200px;
}

/* Loader */
.wz-ai-msg.wz-ai-loader {
  background-color: transparent;
  border: none;
  padding: 0;
}

.wz-ai-loader {
  padding: 8px 12px;
  opacity: 0.7;
}

.wz-dots {
  display: inline-flex;
  gap: 6px;
}

.wz-dots span {
  width: 6px;
  height: 6px;
  background-color: currentColor;
  border-radius: 50%;
  animation: wz-bounce 1.4s infinite ease-in-out both;
}

.wz-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.wz-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes wz-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}
