#typebot-bubble {
  z-index: 99999;
  position: fixed;
}

#typebot-bubble > button {
  padding: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 100%;
  background-color: rgb(230, 114, 0);
  box-shadow: rgba(0, 0, 0, 0.06) 0px 1px 6px 0px,
    rgba(0, 0, 0, 0.16) 0px 2px 32px 0px;
  border: medium none;
}

#typebot-bubble button:hover {
  filter: brightness(0.95);
}

#typebot-bubble button:active {
  filter: brightness(0.75);
}

#typebot-bubble > button:focus {
  outline: none;
}

#typebot-bubble > button > .icon {
  transition: opacity 500ms ease-out 0s, transform 500ms ease-out 0s;
}

#typebot-bubble > button > svg.icon {
  fill: none;
  width: 55%;
  stroke-width: 2px;
  stroke: white;
}

#typebot-bubble > button > img.icon {
  width: 80%;
  height: 80%;
  border-radius: 100%;
  object-fit: cover;
  object-position: center;
}

#typebot-bubble.iframe-opened > button > .icon {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

#typebot-bubble > button > .close-icon {
  position: absolute;
  transform: rotate(-90deg) scale(0);
  opacity: 0;
  transition: opacity 500ms ease-out 0s, transform 500ms ease-out 0s;
  width: 55%;
  stroke-width: 2px;
  stroke: white;
}

#typebot-bubble.iframe-opened > button > .close-icon {
  transform: rotate(90deg) scale(1);
  opacity: 1;
}

#typebot-bubble > iframe {
  opacity: 0;
  display: flex;
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  border-radius: 10px;
  position: fixed;
  transform: translate(0, 100px);
  transition: opacity 500ms ease-out 0s, transform 500ms ease-out 0s;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
  width: 400px;
  max-height: 680px;
  inset: auto 20px 90px auto;
  height: calc(100% - 160px);
  background-color: white;
}

#typebot-bubble.iframe-opened > iframe {
  transform: translate(0, 0);
  opacity: 1;
}

.typebot-chat-button.active .typebot-chat-icon {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

.typebot-chat-button:not(.active) .typebot-chat-close {
  transform: rotate(-90deg) scale(0);
  opacity: 0;
}

.typebot-iframe-container:not(.active) {
  opacity: 0;
  transform: translate(0, 100px);
}
.typebot-iframe-container.active {
  opacity: 1;
  transform: translate(0, 0);
}

/* Proactive message */
#typebot-bubble > .proactive-message {
  font-size: 18px;
  color: #303235;
  opacity: 0;
  visibility: hidden;
  transform: translate(0, 10px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
  cursor: pointer;
  font-weight: 300;
  bottom: 90px;
  right: 20px;
  z-index: 99999;
  position: fixed;
  max-width: 280px;
  background-color: white;
  box-shadow: 0 3px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 16px;
  display: flex;
  align-items: center;
  border-radius: 8px;
}

#typebot-bubble.message-opened > .proactive-message {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}

#typebot-bubble > .proactive-message > .close-button {
  position: absolute;
  top: -15px;
  right: -7px;
  width: 30px;
  height: 30px;
  background-color: rgb(237, 242, 247);
  border-radius: 100%;
  border: medium none;
  outline: currentcolor none medium;
  fill: #4a5568;
  padding: 0px;
  cursor: pointer;
  padding: 2px;
}

#typebot-bubble > .proactive-message > img {
  margin-right: 8px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 100%;
  object-fit: cover;
}

#typebot-bubble > .proactive-message > p {
  margin: 0;
}

@media screen and (max-width: 450px) {
  #typebot-bubble > .proactive-message {
    max-width: 200px;
    font-size: 15px;
    bottom: 70px;
    right: 10px;
  }

  #typebot-bubble > button {
    width: 50px !important;
    height: 50px !important;
    bottom: 10px !important;
    right: 10px !important;
  }

  #typebot-bubble > iframe {
    inset: 0 0 auto auto;
    width: 100%;
    height: calc(100% - 70px);
    max-height: none;
  }
}
