/* HBS150 Phase F: お便りフォーム スタイル */

.hbs150-koe-wrap {
	max-width: 640px;
	margin: 0 auto;
}

.hbs150-koe-banner {
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 16px;
	font-size: 14px;
}
.hbs150-koe-banner--success {
	background: #eafaf0;
	color: #1a6b3c;
	border: 1px solid #b7e6c9;
}
.hbs150-koe-banner--error {
	background: #eaf2fd;
	color: #1a56ac;
	border: 1px solid #b8d4f5;
}

.hbs150-koe-hp-wrap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hbs150-koe-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.hbs150-koe-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border: none;
	padding: 0;
	margin: 0;
}
.hbs150-koe-field label,
.hbs150-koe-field legend {
	font-size: 14px;
	font-weight: 700;
	color: #2a2a2a;
}
.hbs150-koe-required {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: #e3000b;
	border-radius: 4px;
	padding: 1px 6px;
	margin-left: 4px;
	vertical-align: middle;
}
.hbs150-koe-optional {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	color: #666;
	background: #eee;
	border-radius: 4px;
	padding: 1px 6px;
	margin-left: 4px;
	vertical-align: middle;
}

.hbs150-koe-field input[type="text"],
.hbs150-koe-field input[type="email"],
.hbs150-koe-field input[type="tel"],
.hbs150-koe-field select,
.hbs150-koe-field textarea {
	min-height: 48px;
	font-size: 16px; /* iOSの自動ズームを防ぐ */
	padding: 10px 14px;
	border: 2px solid #e6dcdb;
	border-radius: 10px;
	background: #fff;
	color: #2a2a2a;
	width: 100%;
	box-sizing: border-box;
}
.hbs150-koe-field textarea {
	min-height: 140px;
	resize: vertical;
	line-height: 1.4; /* 2026-09-09 トミタプロデュース指示：メッセージ本文入力欄の行間を広げる（PC・スマホ共通） */
}
.hbs150-koe-field input:focus,
.hbs150-koe-field select:focus,
.hbs150-koe-field textarea:focus {
	outline: 2px solid #e3000b;
	outline-offset: 1px;
	border-color: #e3000b;
}
.hbs150-koe-field.hbs150-koe-field--invalid input,
.hbs150-koe-field.hbs150-koe-field--invalid select,
.hbs150-koe-field.hbs150-koe-field--invalid textarea {
	border-color: #d9291c;
}

.hbs150-koe-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.hbs150-koe-radio {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 6px 12px;
	border: 2px solid #e6dcdb;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 400;
}
.hbs150-koe-radio input {
	width: 18px;
	height: 18px;
}
.hbs150-koe-radio:has(input:checked) {
	border-color: #e3000b;
	background: #fff5f5;
	font-weight: 700;
}

.hbs150-koe-error {
	color: #1a56ac;
	font-size: 12px;
	margin: 0;
	min-height: 1em;
}

.hbs150-koe-submit {
	min-height: 52px;
	border: none;
	border-radius: 999px;
	background: #e3000b;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}
.hbs150-koe-submit:disabled {
	background: #e6b3b6;
	cursor: not-allowed;
}

@media ( min-width: 640px ) {
	.hbs150-koe-radio-group {
		gap: 10px;
	}
}

/* Task 2/3/4: 性別・確認チェックボックス・添付ファイル・結果表示エリア（追記） */

.hbs150-koe-field--checkbox .hbs150-koe-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.95rem;
}

.hbs150-koe-field--checkbox input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.hbs150-koe-field--checkbox.hbs150-koe-field--invalid .hbs150-koe-checkbox {
	color: #d9291c;
}

.hbs150-koe-hint {
	font-size: 0.8rem;
	color: #666;
	margin: 4px 0 0;
}

.hbs150-koe-attachment-list {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	font-size: 0.85rem;
}

.hbs150-koe-attachment-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 8px;
	background: #f5f5f5;
	border-radius: 4px;
	margin-bottom: 4px;
	word-break: break-all;
}

.hbs150-koe-attachment-remove {
	flex: none;
	width: 22px;
	height: 22px;
	line-height: 20px;
	text-align: center;
	border: 1px solid #ccc;
	border-radius: 50%;
	background: #fff;
	color: #666;
	font-size: 14px;
	cursor: pointer;
	padding: 0;
}
.hbs150-koe-attachment-remove:hover {
	background: #eee;
	color: #333;
}

.hbs150-koe-result {
	margin-top: 18px;
}

.hbs150-koe-result:empty {
	margin-top: 0;
}

.hbs150-koe-attach-badge {
	display: inline-block;
	font-size: 0.85rem;
	white-space: nowrap;
}

.hbs150-koe-banner.hbs150-koe-banner--pending {
	background: #f2f4f7;
	color: #3a3f47;
	border: 1px solid #dde1e6;
	display: flex;
	align-items: center;
	gap: 10px;
}

.hbs150-koe-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #c7ccd3;
	border-top-color: #3a3f47;
	border-radius: 50%;
	animation: hbs150-koe-spin 0.8s linear infinite;
	flex-shrink: 0;
}

@keyframes hbs150-koe-spin {
	to { transform: rotate(360deg); }
}
