/* Anshin Mail Form public styles */
.anshinmf {
	width: 100%;
	max-width: 720px;
	margin: 1.5em auto;
	align-self: center; /* flex 親（block テーマの content ラッパ）でも中央寄せ */
	font-size: 16px;
	color: #222;
}

.anshinmf-row {
	display: block;
	margin: 0 0 1.25em;
}

.anshinmf-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.anshinmf-required {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0.05em 0.5em;
	border-radius: 4px;
	background: #c92a2a;
	color: #fff;
	font-size: 0.72em;
	font-weight: 700;
	line-height: 1.5;
	vertical-align: middle;
	white-space: nowrap;
}

.anshinmf-input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55em 0.7em;
	border: 1px solid #c8d0d8;
	border-radius: 4px;
	background: #fff;
	font-size: 1em;
	line-height: 1.5;
}

/* テーマで背景色が上書きされても入力要素は白で揃える */
.anshinmf input[type="text"],
.anshinmf input[type="email"],
.anshinmf input[type="tel"],
.anshinmf input[type="url"],
.anshinmf input[type="date"],
.anshinmf input[type="number"],
.anshinmf textarea,
.anshinmf select {
	background-color: #fff;
}

.anshinmf-input:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
	border-color: #2271b1;
}

textarea.anshinmf-input {
	min-height: 6em;
	resize: vertical;
}

.anshinmf-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1em;
	margin: 0;
	padding: 0;
}

.anshinmf-option {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 0.35em;
	line-height: 1.5;
	margin: 0;
	padding: 0;
	vertical-align: middle;
}

/* テーマ側 CSS が input にデフォルトの margin/padding/vertical-align を上書きしても、
   全項目の縦位置が揃うよう完全リセット。最後の項目だけずれて見える事象への対策。 */
.anshinmf-option > input[type="checkbox"],
.anshinmf-option > input[type="radio"] {
	margin: 0;
	padding: 0;
	vertical-align: middle;
	flex-shrink: 0;
	align-self: center;
}

.anshinmf-note {
	display: block;
	margin-top: 0.35em;
	color: #6b7280;
	font-size: 0.9em;
}

.anshinmf-error {
	display: block;
	margin-top: 0.35em;
	color: #c92a2a;
	font-size: 0.9em;
	font-weight: 600;
}

.anshinmf-has-error .anshinmf-input,
.anshinmf-has-error input[type="text"],
.anshinmf-has-error input[type="email"],
.anshinmf-has-error input[type="tel"],
.anshinmf-has-error input[type="url"],
.anshinmf-has-error input[type="date"],
.anshinmf-has-error input[type="number"],
.anshinmf-has-error textarea,
.anshinmf-has-error select {
	border-color: #c92a2a;
	box-shadow: 0 0 0 1px #f5b1b1;
}

.anshinmf-errors {
	border: 1px solid #f5b1b1;
	background: #fff5f5;
	padding: 1em;
	border-radius: 4px;
	margin: 0 0 1.5em;
	color: #842029;
}

.anshinmf-errors ul {
	margin: 0.5em 0 0 1.25em;
}

.anshinmf-submit {
	text-align: center;
	margin-top: 1.5em;
}

.anshinmf-button {
	display: inline-block;
	padding: 0.7em 1.5em;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1em;
}

.anshinmf-button:hover,
.anshinmf-button:focus {
	background: #135e96;
}

.anshinmf-button-back {
	background: #6b7280;
	margin-right: 0.5em;
}

.anshinmf-button-back:hover,
.anshinmf-button-back:focus {
	background: #4b5563;
}

.anshinmf-confirm-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5em;
}

.anshinmf-confirm-table th,
.anshinmf-confirm-table td {
	border: 1px solid #e5e7eb;
	padding: 0.6em 0.8em;
	vertical-align: top;
	text-align: left;
}

.anshinmf-confirm-table th {
	width: 30%;
	background: #f4f6f9;
	font-weight: 600;
}

/* 見出しフィールド（表示専用）。フォントサイズは PC/スマホで CSS 変数経由で切替。 */
.anshinmf-heading {
	font-weight: 700;
	margin: 1.82em 0 0.52em;
	font-size: var(--anshinmf-h-pc, 1.4em);
	line-height: 1.4;
}

/* 入力 → 確認 → 送信完了 のステップナビゲーション */
.anshinmf-steps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	list-style: none;
	margin: 0 0 3em;
	padding: 3em 0 0;
}

.anshinmf-step {
	box-sizing: border-box;
	width: 105px;
	padding: 0.5em 0;
	border-radius: 999px;
	background: #eef1f4;
	color: #6b7280;
	font-weight: 600;
	font-size: 1.05em;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}

.anshinmf-step.is-done {
	color: #374151;
}

.anshinmf-step.is-current {
	background: #2d6cdf;
	color: #fff;
}

.anshinmf-step-sep {
	width: 1.5em;
	height: 0;
	border-top: 1px solid #c8d0d8;
}

.anshinmf-intro {
	text-align: center;
	margin-bottom: 25px;
}

.anshinmf-consent {
	padding: 0.75em 1em;
	border-radius: 4px;
}

/* 同意ブロック内のエラー（「プライバシーポリシーに同意してください。」）は中央寄せ。 */
.anshinmf-consent .anshinmf-error {
	text-align: center;
}

.anshinmf-consent-intro {
	margin: 0 0 0.5em;
}

.anshinmf-consent-policy {
	max-height: 12em;
	overflow-y: auto;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 0.6em 0.8em;
	margin: 0 0 0.6em;
	background: #fff;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.9em;
	line-height: 1.6;
}

.anshinmf-consent-check {
	margin: 20px 0 0;
	text-align: center;
}

.anshinmf-turnstile {
	display: flex;
	justify-content: center;
}

.anshinmf-recaptcha-disclosure {
	margin-top: 0.6em;
	padding-top: 30px;
	padding-bottom: 20px;
	font-size: 0.85em;
	color: #555;
	line-height: 1.5;
	text-align: center;
}

.anshinmf-recaptcha-disclosure a {
	color: #2271b1;
}

.anshinmf-complete-message {
	max-width: 650px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
	font-size: 1.1em;
	white-space: pre-wrap;
	word-break: break-word;
}

@media (max-width: 600px) {
	.anshinmf-steps {
		flex-wrap: nowrap;
		gap: 0.2em;
	}
	.anshinmf-step {
		width: auto;
		flex: 0 0 auto;
		padding: 0.4em 0.7em;
		font-size: 0.95em;
	}
	.anshinmf-step-sep {
		flex: 0 0 auto;
		width: 0.5em;
	}
	.anshinmf-intro {
		text-align: left;
	}
	.anshinmf-confirm-table th,
	.anshinmf-confirm-table td {
		display: block;
		width: auto;
	}
	.anshinmf-confirm-table th {
		border-bottom: none;
	}
	.anshinmf-heading {
		font-size: var(--anshinmf-h-sp, var(--anshinmf-h-pc, 1.25em));
	}
}
