@charset "UTF-8";

/**
 * チャット型フォーム
 */

html,
body {
  height: 100%;
  /*background-color: #fff;*/
  background-image: url(/img/gaihekitosou/chatform/chat_background2.jpg);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.js-chatform__header-box {
  font-weight: bold;
  padding: 16px;
  text-align: center;
  color: white;
}

.js-chatform__body-box {
  padding: 40px 0 80px;
}

.js-chatform__body-box__step-box {
  display: none;
  opacity: 0;
}

.js-chatform__body-box__step-box--done,
.js-chatform__body-box__step-box--current {
  display: block;
}

.js-chatform__body-box__step-box--current + .js-chatform__body-box__step-box__next-bar {
  display: flex;
}

.js-chatform__body-box__step-box__step-header {
  font-size: 2.4rem;
  font-weight: bold;
  padding: 16px 16px 0;
  text-align: center;
  text-decoration: underline;
}

.js-chatform__body-box__step-box__step-body {
  display: flex;
  margin-top: 15px;
  padding: 16px 16px 0;
  border-radius: 10px;
  background-color: #d4d8d9;
  flex-wrap: wrap;
  justify-content: center;
}

.js-chatform__body-box__step-box__step-body__radio-button {
  font-size: 1.8rem;
  font-weight: bold;
  position: relative;
  /*top: -4px;*/
  left: -4px;
  width: 100%;
  max-width: 600px;
  margin: 0 0 16px 16px;
  padding: 12px 8px;
  border: 2px solid #fff;
  border-radius: 10px;
  background-color: white;
}

.js-chatform__body-box__step-box__step-body__radio-button--checked {
  top: 0;
  left: 0;
  background-color: #eb6100;
  box-shadow: none;
}

.js-chatform__body-box__step-box__step-body__radio-button--not-checked {
  background-color: gray !important;
}

.js-chatform__body-box__step-box__step-body__radio-button:focus {
  outline: none;
}

.js-chatform__body-box__step-box__step-body__input-text {
  width: calc(100% - 64px);
  max-width: 320px;
}

.js-chatform__body-box__step-box__step-body__next-button {
  font-weight: bold;
  margin-left: 4px;
  padding: 10px 32px;
  color: white;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background-color: #eca916;
}

.js-chatform__body-box__step-box__step-body__next-button:disabled {
  color: white;
  background-color: #ced4da !important;
}

.js-chatform__body-box__step-box__step-body__next-button--pushed {
  color: white;
  background-color: #eb6100;
}

.js-chatform__body-box__step-box__chat-row {
  display: none;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px;
}

.js-chatform__body-box__step-box__chat-row--current,
.js-chatform__body-box__step-box__chat-row--done {
  display: flex;
}

.js-chatform__body-box__step-box__chat-row--adviser {
  justify-content: start;
}

.js-chatform__body-box__step-box__chat-row--requester {
  justify-content: end;
}

.js-chatform__body-box__step-box__chat-row__icon-img {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 1000px;
  background-image: url(/img/wp-media/pic-takuya_takahashi-01.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

.js-chatform__body-box__step-box__chat-row__icon-img-solapato {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 1000px;
  background-image: url(/img/form/btform_pic_solapato.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

.js-chatform__body-box__step-box__chat-row__message-balloon {
  font-size: 0;
  position: relative;
  display: none;
  min-height: 37px;
  margin-top: 12px;
  margin-left: 52px;
  padding: 8px;
  border: 1px solid #edf2f3;
  border-radius: 4px;
  background-color: #edf2f3;
}

.js-chatform__body-box__step-box__chat-row__message-balloon--loading {
  display: flex;
  justify-content: center;
}

.js-chatform__body-box__step-box__chat-row__message-balloon--loading > .loading-bubble {
  width: 10px;
  height: 10px;
  margin: 5px 2px;
  animation: loading_anime 1s linear 0s infinite normal both;
  border-radius: 50%;
  background-color: #888;
}

.js-chatform__body-box__step-box__chat-row__message-balloon--loading > .loading-bubble + .loading-bubble {
  animation-delay: .2s;
}

.js-chatform__body-box__step-box__chat-row__message-balloon--loading > .loading-bubble + .loading-bubble + .loading-bubble {
  animation-delay: .4s;
}

.js-chatform__body-box__step-box__chat-row--adviser .js-chatform__body-box__step-box__chat-row__icon-img ~ .js-chatform__body-box__step-box__chat-row__message-balloon {
  margin-top: 0;
  margin-left: 12px;
}

.js-chatform__body-box__step-box__chat-row__message-balloon--done {
  font-size: 1.6rem;
  display: block;
}

.js-chatform__body-box__step-box__chat-row__message-balloon:first-child {
  margin-top: 0;
}

.js-chatform__body-box__step-box__chat-row__message-balloon::after {
  position: absolute;
  top: 8px;
  left: -15px;
  content: '';
  border-top: 8px solid transparent;
  border-right: 8px solid #edf2f3;
  border-bottom: 8px solid transparent;
  border-left: 8px solid transparent;
}

.js-chatform__body-box__step-box__chat-row__message-balloon::before {
  position: absolute;
  top: 8px;
  left: -16px;
  content: '';
  border-top: 8px solid transparent;
  border-right: 8px solid #edf2f3;
  border-bottom: 8px solid transparent;
  border-left: 8px solid transparent;
}

.js-chatform__body-box__step-box__chat-row--requester .js-chatform__body-box__step-box__chat-row__message-balloon {
  margin-right: 12px;
  margin-left: 0;
  color: #fff;
  border: none;
  background-color: #1da1f2;
}

.js-chatform__body-box__step-box__chat-row--requester .js-chatform__body-box__step-box__chat-row__message-balloon::after {
  right: -15px;
  left: auto;
  border-right: 8px solid transparent;
  border-left: 8px solid #1da1f2;
}

.js-chatform__body-box__step-box__chat-row--requester .js-chatform__body-box__step-box__chat-row__message-balloon::before {
  content: none;
}

.js-chatform__body-box__step-box__form-box {
  max-width: 640px;
  margin: 12px auto;
  padding: 12px;
  border: 1px solid gray;
  border-radius: 8px;
  background-color: white;
}

.js-chatform__body-box__step-box__form-box__label-text {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.5;
  display: inline-block;
  width: 100%;
  margin-bottom: 0;
  padding-bottom: calc(.375rem + 1px);
}

.js-chatform__body-box__step-box__form-box__input-text {
  margin-bottom: 16px;
}

.js-chatform__body-box__step-box--current + .js-chatform__body-box__next-bar,
.js-chatform__body-box__step-box--done + .js-chatform__body-box__next-bar {
  display: flex;
}

.js-chatform__body-box__next-bar {
  position: relative;
  display: none;
  height: 32px;
  justify-content: center;
}

.js-chatform__body-box__next-bar::before {
  position: absolute;
  bottom: 16px;
  display: block;
  width: 16px;
  height: 16px;
  content: '';
  transform: rotate(45deg);
  border-right: 4px solid orange;
  border-bottom: 4px solid orange;
}

.js-chatform__body-box__next-bar--done {
  display: flex;
}

.js-chatform__branch--show {
  display: initial;
}

.js-chatform__branch--hide {
  display: none;
}

@keyframes loading_anime {
  0% {
    transform: scale(0);
  }

  25% {
    transform: scale(1);
  }

  50% {
    transform: scale(1);
  }

  75% {
    transform: scale(1);
  }

  100% {
    transform: scale(0);
  }
}

@media screen and (min-width: 768px) {
  html,
  body {
    background-image: url(/img/gaihekitosou/chatform/chat_background.jpg);
  }

  .js-chatform__body-box__step-box__chat-row__message-balloon::after {
    position: absolute;
    top: 8px;
    left: -22px;
    content: '';
    border-top: 8px solid transparent;
    border-right: 13px solid #fff;
    border-bottom: 8px solid transparent;
    border-left: 13px solid transparent;
  }

  .js-chatform__body-box__step-box__chat-row__message-balloon::before {
    position: absolute;
    top: 8px;
    left: -24px;
    content: '';
    border-top: 8px solid transparent;
    border-right: 12px solid #eb6100;
    border-bottom: 8px solid transparent;
    border-left: 12px solid transparent;
  }

  .js-chatform__body-box__step-box__chat-row--requester .js-chatform__body-box__step-box__chat-row__message-balloon {
    margin-right: 12px;
    margin-left: 0;
    color: #000;
    border: none;
    background-color: #eca916;
  }

  .js-chatform__body-box__step-box__chat-row--requester
.js-chatform__body-box__step-box__chat-row__message-balloon::after {
    right: -15px;
    left: auto;
    border-right: 8px solid transparent;
    border-left: 8px solid #eca916;
  }
}

@media (min-width: 768px) {
  .js-chatform__header-box {
    font-size: 2.4rem;
  }

  .js-chatform__body-box__step-box__step-header {
    font-size: 2.4rem;
    padding-top: 60px;
  }

  .js-chatform__body-box__step-box__step-body {
    display: flex;
    margin-top: 15px;
    padding: 16px 16px 0;
    border-radius: 10px;
    background-color: #eb6100;
    flex-wrap: wrap;
    justify-content: center;
  }

  .js-chatform__body-box__step-box__step-body__radio-button {
    width: 40%;
    max-width: 600px;
    padding: 16px;
  }

  .js-chatform__body-box__step-box__step-body__input-text {
    margin-bottom: 16px;
  }

  .js-chatform__body-box__step-box__chat-row__message-balloon {
    min-height: 37px;
    padding: 12px;
    border: 2px solid #eb6100;
    border-radius: 6px;
    background-color: #fff;
  }
}

@media (min-width: 992px) {
  .js-chatform__header-box {
    font-size: 2.4rem;
  }

  .js-chatform__body-box__step-box__step-header {
    font-size: 2.4rem;
    padding-top: 60px;
  }

  .js-chatform__body-box__step-box__step-body {
    margin-top: 20px;
    padding: 16px 16px 0;
    border-radius: 10px;
    background-color: #eb6100;
  }
}