
body {

  background: #f0f0f5;
  padding: 8px;
}

#chat {

	background: white;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);


  padding: 20px;
  border-radius: 10px;
 
  margin: 0 auto;
}


.bot {  color: #333;  }
.user { color: #0077cc; }

._console {
	background-color:#000;
	color:white;
	padding:12pt;
	border-radius:8px;
}

._btn_navi{
  margin: 4px;
  padding: 8px 16px;
  border: none;
  background: #0077cc;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  border-radius:20px;
}
._btn_navi:hover {
  background: #005fa3;
}

.btn_query {
  margin: 4px;
  padding: 10px;
  border: none;
  background: rgba(0,0,0,0.02);
  color: #222;
  border-radius: 15px;
  cursor: pointer;
  border-radius:20px;
}
.btn_query:hover {
   background: #ddd;
} 
.btn_query2 {
	margin: 4px;
	padding: 10px;
	border:1px solid navy;
	background: rgba(255,255,255,0.8);
	color: #222;
	border-radius: 15px;
	cursor: pointer;
	border-radius: 20px;
}

.btn_query2:hover {
	background: #ddd;
}

._btn {
  margin: 5px;
  padding: 10px;
  border: none;
  background: #0077cc;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}
._btn:hover {
  background: #005fa3;
}
._btn2 {
  margin: 2px;
  padding: 2px;
  border: none;
  background: gold;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}
._btn2:hover {
  background: yellow;
}

._btn3 {

	cursor: pointer;
	padding: 10px 16px;
	background: linear-gradient(135deg, #4e54c8, #8f94fb);
	color: white;
	border: none;
	border-radius: 24px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: all 0.3s ease;
	margin:4px ;
}
._btn3:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
._d_ib { display:inline-block;}

a { background-color:rgba(0,0,0,0.03) ; padding:4px; text-decoration: underline; border-radius:4px;}
a:hover { background-color:skyblue; color:white; }

._box { padding:4px; background-color:rgba(0,0,0,0.02); }

._link {
  margin: 2px;
  padding: 2px;
  border: none;
  cursor: pointer;
}
._link:hover {
}

._chat_box { 
	margin:8px auto; 
	padding:8px;
	background-color:#f7f7ff;
	border-radius:10px;
	border:1px solid skyblue;
	opacity: 0; /* 最初は完全に透明 */
	animation: fadeIn 2s ease-in-out forwards;
}


@keyframes fadeIn {
  0% { opacity: 0; }
  40% { opacity: 0.7; }
  100% { opacity: 1; }
}

.typing-indicator {
  display: flex;  gap: 3px;
}

.typing-indicator span {
  width: 12px;
  height: 12px;
  background-color: #666;
  border-radius: 50%;
  opacity: 0.7;
  animation: typingAnimation 1s infinite;
  margin:8px 2px;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingAnimation {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#modal {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 400px;
  margin:10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#modal a {
	display:inline-block;border:1px solid transparent;  cursor:pointer; 
	margin:3px;padding:0.2em 1em; min-width:3em;
	border-radius:20px;
	text-align:center;
	background-color:#eee; 	
}

#modal-close {
  margin-top: 10px;
  text-align: center;
}

#modal-close button {
	padding: 6px 12px;
	cursor:pointer;
	padding: 10px 20px;
	font-size: 16px;
	/*background: linear-gradient(135deg, #4e54c8, #8f94fb);*/
	color: #333;
	border: none;
	border-radius: 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: all 0.3s ease;
}

#modal-close button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

#modal-close button:active {
transform: translateY(0);
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.chat-footer {
  padding: 5px 15px;
  border-radius: 0 0 10px 10px;
  display: flex;
  gap: 4px;
  border: 1px solid #e0e0e0;
  border-top: none;
  margin:2px;
}

.message-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  outline: none;
  font-size: 14px;
  resize: none;
  max-height: 100px;
  min-height: 50px;
  overflow-y: auto;
}

.message-input:focus {
  border-color: #4a6fa5;
}

.send-button {
  background-color: #4a6fa5;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.send-button:hover {
  background-color: #3d5c89;
}

.send-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}   


._fukidashi {
	position: relative;
	width: fit-content;
	padding: 8px 16px;
	border: 2px solid #333333;
	display: inline-block;
	cursor: pointer;
	background-color:#fff;
			
}

._fukidashi::after {
	content: "";
	position: absolute;
	top: calc(100% + 0px);
	left: 50%;
	width: 12px;
	height: 2px;
	box-sizing: border-box;
	background-color: #333333;
	box-shadow: 0 2px 0 #ffffff, 0 -2px 0 #ffffff;
	/* 背景色と同じ色を指定 */
	rotate: 50deg;
}


._blink {
  animation: _anime_blink 1.5s ease-in-out 2 none;
}

@keyframes _anime_blink {
  0% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.8); }
  90% { box-shadow: 0 0 0 20px rgba(187, 222, 251, 0.1);  }
  100% { box-shadow: 0 0 0 30px rgba(187, 222, 251, 0);  }
}

.truncate {
	transition: overflow 1s ease-in-out, white-space 1s ease-in-out;
}


._md ul { margin-left:1em; }
._md p { margin:0.5em }
._md li  { margin:0.2em  }
._md li strong { color:navy; }



@media screen and (max-width: 640px)
{
	.truncate {
	  max-height:2em;
	  white-space: nowrap; 
	  overflow: hidden; 
	  text-overflow: ellipsis; 
	  cursor: pointer; 
	}

	.truncate:hover {
	  max-height:unset;
	  overflow: visible;
	  white-space: normal;
	  z-index:9;
	  
	}
}