#embedded_messenger {
  position: fixed;
  z-index: 1000;
  bottom: 100px;
  top: 50px;
  height: 0;
  right: 2rem;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  width: 350px;
  transform-origin: 50.01%;
}

#embedded_messenger.active {
  transform-origin: 50.01%;
  height: calc(100vh - 150px);
  width: 450px;
  /* border: 2px solid #e20025; */
  z-index: 300000;
  /* height: inherit; */
}
#embedded_messenger.active #message_header {
  background-image: url(https://stadt-sg.bot.abraxas-apis.ch/chatbot/server/public/img/cancel.svg);
  background-size: 31%;
  background-repeat: no-repeat;
  background-position: center;
  -webkit-transition: all 0.1s cubic-bezier(0.02, 1.14, 0, 0.98);
  transition: all 0.1s cubic-bezier(0.02, 1.14, 0, 0.98);
  transform-origin: 50.01%;
}

#embedded_messenger iframe {
  display: none;
}

#embedded_messenger.active iframe {
  height: calc(100% - 35px);
  width: 100%;
  border: 0;
  box-shadow: 0 1pt 12pt rgba(0, 0, 0, 0.15);
  display: block;
  margin-top: 0px;
}
#embedded_messenger #message_header {
  /* padding: 0.5rem 1rem; */
  /* transform-origin: 50.01%; */
}

#message_header {
  height: 60px;
  width: 60px;
  border-radius: 50%;
  position: fixed;
  bottom: 25px;
  right: 12px;
  background-color: #e20025;
  z-index: 12000;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  text-align: center;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  background-image: url(https://stadt-sg.bot.abraxas-apis.ch/chatbot/server/public/img/conversation.svg);
  background-size: 61%;
  background-repeat: no-repeat;
  background-position: center;
  -webkit-transition: 0.5s ease-in-out;
  transition: 0.5s ease-in-out;
}

@media (max-width: 600px) {
  #embedded_messenger {
    height: 0;
  }
  #embedded_messenger #container_header {
    height: fit-content;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 7px;
  }
  #embedded_messenger.active {
    width: 100vw;
    top: 0;
    right: 0;
    bottom: 0;
    height: inherit;
  }
  #embedded_messenger.active #message_header {
    display: none;
    top: 7px;
    right: 7px;
    background: inherit;
    box-shadow: none;
    background-image: url(https://stadt-sg.bot.abraxas-apis.ch/chatbot/server/public/img/cancel.svg);
  }

  #embedded_messenger.active iframe {
    height: calc(100% - 35px);
    width: 100%;
    border: 0;
    box-shadow: 0 1pt 12pt rgba(0, 0, 0, 0.15);
    display: block;
    transform: translateY(35px);
  }

  .wrapper {
    max-width: 100vw;
  }

  #bot_teaser {
    display: none !important;
  }

}
@media (min-width: 600px) {
  #embedded_messenger.active #message_header {
    background-image: url(https://stadt-sg.bot.abraxas-apis.ch/chatbot/server/public/img/cancel.svg);
  }
}

/* teaser */
#bot_teaser {
  visibility: hidden;
  width: 180px;
  height: 60px;
  position: fixed;
  bottom: 80px;
  right: 85px;
  background-color: #e20025;
  z-index: 1000;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  border-radius: 10px;
  align-content: center;
  margin: auto;
  font-family: "Lato", sans-serif;
  color: white;
  justify-content: center;
  padding-left: 10px;
  font-weight: bold;
  animation-name: example;
  animation-duration: 1s;
  animation-delay: 4s;
  animation-iteration-count: 1;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

#bot_teaser.open {
  width: 180px;
  height: 60px;
  position: fixed;
  bottom: 80px;
  right: 850px;
  background-color: #e20025;
  z-index: 1000;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  border-radius: 10px;
  align-content: center;
  margin: auto;
  font-family: "Lato", sans-serif;
  color: white;
  justify-content: center;
  padding-left: 10px;
  font-weight: bold;
}

#bot_teaser.closed {
  display: none;
}

#message_header:hover ~ #bot_teaser {
  width: 180px;
  height: 60px;
  position: fixed;
  bottom: 80px;
  right: 85px;
  background-color: #e20025;
  z-index: 1000;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  border-radius: 10px;
  align-content: center;
  margin: auto;
  font-family: "Lato", sans-serif;
  color: white;
  justify-content: center;
  padding-left: 10px;
  font-weight: bold;
  animation-name: example;
  animation-duration: 0s;
  animation-delay: 0s;
  animation-iteration-count: 1;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

#message_header:hover ~ #bot_teaser.closed {
  display: none;
}

/* Teaser animation */
@-webkit-keyframes example {
  from {
    display: none;
    bottom: -120px;
  }
  to {
    bottom: 120px;
    display: flex;
  }
}

@keyframes example {
  from {
    visibility: hidden;
    bottom: -120px;
  }
  to {
    width: 180px;
    height: 60px;
    position: fixed;
    bottom: 25px;
    right: 85px;
    background-color: #e20025;
    z-index: 1000;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    border-radius: 10px;
    align-content: center;
    margin: auto;
    font-family: "Lato", sans-serif;
    color: white;
    justify-content: center;
    padding-left: 10px;
    font-weight: bold;
    visibility: visible;
  }
}

#embedded_messenger.active > #container_header {
  width: 100%;
  height: 35px;
  background-color: #fff;
}

#embedded_messenger.active > #container_header > #closing_icon {
  /* width: 100%;
  height: 30px; */
  background-color: transparent;
  display: inline-block;
  float: right;
  max-width: 30px;
  margin-right: 5px;
  width: 100%;
  padding: 5px;
}

#embedded_messenger > #container_header > #closing_icon {
  display: none;
}
