body, html {
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	box-sizing: border-box; /* Ensures padding doesn't affect overall width */
}

#chatWindow {
	position: fixed;
	bottom: 8px;
	right: 7px;
	width: 90%;
	max-width: 400px;
	height: auto;
	background: #ddd;
	padding: 10px;
	border-radius: 8px;
	border-bottom: 1px solid #aaa;
	box-shadow: 0 2px 10px rgba(0,0,0,0.4);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
#chat_title {
	background: darkblue;
	color: #fff;
}
#chatMessages {
	height: 200px;
	max-height: 50vh;
	overflow-y: auto;
	padding: 10px;
	background: #f0f0f0;
	border-bottom: 1px solid #ddd;
	border-radius: 8px 8px 0 0;
	margin: 8px 0 0 0;
}

#audioControls, #userPrompt, form div {
	width: 100%; /* Ensures full width */
}

input[type="text"], textarea {
	width: calc(100% - 22px); /* Adjusts width accounting for padding */
	padding: 10px;
	margin-bottom: 10px;
	border: 1px solid #ccc;
}

button {
	cursor: pointer;
	padding: 10px 15px;
	border: none;
	background-color: #007bff;
	color: white;
	border-radius: 5px;
	width: 100%; /* Full width buttons */
	margin-top: 10px; /* Margin top for spacing */
}

button:hover {
	background-color: #0056b3;
}

#closeChatWindow {
	position: absolute;
	top: 0;
	right: 0;
	padding: 2px 6px;
	margin: 5px;
	width: 24px;
	font-size: 1em;
}

#voiceEnabled {
	margin-right: 5px;
}

#audioControls {
	margin: 8px 0;
}
#stopVoice {
	width: 110px;
	margin-left: 16px;
	font-size: 1em;
}

#knowledgeBaseSelector {
	padding: 8px;
	margin: 8px 0;
	background-color: #fff;
	font-size: 1em;
}

#userPrompt {
	font-size: 1.1em;
	font-weight: bold;
	padding: 8px;
}
#submit {
	width: 100px;
	display: block; /* ブロック要素として扱う */
	margin: 0 0 10px 8px;
	font-size: 1em;
}

#caution, #chat_title, .footer {
	padding: 8px auto;
	text-align: center;
}
#clearChat {
	display: block; /* ブロック要素として扱う */
	width: 180px; /* ボタンの幅を150ピクセルに設定 */
	margin: 0 auto; /* 上下のマージンは0、左右のマージンは自動 */
	font-size: 1em;
}

.main {
	margin: 20px auto; /* Centers the main content */
	padding: 20px;
	max-width: 1000px; /* Max width for large screens */
	width: 90%; /* Full width on small screens */
	background-color: #ffffff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
}
.main h1, .main h2, .main p {
	text-align: left; /* Aligns text to the left */
	font-size: 1rem; /* Responsive font size */
}
#openChatWindow {
	font-size: 1em;
}
/* モバイル端末用のスタイル */
@media (max-width: 600px) {
	body {
		background-color: lightblue;
	}
	.container {
		padding: 20px;
		font-size: 14px;
	}
	h1 {
		font-size: 24px;
	}
}

/* タブレット端末用のスタイル */
@media (min-width: 601px) and (max-width: 900px) {
	body {
		background-color: lightgreen;
	}
	.container {
		padding: 30px;
		font-size: 16px;
	}
	h1 {
		font-size: 28px;
	}
}

/* デスクトップ端末用のスタイル */
@media (min-width: 901px) {
	body {
		background-color: lightyellow;
	}
	.container {
		padding: 40px;
		font-size: 18px;
	}
	h1 {
		font-size: 32px;
	}
}

button:disabled {
	background-color: #cccccc; /* グレーアウトの背景色 */
	color: #666666; /* テキストの色を暗くする */
	cursor: not-allowed; /* カーソルを禁止マークに変更 */
}
