.chatbot {
  --yellow: #DA3F42;
  --grey: #FFEEEE;
  --black: #2B2D33;

  color: var(--black);
}

@keyframes btnSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes svgScale {
  20% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.8);
  }

  80% {
    transform: scale(1);
  }
}
.chatbot-popup * {
  min-width: initial;
  min-height: initial;
}

.chatbot__toggler {
  /* height: 40px;
	width: 40px; */
  height: 48px;
  width: 48px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  background: radial-gradient(113.91% 103.56% at 62.92% 99.49%, #FEE600 0%, #FDEACA 100%);
  transition: all 0.2s ease;
  margin-bottom: 8px;
  box-shadow: 0 0 14.4px 4.44px rgba(216, 175, 245, 0.80);
  animation: btnSpin 7s linear infinite;
  user-select: none;
}

.chatbot__toggler span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  height: fit-content;
  animation: svgScale 3s ease-in-out infinite;
}

/* .show-chatbot #chatbot-toggler {
	transform: rotate(90deg);
} */

#chatbot-toggler span {
  color: #fff;
  position: absolute;
}

/* .show-chatbot #chatbot-toggler span:first-child,
#chatbot-toggler span:last-child {
	opacity: 0;
}

.show-chatbot #chatbot-toggler span:last-child {
	opacity: 1;
} */


