/* ==============
  version: MjAyNS0wMS0xOSAwMjo0NDoxNS45NjY0NzErMDk6MDA=
  ============== */

* {
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
}

section {
  width: 50vw;
  height: 100vh;
}

/*left*/

.left {
  background-image: var(--left-background-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-color: rgba(0, 0, 0, 0.6);
  background-blend-mode: darken;
  display: flex;
  justify-content: center;
  align-items: center;
  background-position: center;
  font-family: "M PLUS 1p", sans-serif;
  font-style: normal;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.left .profile {
  text-align: center;
}

.left .profile img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.left .profile h1 {
  font-size: 30px;
  color: #ffffff;
  margin-top: 16px;
  font-weight: 700;
}

.left .profile p {
  font-size: 18px;
  color: #ffffff;
  margin-top: 40px;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/*right*/

.right {
  background-color: #ffe4f8;
  display: flex;
  flex-direction: column;
}

.right .header {
  width: 100;
  height: 60px;
  min-height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  background: #ff86eb;
  box-shadow: 0px 10px 10px -5px rgba(0, 0, 0, 0.15);
}

.right .header img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 14px;
}

.right .header h1 {
  font-size: 22px;
  letter-spacing: 1px;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 700;
  font-style: normal;
  color: #fff;
}

/*メッセージ部分*/

#msgs {
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  flex-grow: 1;
}

.message {
  display: inline-block;
  border-radius: 8px;
  width: auto;
  position: relative;
}

.message.text {
  font-size: 15px;
  padding: 5px 10px;
  white-space: pre-wrap;
}

.message.img {
  width: fit-content;
}

.message.img img {
  max-height: 200px;
  max-width: 400px;
  border-radius: 8px;
}

.message.user {
  background-color: #ff86eb;
  color: #ffffff;
  margin: 0 0 10px auto;
}

.message.user:before {
  content: "既読";
  font-size: 12px;
  color: rgba(0, 0, 0, 0.3);
  position: absolute;
  bottom: 0;
  left: -30px;
}

.message.assistant {
  background-color: #ffffff;
  color: #000000;
  margin: 0 auto 10px 0;
  margin-left: 55px;
}

.message.assistant:before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--message-assistant-before-background);
  background-size: contain;
  position: absolute;
  top: 0px;
  left: -55px;
}

/*送信フォーム*/
.message-box {
  box-sizing: border-box;
  width: 100%;
  padding: 18px 24px;
}

.message-area {
  display: flex;
  width: 100%;
  align-items: center;
  background-color: #ffffff;
  border-radius: 25px;
  box-shadow: 0px 10px 10px -5px rgba(0, 0, 0, 0.2);
}

#messageForm {
  border: none;
  resize: none;
  height: 40px;
  font-size: 15px;
  background-color: transparent;
  flex-grow: 1;
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

#messageForm:focus {
  outline: none;
}

#messageForm::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

#submitButton {
  border: none;
  background-color: #ff86eb;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 12px 16px;
  cursor: pointer;
}

#submitButton:disabled {
  opacity: 0.5;
}

#submitButton:hover {
  background-color: color-mix(in srgb, #ff86eb 80%, #000000);
}

#submitButton .button-icon {
  color: #fff;
  font-size: 12px;
}

input[type="text"] {
  margin-left: 16px;
}

@media screen and (max-width: 768px) {
  .left {
    display: none;
  }

  .right {
    width: 100vw;
  }
}

.spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  height: 50px;
}

.spinner > div {
  width: 10px;
  height: 10px;
  background-color: #333;

  border-radius: 100%;
  display: inline-block;
  -webkit-animation: sk-bouncedelay 1.8s infinite ease-in-out both;
  animation: sk-bouncedelay 1.8s infinite ease-in-out both;
}

.spinner .bounce1 {
  -webkit-animation-delay: -0.32s;
  animation-delay: -0.32s;
}

.spinner .bounce2 {
  -webkit-animation-delay: -0.16s;
  animation-delay: -0.16s;
}

@-webkit-keyframes sk-bouncedelay {
  0%,
  80%,
  100% {
    -webkit-transform: scale(0);
  }
  40% {
    -webkit-transform: scale(1);
  }
}

@keyframes sk-bouncedelay {
  0%,
  80%,
  100% {
    -webkit-transform: scale(0);
    transform: scale(0);
  }
  40% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}
