/**
 * cf7-enhance.css
 * Contact Form 7 UX強化スタイル
 *
 * - 擬似確認画面モーダル
 * - 送信ボタン非活性
 * - ラジオ・チェックボックスのカスタムデザイン
 */

:root {
	--color-primary: #56ace1;
	--color-primary-dark: #1a2353;
	--color-error: #e05050;
	--color-bg-light: #f5f6f7;
	--color-bg-accent: #edf0fa;
	--color-text: #333;
	--color-text-sub: #666;
}


/* ============================================
   擬似確認画面モーダル
============================================ */

.cf7-confirm-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cf7-confirm-overlay.is-active {
	display: flex;
}

.cf7-confirm-modal {
	background: #fff;
	border-radius: 20px;
	padding: 48px;
	max-width: 700px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.cf7-confirm-title {
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--color-primary-dark);
	text-align: center;
	margin-bottom: 12px;
}

.cf7-confirm-lead {
	font-size: 0.9375rem;
	color: var(--color-text-sub);
	text-align: center;
	margin-bottom: 32px;
}

/* 確認テーブル */
.cf7-confirm-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 32px;
}

.cf7-confirm-table th,
.cf7-confirm-table td {
	padding: 16px 20px;
	font-size: 1rem;
	line-height: 1.7;
	vertical-align: top;
	border-bottom: 1px solid #e8eaef;
}

.cf7-confirm-table th {
	width: 140px;
	font-weight: 400;
	color: var(--color-primary-dark);
	white-space: nowrap;
}

.cf7-confirm-table td {
	color: var(--color-text);
	word-break: break-all;
}

/* 確認ボタン */
.cf7-confirm-buttons {
	display: flex;
	gap: 16px;
	justify-content: center;
}

.cf7-confirm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 36px;
	border-radius: 50px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	letter-spacing: 0.05em;
	transition: background 0.3s, color 0.3s;
	font-family: inherit;
}

.cf7-confirm-btn--back {
	border: 1px solid #ccc;
	background: #fff;
	color: var(--color-text-sub);
}

.cf7-confirm-btn--back:hover {
	background: var(--color-bg-light);
}

.cf7-confirm-btn--send {
	border: none;
	background: var(--color-primary-dark);
	color: #fff;
}

.cf7-confirm-btn--send:hover {
	background: #0d1f3c;
}


/* ============================================
   送信ボタン非活性
============================================ */

.btn-disabled,
input[type="submit"].btn-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}


/* ============================================
   ラジオボタン・チェックボックス カスタムデザイン
============================================ */

/* ラジオグループ */
.tmpl_form_wrap .wpcf7-radio,
.tmpl_form_wrap .wpcf7-checkbox,
.tmpl_form_wrap .wpcf7-acceptance {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.tmpl_form_wrap .wpcf7-list-item {
	margin: 0;
}

/* ラジオボタン */
.tmpl_form_wrap .wpcf7-radio input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #ccc;
	border-radius: 50%;
	position: relative;
	cursor: pointer;
	vertical-align: middle;
	margin-right: 6px;
	transition: border-color 0.2s;
}

.tmpl_form_wrap .wpcf7-radio input[type="radio"]:checked {
	border-color: var(--color-primary);
}

.tmpl_form_wrap .wpcf7-radio input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 10px;
	height: 10px;
	background: var(--color-primary);
	border-radius: 50%;
}

/* チェックボックス */
.tmpl_form_wrap .wpcf7-checkbox input[type="checkbox"],
.tmpl_form_wrap .wpcf7-acceptance input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #ccc;
	border-radius: 4px;
	position: relative;
	cursor: pointer;
	vertical-align: middle;
	margin-right: 6px;
	transition: border-color 0.2s, background 0.2s;
}

.tmpl_form_wrap .wpcf7-checkbox input[type="checkbox"]:checked,
.tmpl_form_wrap .wpcf7-acceptance input[type="checkbox"]:checked {
	border-color: var(--color-primary);
	background: var(--color-primary);
}

.tmpl_form_wrap .wpcf7-checkbox input[type="checkbox"]:checked::after,
.tmpl_form_wrap .wpcf7-acceptance input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 5px;
	width: 6px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* ラベルテキスト */
.tmpl_form_wrap .wpcf7-list-item-label {
	font-size: 1rem;
	color: var(--color-text);
	cursor: pointer;
	vertical-align: middle;
}


/* ============================================
   SP対応
============================================ */
@media screen and (max-width: 768px) {
	.cf7-confirm-modal {
		padding: 32px 20px;
		border-radius: 16px;
	}

	.cf7-confirm-title {
		font-size: 5vw;
	}

	.cf7-confirm-table th {
		display: block;
		width: 100%;
		padding: 12px 0 4px;
		border-bottom: none;
		font-size: 3.5vw;
	}

	.cf7-confirm-table td {
		display: block;
		padding: 0 0 12px;
		font-size: 3.8vw;
	}

	.cf7-confirm-buttons {
		flex-direction: column;
	}

	.cf7-confirm-btn {
		width: 100%;
		font-size: 4vw;
		padding: 14px 24px;
	}

	/* ラジオ・チェック: SP縦並び */
	.tmpl_form_wrap .wpcf7-radio,
	.tmpl_form_wrap .wpcf7-checkbox {
		flex-direction: column;
		gap: 16px;
	}
}