.chatbot-popup {
  position: fixed;
  z-index: 101;
  right: 25px;
  /* bottom: 90px; */
  bottom: 25px;
  width: 360px;
  height: 470px;
  background: #fff;
  overflow: hidden;
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.2);
  transform-origin: bottom right;
  pointer-events: none;
  box-shadow: 0 0 128px rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;

  /* resize: both; */
  min-width: 360px;
  min-height: 450px;
  max-width: calc(100vw - 50px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.chatbot-popup_resizing {
  transition: none;
}

.chatbot-popup-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.show-chatbot .chatbot-popup {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.chatbot-wide .chatbot-popup {
  width: 900px;
  height: 90vh;
}


.chatbot-wide .chat-resize svg:nth-child(1) {
  display: none;
}

.chatbot-wide .chat-resize svg:nth-child(2) {
  display: block;
}


.header-info .chatbot-logo {
  height: 35px;
  width: 35px;
  padding: 6px;
  fill: #5350c4;
  flex-shrink: 0;
  background: #fff;
  border-radius: 50%;
}

.header-info .logo-text {
  color: #fff;
  font-size: 1.31rem;
  font-weight: 600;
}


.chat-body {
  padding: 20px;
  display: flex;
  gap: 12px;
  height: auto; 
  margin-bottom: 110px;
  overflow-y: auto;
  flex-direction: column;
  flex-grow: 1;
  padding-top: 0;
}

.chat-body__caution {
  text-align: center;
  color: #8E8E8E;
  font-size: 12px;
  line-height: 122%;
}

.chat-body__caution p:not(:last-child) {
  margin-bottom: 0.5em;
}

.chat-body::-webkit-scrollbar {
  display: none;
}

.chat-body .message {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-body .bot-message {
  display: block;
}

.chat-body .bot-message .bot-avatar {
  height: 30px;
  width: 30px;
  padding: 6px;
  flex-shrink: 0;
  align-self: flex-end;
  background: var(--yellow);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
}

.chat-body .user-message {
  flex-direction: column;
  align-items: flex-end;
}

.chat-body .message .message-text {
  padding: 11px 14px;
  max-width: 80%;
  font-size: 14px;
  background: var(--grey);
}

.message-text a {
  color: #4b70e5;
  text-decoration: underline;
}

.bot-message.thinking .message-controls {
  display: none;
}

.chat-body .bot-message.thinking .message-text {
  padding: 2px 16px;
}

.chat-body .bot-message .message-text {
  background: var(--grey);
  border-radius: 10px 10px 10px 0px;
  white-space: pre-wrap;
}

.chat-body .user-message .message-text {
  background-color: var(--yellow);
  border-radius: 10px 10px 0px 10px;
  white-space: pre-wrap;
  color: #fff;
}

.chat-body .bot-message .thinking-indicator {
  display: flex;
  gap: 3px;
  padding-block: 15px;
}

.thinking .message-text {
  white-space: nowrap !important;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
  animation-delay: 0.2s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(2) {
  animation-delay: 0.3s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-body .bot-message .thinking-indicator .dot {
  display: flex;
  height: 4px;
  width: 4px;
  min-width: 4px;
  opacity: 1;
  border-radius: 50%;
  background: #000;
  animation: dotPulse 1.8s ease-in-out infinite;
}

.message-row {
  width: 100%;
  display: flex;
  gap: 8px;
}

.message-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 5px 0;
  margin-top: 2px;
  margin-left: 38px;
}

.message-controls__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  cursor: pointer;
  padding: 2px;
}

.message-controls__icon_active svg path {
  fill: #000;
}

.message-controls__icon_like.message-controls__icon_active {
  background-color: var(--yellow);
  border-radius: 50%;
}

.chat-footer__label {
  margin-top: 6px;

  color: #8E8E8E;
  text-align: center;
  font-size: 9px;
  font-weight: 400;
  line-height: 102%;
}

.chat-footer__tips-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 10px;
  line-height: 110%;
}

.chat-footer__tips-list_hide {
  display: none;
}

.chat-footer__tips-item {
  display: flex;
  cursor: pointer;
  width: fit-content;
  padding: 4px 6px;
  background-color: #F0F0F0;
  border-radius: 12px;
}

@keyframes dotPulse {

  0%,
  44% {
    transform: translateY(0);
  }

  28% {
    transform: translateY(-4px);
  }
}

.chat-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: white;
  padding: 15px 22px 20px;
}

.chat-footer .chat-form {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 32px;
  outline: 1px solid #cccce5;
}

.chat-footer .chat-form:focus-within {
  outline: 2px solid #5350c4;
}

.chat-form .message-input {
  border: none;
  outline: none;
  height: 47px;
  width: 100%;
  resize: none;
  max-height: 180px;
  white-space: pre-line;
  font-size: 15px;
  padding: 13px;
  border-radius: inherit;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.chat-form .message-input::hover {
  scrollbar-color: #ccccf5 transparent;
}

.chat-form .chat-controls {
  display: flex;
  height: 47px;
  gap: 3px;
  align-items: center;
  align-self: flex-end;
  padding-right: 6px;
}

.chat-form .chat-controls button {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 35px;
  width: 35px;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: #706db0;
  background: none;
  border-radius: 50%;
  transition: 0.2s ease;
}

.send-message {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-form .chat-controls #send-message {
  color: #fff;
  display: none;
  /* background: #5350c4; */
}

.chat-form .message-input:valid~.chat-controls #send-message {
  display: flex;
}

/* .chat-form .chat-controls #send-message:hover {
	background: #3d39ac;
} */

.chat-form .chat-controls button:hover {
  background: #f1f1f1;
}

.chat-body .user-message .attachment {
  width: 50%;
  margin-top: -7px;
  border-radius: 13px 3px 13px 3px;
}

em-emoji-picker {
  position: absolute;
  left: 50%;
  top: -337px;
  width: 100%;
  max-width: 350px;
  max-height: 330px;
  visibility: hidden;
  transform: translateX(-50%);
}

body.show-emoji-picker em-emoji-picker {
  visibility: visible;
}

.chat-header {
  display: flex;
  background-color: #fff;
  padding: 5px 5px 0;
  justify-content: space-between;
  align-items: center;
}

.chat-resize {
  display: flex;
  /* width: 25px;
	height: 25px; */
  cursor: nwse-resize;
  touch-action: none;
}

/* .chat-resize svg {
	width: 100%;
	height: 100%;
} */

.chat-resize svg:nth-child(2) {
  display: none;
}

.chat-close {
  /* display: none; */
  display: flex;
  cursor: pointer;
}


/* Responsive for mobile screen */
@media screen and (max-width: 1024px) {
  .chatbot__toggler {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 100;
  }
}

@media screen and (max-width: 600px) {
  .chat-close {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .chatbot-popup {
    width: 100% !important;
    right: 0;
    bottom: 0;
    border-radius: 0;
    max-width: 100%;
  }

  /* .chat-body {
		height: 100%;
		margin-bottom: 0;
	} */

  .chat-footer .chat-form {
    border-radius: 0;
    border-radius: 25px;
  }

  .chat-footer .chat-form .message-input {
    border-radius: 0;
  }

  .chat-footer .chat-form .chat-controls {
    padding-right: 10px;
  }

  .chat-footer .chat-form .chat-controls button {
    height: 40px;
    width: 40px;
  }


}