@charset "UTF-8";

.chatbot-container {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 400px;
  overflow: auto;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  flex-direction: column;
  font-size: 14px;
  text-align: left;
  z-index: 1000;
  transition: transform 0.5s;
  transform: translateY(calc(100% - 60px));
}

.chatbot-container,
.chatbot-container::after,
.chatbot-container::before,
.chatbot-container *,
.chatbot-container *::after,
.chatbot-container *::before {
  box-sizing: border-box;
}

.chatbot-container.is-open {
  transform: translateY(0);
}

.chatbot-header {
  padding: 12px 10px 9px 60px;
  background: #222 url(https://chatbot.ecbeing.io/data/chatbot-icon-w.png) center left 15px / 32px auto no-repeat;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: flex-start;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.3;
  color: #FFF;
  position: relative;
  cursor: pointer;
}

.chatbot-title {
}

.close-chatbot {
  position: absolute;
  right: 12px;
  top: calc(50% - 13px);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: url(https://chatbot.ecbeing.io/data/chatbot-arrow.png) center center / 15px auto no-repeat;
  border: none;
  cursor: pointer;
  transition: background 0.5s, transform 0.5s;
}

.is-open .close-chatbot {
  transform: rotate(180deg);
  background-color: rgba(255, 255, 255, 0.2);
}

.chatbot-disclaimer {
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  max-height: 0;
  color: #FFF;
  padding: 0 0 0 1.5em;
  overflow: hidden;
  transition: padding 0.5s, max-height 0.5s;
}

.is-open .chatbot-disclaimer {
  padding-top: 5px;
  max-height: 20px;
}

.chatbot-content {
  max-height: calc(100vh - 200px);
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.chatbot-content::-webkit-scrollbar {
  width: 8px;
}

.chatbot-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.chatbot-content::-webkit-scrollbar-thumb {
  background: #888;
}

.chatbot-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.chatbot-content {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

.chatbot-footer {
  box-sizing: border-box;
  padding: 10px;
  background: #F5F5F5;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.5s, max-height 0.5s;
  }

input.chat-input {
  flex-grow: 1;
  padding: 4px 22px;
  height: 34px;
  border: 1px solid #DEDEDE;
  border-radius: 4px;
  outline: 0;
  font-size: 14px;
  font-weight: 500;
}

.send-chat {
  background: url(https://chatbot.ecbeing.io/data/chatbot-send.png) center center / 20px auto no-repeat;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
}

.chatbot-message-user,
.chatbot-message-bot {
  max-width: 77%;
  padding: 12px;
  margin: 10px;
  border-radius: 8px;
  font-weight: bold;
  color: #222;
  line-height: 19px;
}

.chatbot-message-user {
  align-self: flex-end;
  margin: 15px 0 15px 170px;
  background: #F5F5F5;
}

.chatbot-message-bot {
  align-self: flex-start;
  margin: 15px 40px 15px 50px;
  position: relative;
  background: #B5EEF4;
}

.chatbot-message-bot.message-error {
  padding: 11px 11px 11px 46px;
  border: 1px solid #C11600;
  color: #C11600;
  background: url(https://chatbot.ecbeing.io/data/chatbot-error.png) top 11px left 11px / 24px auto no-repeat;
}

.chatbot-message-bot-icon {
  position: absolute;
  left: -44px;
  top: 0;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  background: url(https://chatbot.ecbeing.io/data/chatbot-icon.png) center center / 32px auto no-repeat;
}

.chatbot-answer-reference-url {
  align-self: flex-start;
  margin: -8px 40px 15px 50px;
  position: relative;
  font-size: 11px;
  font-weight: 500;
}

.chatbot-answer-reference-url {
  font-weight: bold;
}

.chatbot-answer-reference-url a {
  color: #009298;
  text-decoration: underline;
}

.chatbot-to-top-button {
  display: none;
  position: absolute;
  bottom: 60px;
  right: 15px;
  background: #F5F5F5;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}

.chatbot-loading {
  width: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/*!
* Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)
* Copyright 2015 Daniel Cardoso <@DanielCardoso>
* Licensed under MIT
*/
.la-ball-pulse,
.la-ball-pulse > div {
    position: relative;
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
}
.la-ball-pulse {
    display: block;
    font-size: 0;
}
.la-ball-pulse > div {
    display: inline-block;
    float: none;
    background-color: currentColor;
    border: 0 solid currentColor;
}
.la-ball-pulse {
    width: 54px;
    height: 18px;
    letter-spacing: 0;
}
.la-ball-pulse > div:nth-child(1) {
    -webkit-animation-delay: -200ms;
       -moz-animation-delay: -200ms;
         -o-animation-delay: -200ms;
            animation-delay: -200ms;
}
.la-ball-pulse > div:nth-child(2) {
    -webkit-animation-delay: -100ms;
       -moz-animation-delay: -100ms;
         -o-animation-delay: -100ms;
            animation-delay: -100ms;
}
.la-ball-pulse > div:nth-child(3) {
    -webkit-animation-delay: 0ms;
       -moz-animation-delay: 0ms;
         -o-animation-delay: 0ms;
            animation-delay: 0ms;
}
.la-ball-pulse > div {
    width: 10px;
    height: 10px;
    margin: 4px;
    border-radius: 100%;
    -webkit-animation: ball-pulse 1s ease infinite;
       -moz-animation: ball-pulse 1s ease infinite;
         -o-animation: ball-pulse 1s ease infinite;
            animation: ball-pulse 1s ease infinite;
}
/*
* Animation
*/
@-webkit-keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
    30% {
        opacity: .1;
        -webkit-transform: scale(.01);
                transform: scale(.01);
    }
}
@-moz-keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -moz-transform: scale(1);
             transform: scale(1);
    }
    30% {
        opacity: .1;
        -moz-transform: scale(.01);
             transform: scale(.01);
    }
}
@-o-keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -o-transform: scale(1);
           transform: scale(1);
    }
    30% {
        opacity: .1;
        -o-transform: scale(.01);
           transform: scale(.01);
    }
}
@keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -webkit-transform: scale(1);
           -moz-transform: scale(1);
             -o-transform: scale(1);
                transform: scale(1);
    }
    30% {
        opacity: .1;
        -webkit-transform: scale(.01);
           -moz-transform: scale(.01);
             -o-transform: scale(.01);
                transform: scale(.01);
    }
}

.feedback-container {
  margin-top: 10px;
}

.feedback-button {
  display: inline-block;
  cursor: pointer;
  margin-left: 15px;
  opacity: 0.3;
  width: 18px;
  height: 18px;
  background-size: cover;
  transition: opacity 0.3s ease;
}

.feedback-button.good {
  background-image: url('https://chatbot.ecbeing.io/data/feedback-good.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center; 
}

.feedback-button.bad {
  background-image: url('https://chatbot.ecbeing.io/data/feedback-bad.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center; 
}

.feedback-button.selected {
  opacity: 0.8;
}

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

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

.question-choice-container {
  width: 100%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.question-choice {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 10px auto 5px;
  padding: 8px;
  width: 100%;
  background-color: #FFF;
  border: 1px solid #DEDEDE;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  outline: 0;
  font-size: 14px;
  font-weight: bold;
}

.question-choice:first-child {
  margin-left: 0;
}

.question-choice:last-child {
  margin-right: 0;
}

.question-choice.selected,
.question-choice:hover {
  background-color: #dcdcdc;
  cursor: pointer;
  box-shadow: 0 0 0 0;
}

.question-choice.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media screen and (max-width: 800px) {
  .chatbot-container {
    bottom: env(safe-area-inset-bottom);
    right: 10px;
    width: 150px;
    max-width: calc(100% - 20px);
    border-radius: 5px 5px 0 0;
    font-size: 13px;
    transition: transform 0.5s, width 0.5s, background 0.5s, max-height 0.2s;
    /* transform: translateY(calc(100% - 72px)); */
    transform: translateY(calc(100% - 35px));
  }

  .chatbot-container.is-open {
    width: calc(100vw - 20px);
  }

  .chatbot-container .chatbot-frame {
    width: calc(100vw - 20px);
    transition: none;
  }

  .chatbot-header {
    /* align-items: center; */
    align-items: flex-start;
    /* padding: 47px 15px 8px; */
    padding: 10px 15px 8px 50px;
    font-size: 13px;
    font-weight: bold;
    line-height: 17px;
    /* background-position: top 8px center; */
    background-position: center left 10px !important;
  }

  .is-open .chatbot-header {
    /* padding: 8px 15px 8px 62px; */
    padding: 10px 15px 8px 50px;
    align-items: flex-start;
    background-position: center left 15px;
  }

  .chatbot-disclaimer {
    font-size: 10px;
    line-height: 12px;
    white-space: nowrap;
    padding: 0;
  }

  .is-open .chatbot-disclaimer {
    padding-top: 3px;
    max-height: 15px;
  }

  .chatbot-content {
    max-height: 60vh;
  }
  
  .chatbot-content::-webkit-scrollbar {
    width: 4px;
  }

  input.chat-input {
    padding: 4px 12px;
    height: 30px;
    font-size: 12px;
  }

  .send-chat {
    width: 30px;
    height: 30px;
  }

  .chatbot-message-user,
  .chatbot-message-bot {
    max-width: 80%;
    padding: 8px;
    border-radius: 5px;
  }

  .chatbot-message-user {
    margin: 10px 0 10px 80px;
  }

  .chatbot-message-bot {
    margin: 10px 30px 10px 40px;
  }

  .chatbot-message-bot.message-error {
    padding: 7px 7px 7px 38px;
    background-position: top 7px left 7px;
    background-size: 24px auto;
    background-repeat: no-repeat;
  }

  .chatbot-message-bot-icon {
    left: -40px;
    margin-right: 8px;
  }

  .chatbot-answer-reference-url {
    margin: -5px 30px 10px 40px;
    font-size: 10px;
  }

  .chatbot-pc-only {
    display: none;
  }

  .feedback-container {
    margin-top: 15px;
    margin-bottom: 5px;
    text-align: center!important;
  }

  .feedback-button {
    margin: 0 15%;
    width: 20px;
    height: 20px;
  }
}

@media screen and (min-width: 801px) {
  .chatbot-sp-only {
    display: none;
  }
}