/*/////////////////////////////////////////////////
//LINE風チャット画面(会話方式)を記事に表示
/////////////////////////////////////////////////*/
:root{
  	--background-color: #8CABD8;
}
*{
    box-sizing:border-box;
}
body{
  margin: 0;
  padding: 0;
  font-family:-apple-system, BlinkMacSystemFont,"Hiragino Sans W3", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "メイリオ", Meiryo, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  /*スクロールバー非表示（IE・Edge）*/
  -ms-overflow-style: none;
  /*スクロールバー非表示（Firefox）*/
  scrollbar-width: none;
  min-height: 100vh;   /* fallback */
  min-height: 100dvh;  /* modern browsers */
}

.settings {
	background-color: var(--background-color);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 1;
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
  z-index: 100;
  transition :opacity 1s ease-in-out;
}
.settings label{
  font-size:1.2em;
  color: #111;
}
.settings p{
  margin-bottom: 2px;
}
.settings input,.settings textarea{
  border-radius: 5px;
  padding: 10px;
  border: none;
  width: 100%;
  font-size: 1.2rem;
}
.settings textarea{
  height: 5em;
}
.settings ::placeholder {
  color: #aaa;
}
.error{
  font-size: 0.9em;
  color:#a60a0a;
}
.settings__title{
  font-size:1.5em;
  color: #111;
  padding: 0.5em 0;/*上下の余白*/
  border-bottom: solid 3px #364e96;/*下線*/
}
.settings__title span{
  font-size: 1.5em;
  padding-left:20px;
  color:#8de055;
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px;
    margin:0 auto;
    padding: .9em 2em;
    border: none;
    border-radius: 25px;
    box-shadow: 0 2px 3px rgb(0 0 0 / 25%), 0 2px 3px -2px rgb(0 0 0 / 15%);
    background-color: #2589d0;
    color: #fff;
    font-weight: 600;
    font-size: 1em;
}

.button::after {
    transform: rotate(45deg);
    width: 5px;
    height: 5px;
    margin-left: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    content: '';
}

.button:hover {
    background-color: #1579c0;
}
.line__container {
  padding:0;
	opacity: 0;
  background:var(--background-color);
  /* overflow: hidden; */
  width: 100%;
  max-width: 450px;
  margin: 0 auto; 
  font-size: 1em;
  transition :opacity 1s ease-in-out;
}

.title__box{
  height:54px;
  display: flex;
  justify-content: space-between;
}
.icon__box{
  display: flex;
  justify-content: space-around;
  gap: 20px;
}
/* タイトル部分 */
.line__container .line__title {
  background: #8CABD8;
  padding: 10px;
  text-align: center;
  font-size: 150%;
  color: #111;
  position: sticky;
  top:0;
  opacity: 1;
  z-index: 1;
}

/* 会話部分 */
.line__container .line__contents {
  padding: 10px;
  display: flex;
  flex-direction: column;
  line-height: 135%;
  height:calc(100vh - 116px); /* 画面の高さからヘッダー、フッター分を引く */
}
.line__contents.scroll {
  overflow-y: scroll;
}
/* 相手の会話 */
.line__container .line__left {
    /* position: relative; */
    /* display: block; */
    display: flex;
    margin-bottom: 5px;
    max-width: 80%;
}

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

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

.line__container .line__left .line__left-text {
  margin-left: 7px;
}

.line__container .line__left .line__left-text .name {
  font-size: 80%;
  color: #ffffff;
}

.line__container .line__left .date {
  align-self: flex-end;
  font-size: 70%;
  line-height: 1.3;
  color: #333;
  padding-left: 3px;
}
/* コメントエリア */
.line__container .line__left .text {
  margin: 0;
  position: relative;
  padding: 10px;
  border-radius: 20px;
  background-color: #ffffff;
}

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

/* 自分の会話 */
.line__container .line__right {
    position: relative;
    display: block;
    margin: 5px 0;
    max-width: 75%;
    margin-right: 15px;
    align-self: end;
}

/* コメントエリア */
.line__container .line__right .text {
  padding: 10px;
  border-radius: 20px;
  background-color: #8de055;
  margin: 0;
  margin-left: 80px;
}

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


/* 既読エリア */
.line__container .line__right .date {
  content: '';
  position: absolute;
  display: block;
  width: 100px;
  text-align: right;
  left: -30px;
  bottom: 0px;
  font-size: 70%;
  line-height: 1.3;
  color: #333;
}

.chat__outer{
  margin: 0;
  height:62px;
  width: 100%;
  background-color: #ffffff;
  padding: 10px 20px;
  position: sticky;
  bottom:0;
  z-index: 10;
  display: flex;
}
.chat__contents{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
} 

.chat__contents span{
  font-size: 150%;
  color: #111;
}
.chat__input{
  background-color:#f5f5f5;
  border-radius: 9999px;
  width:80%;
  padding: 10px; 
  display: flex;
  justify-content: space-between;
}
.chat__input button{
  border:none;
  outline: none;
  background-color:transparent;
  cursor: pointer;
}
.chat{
  background-color:#f5f5f5;
  border:none;
  width: 85%;
  outline: none;
  font-size:1rem;
}

/* 入力中のアニメーション */
.bubble {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  animation: fadeIn 0.3s ease;
}

.dot {
  width: 5px;
  height: 5px;
  background-color: #888;
  border-radius: 50%;
  opacity: 0.3;
  animation: typing 1.5s infinite;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
