/* キャラクターフォームフィールド共通スタイル */

/* フォームフィールド */
.character-form-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-family: var(--font-base);
}

.character-field-label {
	font-weight: 500;
	font-size: 12px;
	color: var(--color-soft-black);
	line-height: 1;
}

/* インプット */
.character-input {
	width: 100%;
	height: 30px;
	padding: 2px 8px;
	background: var(--color-gray-50);
	border: 1px solid var(--color-gray-100);
	border-radius: 4px;
	font-family: var(--font-base);
	font-size: 12px;
	color: var(--color-soft-black);
	line-height: 1.8;
	box-sizing: border-box;
	outline: none;
}

.character-input:focus {
	border-color: var(--color-gray-600);
}

.character-input::placeholder {
	color: var(--color-gray-500);
}

/* テキストエリア */
.character-textarea {
	width: 100%;
	height: 76px;
	padding: 5px 8px;
	background: var(--color-gray-50);
	border: 1px solid var(--color-gray-100);
	border-radius: 4px;
	font-family: var(--font-base);
	font-size: 12px;
	color: var(--color-soft-black);
	line-height: 1.8;
	box-sizing: border-box;
	resize: none;
	outline: none;
}

.character-textarea:focus {
	border-color: var(--color-gray-600);
}

.character-textarea::placeholder {
	color: var(--color-gray-500);
}

/* カスタムセレクトボックス */
.character-select {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 30px;
	padding: 2px 8px;
	background: var(--color-gray-50);
	border: 1px solid var(--color-gray-100);
	border-radius: 4px;
	cursor: pointer;
	box-sizing: border-box;
}

.character-select:focus {
	outline: none;
}

.character-select:focus-visible {
	outline: 1px solid var(--color-gray-600);
	outline-offset: 0;
}

.character-select-label {
	font-family: var(--font-base);
	font-weight: 400;
	font-size: 12px;
	line-height: 1.8;
	color: var(--color-soft-black);
	flex: 1;
}

.character-select-arrow {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
	color: var(--color-soft-black);
	transition: transform 0.2s ease;
}

.character-select.open .character-select-arrow {
	transform: rotate(180deg);
}

.character-select-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: var(--color-soft-white);
	border-radius: 6px;
	box-shadow: 0 0 16px rgba(0, 0, 0, 0.25);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: all 0.15s ease;
	max-height: 152px;
	overflow: auto;
}

.character-select.open .character-select-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.character-select-item {
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 14px;
	font-family: var(--font-base);
	font-weight: 500;
	font-size: 12px;
	color: var(--color-soft-black);
	cursor: pointer;
	background: transparent;
	transition: background 0.2s ease;
}

.character-select-item-label {
	flex: 1;
}

.character-select-item:focus {
	outline: none;
}

.character-select-item:focus-visible {
	outline: 1px solid var(--color-gray-600);
	outline-offset: -1px;
	border-radius: 6px;
}

.character-select-item:hover {
	background: var(--color-gray-100);
}

.character-select-item.is-selected {
	background: var(--color-gray-100);
}

/* ボイスフィールド */
.character-voice-label-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
}

.character-voice-play-btn {
	position: absolute;
	right: 0;
	width: 18px;
	height: 18px;
	border: none;
	background: transparent;
	color: var(--color-soft-black);
	font-size: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.character-voice-play-btn:hover {
	transform: scale(1.1);
}

.character-voice-option-play-btn {
	width: 16px;
	height: 16px;
	border: none;
	background: transparent;
	color: var(--color-soft-black);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
	opacity: 0.6;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.character-voice-option-play-btn:hover {
	opacity: 1;
	transform: scale(1.2);
}

.character-voice-option-play-btn.is-playing {
	opacity: 1;
}

.character-voice-select-item {
	gap: 8px;
}

