/* ==============================================
   お問い合わせページ – フロント用CSS
   Figma デザイン準拠
============================================== */

/* ---- ページ全体 ---- */
.contact-page {
	background: #f8f9fa;
	font-family: Helvetica, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* ---- 2カラム グリッド ---- */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 80px 32px 48px;
	align-items: stretch;
}

.contact-grid__left {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ヘッダーカードは固定高さ、案内・強みカードが余白を均等に分ける */
.contact-grid__left > .wp-block-sensing-contact-info,
.contact-grid__left > .wp-block-sensing-contact-strengths {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0;
}

.contact-grid__right {
	position: sticky;
	top: 120px;
	align-self: start;
}

/* ---- 全幅セクション（ロゴスクロール） ---- */
.contact-fullwidth {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 32px 64px;
}

/* ---- 共通カードスタイル ---- */
.contact-card {
	background: #fff;
	border-radius: 8px;
	padding: 32px;
	box-shadow: 0 4px 6px -1px rgba(0, 32, 64, 0.1);
}

.contact-card--bordered {
	border: 2px solid rgba(20, 27, 43, 0.1);
	box-shadow: 0 4px 6px -1px rgba(0, 32, 64, 0.1);
}

/* ---- Salesforce フォーム ---- */
/* ---- Salesforce フォーム（デザイン準拠） ---- */
.sf-form {
	background: #fff;
	border-radius: 8px;
	padding: 32px;
	box-shadow: 0 4px 6px -1px rgba(0, 32, 64, 0.1);
}

.sf-form__group {
	margin-bottom: 16px;
}

.sf-form__group--submit {
	margin-bottom: 0;
	padding-top: 4px;
}

.sf-form__label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #141b2b;
	margin-bottom: 4px;
}

.sf-form__required {
	color: #dc2626;
	font-size: 12px;
	margin-left: 4px;
}

.sf-form__input {
	width: 100%;
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #141b2b;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
	font-family: inherit;
}

.sf-form__input:focus {
	outline: none;
	border-color: #CFFF04;
	box-shadow: 0 0 0 3px rgba(207, 255, 4, 0.2);
}

.sf-form__input::placeholder {
	color: #9ca3af;
}

.sf-form__textarea {
	width: 100%;
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #141b2b;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
	font-family: inherit;
	resize: vertical;
}

.sf-form__textarea:focus {
	outline: none;
	border-color: #CFFF04;
	box-shadow: 0 0 0 3px rgba(207, 255, 4, 0.2);
}

.sf-form__textarea::placeholder {
	color: #9ca3af;
}

.sf-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.sf-form__checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sf-form__checkbox-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 12px;
}

.sf-form__checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #141b2b;
	cursor: pointer;
	transition: color 0.2s;
}

.sf-form__checkbox-label:hover {
	color: rgba(20, 27, 43, 0.8);
}

.sf-form__checkbox-label input[type="checkbox"],
.sf-form__checkbox-label input[type="radio"] {
	width: 16px;
	height: 16px;
	accent-color: #CFFF04;
	cursor: pointer;
	flex-shrink: 0;
}

.sf-form__checkbox-label--privacy {
	align-items: flex-start;
}

.sf-form__checkbox-label--privacy input[type="checkbox"] {
	margin-top: 2px;
}

.sf-form__checkbox-label--privacy a {
	color: #141b2b;
	text-decoration: underline;
}

.sf-form__checkbox-label--privacy a:hover {
	opacity: 0.7;
}

.sf-form__submit {
	display: block;
	width: 100%;
	padding: 12px 32px;
	font-size: 16px;
	font-weight: 700;
	color: #141b2b;
	background: #CFFF04;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	font-family: inherit;
}

.sf-form__submit:hover {
	background: #B8E600;
	transform: translateY(-1px);
}

.sf-form__note {
	text-align: center;
	font-size: 12px;
	color: #6b7280;
	margin: 12px 0 0;
}

/* ---- レスポンシブ ---- */
@media only screen and (max-width: 1024px) {
	.contact-grid {
		grid-template-columns: 1fr;
		padding: 32px 20px;
	}

	.contact-grid__right {
		position: static;
	}

	.contact-fullwidth {
		padding: 0 20px 48px;
	}
}

@media only screen and (max-width: 640px) {
	.contact-grid {
		padding: 24px 16px;
		gap: 20px;
	}

	.contact-card {
		padding: 24px;
	}

	.sf-form {
		padding: 24px;
	}

	.sf-form__row {
		grid-template-columns: 1fr;
	}

	.contact-fullwidth {
		padding: 0 16px 40px;
	}
}

