/**
 * 責務: ウィジェットの見た目のみ。JSの状態管理には関与しない
 *       （data-state属性はJS(ui.js)側が付与する）。
 */

.ai-voice-operator-widget {
	max-width: 320px;
	margin: 1.5em auto;
	padding: 1.5em;
	border-radius: 12px;
	background: #f7f7f8;
	text-align: center;
	font-family: inherit;
}

.ai-voice-operator-widget__mic {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: none;
	background: #2271b1;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ai-voice-operator-widget__mic-icon {
	pointer-events: none;
}

.ai-voice-operator-widget[data-state="user_speaking"] .ai-voice-operator-widget__mic,
.ai-voice-operator-widget[data-state="listening"] .ai-voice-operator-widget__mic {
	background: #d63638;
}

.ai-voice-operator-widget__status {
	margin: 0.75em 0 0;
	font-size: 0.9em;
	color: #555;
}

.ai-voice-operator-widget__avatar-wrap {
	position: relative;
	width: 240px;
	height: 240px;
	margin: 0.75em auto;
}

.ai-voice-operator-widget__particles {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ai-voice-operator-widget__avatar {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: #ccc;
	overflow: hidden;
	transition: background-color 0.2s ease;
}

.ai-voice-operator-widget__avatar[data-state="speaking"] {
	background: #2271b1;
}

.ai-voice-operator-widget__avatar-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ai-voice-operator-widget__reply {
	margin: 0.5em 0 0;
	font-size: 0.85em;
	text-align: left;
	word-break: break-word;
}

.ai-voice-operator-widget__text-input-wrap {
	position: relative;
	margin: 0.75em 0 0;
}

.ai-voice-operator-widget__text-input {
	width: 100%;
	padding: 0.6em 2.4em 0.6em 0.8em;
	border: 1px solid #ccc;
	border-radius: 999px;
	font-size: 0.9em;
	box-sizing: border-box;
}

.ai-voice-operator-widget__text-send {
	position: absolute;
	top: 50%;
	right: 0.3em;
	transform: translateY( -50% );
	width: 1.9em;
	height: 1.9em;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #2271b1;
	color: #fff;
	font-size: 0.9em;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ai-voice-operator-auth__avatar {
	width: 96px;
	height: 96px;
	margin: 0 auto 0.75em;
	border-radius: 50%;
	overflow: hidden;
	background: #ccc;
}

.ai-voice-operator-auth__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ai-voice-operator-auth {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	text-align: left;
}

.ai-voice-operator-auth__notice {
	font-size: 0.8em;
	color: #666;
	white-space: pre-line;
}

.ai-voice-operator-auth__field {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	font-size: 0.9em;
}

.ai-voice-operator-auth__field input {
	padding: 0.5em;
	border: 1px solid #ccc;
	border-radius: 6px;
}

.ai-voice-operator-auth__remember {
	display: flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.85em;
}

.ai-voice-operator-auth button {
	padding: 0.6em;
	border: none;
	border-radius: 6px;
	background: #2271b1;
	color: #fff;
	cursor: pointer;
}

.ai-voice-operator-auth__message {
	font-size: 0.85em;
	color: #d63638;
	min-height: 1em;
}

.ai-voice-operator-auth__message:empty {
	display: none;
}

.ai-voice-operator-widget__close-guidance {
	margin: 1em 0 0.5em;
	font-size: 0.85em;
	color: #555;
}

.ai-voice-operator-widget__rating {
	display: flex;
	justify-content: center;
	gap: 0.3em;
}

.ai-voice-operator-widget__star {
	padding: 0;
	border: none;
	background: none;
	font-size: 1.8em;
	line-height: 1;
	color: #ccc;
	opacity: 0.5;
	cursor: pointer;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.ai-voice-operator-widget__star.is-active {
	color: #f0b429;
	opacity: 1;
}

/* TODO: ダークモード対応、アニメーションの追加 */
