#chat-content {
  position: fixed;
  right: 10px;
  z-index: 1;
  bottom: 0;
  display: none;
}

.chat__container {
  padding:0;
  background: #f88a31;
  overflow: hidden;
  max-width: 400px;
  margin: 20px auto 0;
  font-size: 80%;
  box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.35);
}

/* タイトル部分 */
.chat__container .chat__title {
  background: #fff;
  padding: 20px;
  text-align: center;
  font-size: 150%;
  position: relative;
  cursor: pointer;
}

.chat__container .chat__title .iconClose {
  position: absolute;
  top: 7px;
  right: 10px;
  width: 20px;
}

.chat__container .chat__title:hover {
  opacity: 0.8;
}

.chat__title img {
  width: 60%;
}

/* 会話部分 */
.chat__container .chat__contents {
  padding: 10px;
  overflow: hidden;
  line-height: 135%;
}

.chat__container .scroll {
  height: 500px;
  overflow-y: scroll;
  display: flex;
  flex-direction: column-reverse;
}

/* スタンプ画像最大幅 */
.chat__container .stamp img {
  max-width:150px;
}

/* 相手の会話 */
.chat__container .chat__left {
    width: 100%;
    position: relative;
    display: block;
    margin-bottom: 30px;
    clear: both;
}

/* アイコン画像 */
.chat__container .chat__left figure {
    width: 50px;
    position: absolute;
    top: 15px;
    left: 0;
    padding: 0;
    margin: 0;
}

/* 正方形を用意 */
.chat__container .chat__left figure img{
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.chat__container .chat__left .chat__left-text {
  margin-left: 70px;
}

.chat__container .chat__left .chat__left-text .name {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 5px;
}

.chat__container .chat__left .text {
  margin: 0;
  position: relative;
  padding: 10px;
  border-radius: 20px;
  background-color: #ffffff;
  font-size: 1rem;
  line-height: 1.5rem;
}

/* 吹き出し */
.chat__container .chat__left .text::after {
  content: '';
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  left: -10px;
  top: 10px;
  border-right: 20px solid #ffffff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* 自分の会話 */
.chat__container .chat__right {
    position: relative;
    display: block;
    margin: 20px 0 40px;
    float: right;
    margin-right: 15px;
    clear: both;
    width: 100%;
}

/* コメントエリア */
.chat__container .chat__right .text {
  padding: 20px 10px 10px 10px;
  border-radius: 20px;
  background-color: #b8dfe7;
  margin: 0;
  font-size: 1rem;
}

.chat__container .chat__right .text .name {
  position: relative;
}

.chat__container .chat__right .text .name:not(:first-child){
  margin-top: 2rem;
}

.chat__container .chat__right .text .name::after {
  background-color: #e4412e;
  border-radius: 2px;
  color: #fff;
  content: "必須";
  font-size: 0.8rem;
  font-weight: 300;
  margin-left: 0.5rem;
  position: absolute;
  padding-right: 0.3rem;
  padding-left: 0.3rem;
  white-space: nowrap;
  line-height: 1.2rem;
  top: -4px;
}

.chatError {
  color: #e4412e;
  position: absolute;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  padding-top: 2px;
  display: none;
}

/* 吹き出しセレクト */
.chat__container .chat__right .select-box {
  padding-bottom: 10px;
  padding-left: 5px;
  padding-top: 10px;
  margin-top: 0.75rem;
  width: 100%;
  border: none;
  border-radius: 6px;
}

/* 吹き出しチェックボックス */
.chat__container .chat__right .radio-box {
  padding-top: 10px;
  margin-left: 1rem;
}

/* 吹き出しセレクト */
.chat__container .chat__right .textArea {
  margin-top: 0.75rem;
}
.chat__container .chat__right .textArea .inputText{
  padding-left: 5px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 6px;
  width: 100%;
  border: none;
}

.chat__container .chat__right .dateBirth .dateBirthSel {
  border: none;
  border-radius: 6px;
  margin-top: 10px;
  padding-bottom: 10px;
  padding-left: 5px;
  padding-top: 10px;
}

.chat__container .chat__right .dateBirth .dateBirthSel:nth-child(1) {
  margin-left: 1rem;
  width: 20%;
}

.chat__container .chat__right .dateBirth .dateBirthSel:nth-child(3),
.chat__container .chat__right .dateBirth .dateBirthSel:nth-child(5) {
  margin-left: 1rem;
  width: 15%;
}

.chat__container .chat__right .dateBirth span {
  padding-left: 2px;
  vertical-align: sub;
}

.chat__container .chat__right .radio-box input:nth-child(3) {
  margin-left: 4rem
}

/* 自分がスタンプを送る時 */
.chat__container .chat__right .stamp {
  position: relative;
  margin-left: 80px;
}

/* 既読エリア */
.chat__container .chat__right .date {
  content: '';
  position: absolute;
  display: block;
  width: 100px;
  text-align: right;
  left: -30px;
  bottom: 0px;
  font-size: 80%;
  color: #ffffff;
}
input[type="checkbox"],
input[type="radio"],
input[type="date"] {
  border-radius: 0;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}
input[type="checkbox"],
input[type="radio"] {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
  border-radius: 25px;
  margin-right: 0.5rem;
  vertical-align: -5px;
  background-color: #fff;
}
input[type="checkbox"]:checked:before,
input[type="radio"]:checked:before {
  position: absolute;
  top: 1px;
  left: 5px;
  transform: rotate(50deg);
  width: 6px;
  height: 10px;
  border-right: 3px solid #408f9c;
  border-bottom: 3px solid #408f9c;
  content: '';
}

.chat-button {
  margin: 20px auto 30px;
  display: block;
  width: 70%;
  max-width: 150px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.1em;
  line-height: 10px;
  border-radius: 50px;
  background-color: #4DB6AC;
  color: #fff;
  position: relative;
  padding: 20px 0;
  cursor: pointer;
  transition: 0.5s ease-in-out;
  line-height: 20px;
}

.chat-button:hover {
  background-color: #00897B;
}

.loadingBtn {
  background-color: rgb(80, 80, 80);
  color: #e4e4e4;
  pointer-events: none; 
  cursor: not-allowed; /* 禁止カーソル */
}

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

.loading {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0.25rem solid rgba(255, 255, 255, 0.2);
  border-top-color: rgb(255, 255, 255);
  animation: spin 1s infinite linear;
  margin: 0 auto;
}

@media screen and (max-width: 767px) {
  #chat-content {
    right: 0;
    height: 100vh;
  }
  .chat__container {
    max-width: unset;
    margin: unset;
  }
  .chat__container .scroll {
    height: 92vh
  }
}
