/* -------------------------------------------------- */
/* Charioot Public Chat Widget Styles
/* -------------------------------------------------- */

/* CSS変数を定義（テーマカラーなどをJSから変更しやすくするため） */
:root {
	--charioot-theme-color: #0073aa;
}

/* チャット開始アイコン（バブル） */
#charioot-bubble {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 60px;
	height: 60px;
	background-color: var(--charioot-theme-color);
	border-radius: 50%;
	box-shadow: 0 4px 8px rgba(0,0,0,0.2);
	cursor: pointer;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	transition: transform 0.2s ease-in-out;
}

#charioot-bubble:hover {
	transform: scale(1.1);
}

/* チャットウィンドウ全体 */
#charioot-window {
	position: fixed;
	bottom: 90px;
	right: 20px;
	width: 350px;
	max-width: 90vw;
	height: 500px;
	max-height: 80vh;
	background-color: #ffffff;
	border-radius: 10px;
	box-shadow: 0 5px 20px rgba(0,0,0,0.2);
	z-index: 10000;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.3s, transform 0.3s;
}

/* ヘッダー部分 */
#charioot-header {
	background-color: var(--charioot-theme-color);
	color: white;
	padding: 15px;
	font-weight: bold;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#charioot-close-btn {
	background: none;
	border: none;
	color: white;
	font-size: 24px;
	cursor: pointer;
}

/* メッセージ表示エリア */
#charioot-messages {
	flex-grow: 1;
	padding: 15px;
	overflow-y: auto;
	background-color: #f9f9f9;
}

/* メッセージの吹き出し */
.charioot-message {
	margin-bottom: 10px;
	padding: 10px 15px;
	border-radius: 18px;
	max-width: 80%;
	line-height: 1.4;
}

/* AIからのメッセージ（左寄せ） */
.charioot-message.ai {
	background-color: #e9e9eb;
	color: #000;
	border-bottom-left-radius: 4px;
	align-self: flex-start;
	float: left;
	clear: both;
}

/* ユーザーからのメッセージ（右寄せ） */
.charioot-message.user {
	background-color: var(--charioot-theme-color);
	color: white;
	border-bottom-right-radius: 4px;
	align-self: flex-end;
	float: right;
	clear: both;
}


/* 入力フォームエリア */
#charioot-input-form {
	display: flex;
	padding: 10px;
	border-top: 1px solid #e0e0e0;
}

#charioot-input {
	flex-grow: 1;
	border: 1px solid #ccc;
	border-radius: 20px;
	padding: 10px 15px;
	font-size: 14px;
}

#charioot-send-btn {
	background-color: var(--charioot-theme-color);
	border: none;
	color: white;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	margin-left: 10px;
	cursor: pointer;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 隠すための汎用クラス */
.charioot-hidden {
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
}