/* ==========================================================================
   Contact Page — お問い合わせ (slug: contact)
   ==========================================================================
   Contact Form 7 で構築されるフォーム + JS 制御の確認パネル。
   レイアウト寸法は legal.css と揃え、フォーム要素は account.css の
   .swch-form-field 系のトークンに合わせて CF7 デフォルトクラスを上書きする。
   ========================================================================== */

.swch-contact-page {
	padding: 48px 24px 80px;
}

.swch-contact-container {
	max-width: 820px;
	margin: 0 auto;
}

/* Header — legal と同じ tech-modern eyebrow + title */

.swch-contact-header {
	text-align: center;
	padding: 24px 0 40px;
	margin-bottom: 32px;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.swch-contact-eyebrow {
	display: inline-block;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	background: linear-gradient(90deg, #4338ca, #db2777);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-bottom: 12px;
}

.swch-contact-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: #0b1020;
	margin: 0;
	letter-spacing: -0.02em;
	line-height: 1.35;
}

/* Content card */

.swch-contact-content {
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(55, 48, 163, 0.08);
	padding: 48px 56px;
	color: #1f2937;
	line-height: 1.7;
	font-size: 0.9375rem;
}

.swch-contact-content > *:first-child {
	margin-top: 0;
}

.swch-contact-content > *:last-child {
	margin-bottom: 0;
}

.swch-contact-content p {
	margin: 0 0 1.25em;
}

.swch-contact-content a {
	color: #4338ca;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}

.swch-contact-content a:hover {
	color: #db2777;
}

/* ==========================================================================
   CF7 Form — テーマトークンへの上書き
   ========================================================================== */

.swch-contact-content .wpcf7-form p {
	margin: 0;
}

.swch-form-field {
	margin-bottom: 20px;
}

.swch-form-field label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: #1e293b;
}

.swch-required {
	display: inline-block;
	margin-left: 4px;
	color: #db2777;
	font-weight: 700;
}

.swch-form-field .swch-input,
.swch-form-field input[type="text"],
.swch-form-field input[type="email"],
.swch-form-field textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 0.9375rem;
	color: #1e293b;
	background: #ffffff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
	font-family: inherit;
}

.swch-form-field textarea {
	line-height: 1.6;
	resize: vertical;
	min-height: 160px;
}

.swch-form-field .swch-input:focus,
.swch-form-field input:focus,
.swch-form-field textarea:focus {
	outline: none;
	border-color: #4f46e5;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

/* CF7 invalid state */

.swch-form-field .wpcf7-not-valid {
	border-color: #dc2626;
}

.swch-form-field .wpcf7-not-valid:focus {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	font-size: 0.75rem;
	font-weight: 500;
	color: #dc2626;
	line-height: 1.4;
}

/* Acceptance (プライバシーポリシー同意) */

.swch-form-acceptance {
	margin-top: 8px;
}

.swch-form-acceptance label {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #1f2937;
	cursor: pointer;
	margin-bottom: 0;
}

.swch-form-acceptance .wpcf7-list-item {
	display: block;
	margin: 0;
}

.swch-form-acceptance .wpcf7-list-item-label {
	font-weight: 500;
}

.swch-form-acceptance input[type="checkbox"] {
	margin-top: 3px;
	width: 16px;
	height: 16px;
	accent-color: #4f46e5;
	flex-shrink: 0;
}

.swch-form-acceptance a {
	color: #4338ca;
	text-decoration: underline;
}

.swch-form-acceptance a:hover {
	color: #db2777;
}

/* Acceptance — JS による未チェックエラー表示 */

.swch-acceptance-error {
	display: block;
	margin-top: 8px;
	font-size: 0.75rem;
	font-weight: 500;
	color: #dc2626;
	line-height: 1.4;
}

/* ==========================================================================
   Actions — 確認ボタン + （隠した）CF7 標準送信ボタン
   ========================================================================== */

.swch-contact-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 32px;
}

.swch-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 32px;
	border-radius: 6px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
	line-height: 1.5;
	min-width: 180px;
	font-family: inherit;
}

.swch-button-primary {
	background: linear-gradient(135deg, #4338ca 0%, #db2777 100%);
	color: #ffffff;
	box-shadow: 0 6px 20px -8px rgba(15, 23, 42, 0.18);
}

.swch-button-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px -8px rgba(15, 23, 42, 0.24);
	color: #ffffff;
}

.swch-button-secondary {
	background: #ffffff;
	color: #1e293b;
	border: 1px solid #e2e8f0;
}

.swch-button-secondary:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #1e293b;
}

.swch-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: 0 6px 20px -8px rgba(15, 23, 42, 0.18);
}

/* CF7 標準送信ボタン: 確認画面経由で submit するので隠す */

.swch-contact-real-submit {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.wpcf7-spinner {
	display: none !important;
}

/* ==========================================================================
   Confirm Panel — JS で動的生成、確認内容を表示
   ========================================================================== */

.swch-contact-confirm {
	margin-top: 24px;
	padding: 32px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(55, 48, 163, 0.08);
}

.swch-contact-confirm-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: #0b1020;
	margin: 0 0 8px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
}

.swch-contact-confirm-hint {
	margin: 0 0 24px;
	font-size: 0.8125rem;
	color: #64748b;
	line-height: 1.6;
}

.swch-contact-confirm-list {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 16px 20px;
	margin: 0 0 8px;
}

.swch-contact-confirm-list dt {
	font-size: 0.75rem;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding-top: 2px;
	margin: 0;
}

.swch-contact-confirm-list dd {
	margin: 0;
	font-size: 0.9375rem;
	color: #0b1020;
	font-weight: 500;
	word-break: break-word;
}

.swch-contact-confirm-list dd.swch-contact-confirm-message {
	white-space: pre-wrap;
	line-height: 1.7;
}

/* ==========================================================================
   Complete View — 送信成功表示
   ========================================================================== */

.swch-contact-complete {
	margin-top: 24px;
	padding: 40px 32px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 10px;
	text-align: center;
}

.swch-contact-complete-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #166534;
	margin: 0 0 12px;
}

.swch-contact-complete-text {
	margin: 0;
	font-size: 0.9375rem;
	color: #166534;
	line-height: 1.7;
}

/* CF7 標準の response output（フォールバック・エラー表示） */

.wpcf7-response-output {
	margin: 24px 0 0 !important;
	padding: 14px 18px !important;
	border-radius: 6px !important;
	font-size: 0.875rem !important;
	line-height: 1.5 !important;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
	background: #fef2f2;
	border: 1px solid #fecaca !important;
	color: #991b1b;
}

.wpcf7 form.sent .wpcf7-response-output {
	background: #f0fdf4;
	border: 1px solid #bbf7d0 !important;
	color: #166534;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.swch-contact-page {
		padding: 24px 16px 56px;
	}

	.swch-contact-header {
		padding: 12px 0 28px;
		margin-bottom: 24px;
	}

	.swch-contact-title {
		font-size: 1.375rem;
	}

	.swch-contact-content {
		padding: 28px 20px;
		border-radius: 10px;
		font-size: 0.9rem;
	}

	.swch-contact-actions {
		flex-direction: column;
	}

	.swch-button {
		width: 100%;
		min-width: 0;
	}

	.swch-contact-confirm {
		padding: 24px 20px;
	}

	.swch-contact-confirm-list {
		grid-template-columns: 1fr;
		gap: 4px 0;
	}

	.swch-contact-confirm-list dt {
		padding-top: 12px;
	}

	.swch-contact-confirm-list dt:first-of-type {
		padding-top: 0;
	}
}