/* ==============================================
   送信前 確認モーダル
   - ヘッダー(高さ70px, z-index:999) と被らないよう
     align-items: flex-start + padding-top で下に押し下げ
   - パネル高さも viewport - ヘッダー - 余白 に制限し
     項目が多い場合は body 内スクロールで対応
============================================== */
.sf-confirm {
	--sf-header-h: 70px;
	--sf-edge-gap: 24px;
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: calc(var(--sf-header-h) + var(--sf-edge-gap)) var(--sf-edge-gap) var(--sf-edge-gap);
}

/* WordPress 管理バー表示時はヘッダーがさらに下がる */
.admin-bar .sf-confirm {
	padding-top: calc(var(--sf-header-h) + 32px + var(--sf-edge-gap));
}

@media screen and (max-width: 782px) {
	.admin-bar .sf-confirm {
		padding-top: calc(var(--sf-header-h) + 46px + var(--sf-edge-gap));
	}
}

.sf-confirm.is-open {
	display: flex;
}

.sf-confirm__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 32, 64, 0.6);
	backdrop-filter: blur(2px);
	cursor: pointer;
}

.sf-confirm__panel {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100dvh - var(--sf-header-h) - var(--sf-edge-gap) * 2);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 32, 64, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: sfConfirmIn 0.24s cubic-bezier(0.18, 0.89, 0.32, 1.18);
}

.admin-bar .sf-confirm__panel {
	max-height: calc(100dvh - var(--sf-header-h) - 32px - var(--sf-edge-gap) * 2);
}

@media screen and (max-width: 782px) {
	.admin-bar .sf-confirm__panel {
		max-height: calc(100dvh - var(--sf-header-h) - 46px - var(--sf-edge-gap) * 2);
	}
}

@keyframes sfConfirmIn {
	0%   { opacity: 0; transform: translateY(12px) scale(0.98); }
	100% { opacity: 1; transform: translateY(0)    scale(1); }
}

.sf-confirm__head {
	padding: 28px 32px 20px;
	border-bottom: 1px solid #e5e7eb;
	background: linear-gradient(135deg, #002040 0%, #003366 100%);
	color: #fff;
}

.sf-confirm__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.04em;
	text-align: left;
}

.sf-confirm__lead {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	text-align: left;
}

.sf-confirm__body {
	padding: 8px 32px;
	overflow-y: auto;
	flex: 1;
}

.sf-confirm__row {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid #f1f3f5;
}

.sf-confirm__row:last-child {
	border-bottom: 0;
}

.sf-confirm__row-label {
	font-size: 13px;
	font-weight: 600;
	color: #4A5565;
	line-height: 1.6;
}

.sf-confirm__row-value {
	font-size: 14px;
	color: #141b2b;
	line-height: 1.7;
	word-break: break-word;
}

.sf-confirm__actions {
	display: flex;
	gap: 12px;
	padding: 20px 32px 24px;
	border-top: 1px solid #e5e7eb;
	background: #f8fafb;
}

.sf-confirm__btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 24px;
	font-size: 15px;
	font-weight: 700;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
	font-family: inherit;
	border: 2px solid transparent;
}

.sf-confirm__btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.sf-confirm__btn--ghost {
	background: #fff;
	color: #002040;
	border-color: #002040;
}

.sf-confirm__btn--ghost:hover {
	background: #002040;
	color: #fff;
}

.sf-confirm__btn--primary {
	background: #CFFF04;
	color: #141b2b;
	border-color: #CFFF04;
}

.sf-confirm__btn--primary:hover {
	background: #B8E600;
	border-color: #B8E600;
	transform: translateY(-1px);
}

@media only screen and (max-width: 640px) {
	.sf-confirm {
		padding: 12px;
	}

	.sf-confirm__head {
		padding: 20px 20px 16px;
	}

	.sf-confirm__title {
		font-size: 18px;
	}

	.sf-confirm__body {
		padding: 4px 20px;
	}

	.sf-confirm__row {
		grid-template-columns: 1fr;
		gap: 4px;
		padding: 12px 0;
	}

	.sf-confirm__actions {
		flex-direction: column-reverse;
		padding: 16px 20px 20px;
	}

	.sf-confirm__btn {
		width: 100%;
	}
}
