/* ==========================================================
   LINQ OKINAWA：Snow Monkey Forms を、MW WP Form のときと同じ見た目にする
   （テーマ base の style.css「フォームエレメント」と「ボタン（.btn）」の指定を写している。
    松島写真館の smf.css をもとに、項目名の左寄せ・ボタン（角丸・紺）・確認画面のボタンの並びを、このサイトに合わせた）
   このファイルは、フォームを置いたページだけで読み込まれる（調整用プラグイン linq-smf.php）。
   ========================================================== */

/* ---------- 先頭の「※は必須項目です。」（元の p と同じ） ---------- */
#formArea .smf-form .smf-required-note {
	margin: 0 0 20px;
}

/* ---------- 項目：左に項目名（250px・左寄せ・太字）、右に入力欄（dl / dt / dd と同じ） ---------- */
#formArea .snow-monkey-form {
	max-width: none;
}
#formArea .smf-form .smf-item {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	border: none;
}
#formArea .smf-form .smf-item + .smf-item {
	margin-top: 0;
}
#formArea .smf-form .smf-item__col {
	padding: 0;
	margin: 0;
}
#formArea .smf-form .smf-item__col--label {
	flex: 0 0 250px;
	max-width: 250px;
	text-align: left;
}
#formArea .smf-form .smf-item__col--controls {
	flex: 0 0 calc(100% - 280px);
	max-width: calc(100% - 280px);
	margin: 0 0 15px; /* 元の dd の下の余白 */
}
#formArea .smf-form .smf-item__label,
#formArea .smf-form .smf-item__label label {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
	color: inherit;
}
/* 必須の ※（元の dt の中の .att と同じ。色・大きさはテーマの #formArea .att） */
#formArea .smf-form .smf-item__label .att {
	font-weight: 400;
}
#formArea .smf-form .smf-item__controls {
	width: 100%;
}

/* ---------- 入力欄（テーマの #formArea input[type=text] などと同じ） ---------- */
#formArea .smf-form input[type="text"],
#formArea .smf-form input[type="email"],
#formArea .smf-form textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 8px .5em 8px 10px;
	background: #eeeeee;
	border: 1px solid #eeeeee;
	border-radius: 0;
	box-shadow: none;
	overflow: hidden;
	font-size: 16px;
	line-height: 1.15; /* テーマの normalize.css と同じ（Snow Monkey Forms の CSS が上書きするため戻す） */
	color: #000;
}
#formArea .smf-form input[type="text"]:hover,
#formArea .smf-form input[type="text"]:focus,
#formArea .smf-form input[type="email"]:hover,
#formArea .smf-form input[type="email"]:focus,
#formArea .smf-form textarea:hover,
#formArea .smf-form textarea:focus {
	background: #fff;
	outline: none;
}
#formArea .smf-form input::placeholder,
#formArea .smf-form textarea::placeholder {
	color: #757575;
	opacity: 1;
}
#formArea .smf-form .smf-text-control,
#formArea .smf-form .smf-textarea-control {
	display: block;
	width: 100%;
}
#formArea .smf-form textarea {
	display: inline-block; /* 元のテキストエリアと同じ（下に文字の行ぶんの隙間が出る） */
	vertical-align: baseline;
}

/* ---------- 確認画面の値（元の dd の文字と同じ） ---------- */
#formArea .smf-form .smf-placeholder {
	color: inherit;
	font-size: 16px;
	line-height: 1.6;
}

/* ---------- 入力エラー（元の MW WP Form の .error と同じ色・大きさ） ---------- */
#formArea .smf-error-messages {
	display: block;
	margin: 0;
	font-size: 93%;
	font-weight: inherit;
	color: #B70000;
}

/* ---------- ボタン（テーマの .btn と同じ：白地・黒枠・角丸・200×60。マウスを乗せると紺）
   確認画面は「戻る」（紺の枠と文字）が左、「送信する」が右。スマホは「送信する」が上、「戻る」が下 ---------- */
#formArea .smf-action {
	display: flex;
	justify-content: space-between;
	margin: 30px 0 0;
	padding: 0;
}
#formArea .smf-action .smf-button-control {
	display: flex;
	flex: 1 1 100%;
	justify-content: center;
	margin: 0;
}
#formArea .smf-action .smf-button-control__control {
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	width: 200px;
	max-width: 200px;
	height: 60px;
	margin: 0 auto; /* テーマの .btn は上下 30px だが、元の .submit・.return は margin: 0 auto で打ち消している */
	padding: 1px 6px;
	background: #fff;
	background-image: none; /* Snow Monkey Forms のボタンに付いている白いグラデーションを消す */
	color: #333;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	border: 1px solid #333;
	border-radius: 30px;
	box-shadow: none;
	cursor: pointer;
	transition: .3s ease-in;
}
#formArea .smf-action .smf-button-control__control:hover,
#formArea .smf-action .smf-button-control__control:focus {
	background: #002D48;
	border-color: #002D48;
	color: #fff;
}
/* 「戻る」（元の .returnArea .return：紺の枠と文字） */
#formArea .smf-action .smf-button-control__control[data-action="back"] {
	border-color: #002D48;
	color: #002D48;
	padding: .4em 0;
}
/* 確認画面：「戻る」は左半分の右端、「送信する」は右半分の左端（元の .mw_wp_form_confirm .btnArea） */
#formArea .smf-action:has([data-action="back"]) .smf-button-control:has([data-action="back"]) {
	justify-content: flex-end;
	margin-right: 10px;
}
#formArea .smf-action:has([data-action="back"]) .smf-button-control:not(:has([data-action="back"])) {
	justify-content: flex-start;
	margin-left: 10px;
}
#formArea .smf-action:has([data-action="back"]) .smf-button-control__control {
	margin-left: 0;
	margin-right: 0;
}

/* ---------- スマホ（テーマの max-width: 767px と同じ） ---------- */
@media screen and (max-width: 767px) {
	#formArea .smf-form .smf-item__col--label,
	#formArea .smf-form .smf-item__col--controls {
		flex: 0 0 100%;
		max-width: 100%;
	}
	#formArea .smf-form .smf-item__col--label {
		padding: 5px 0 0;
		margin: 0 0 15px;
		text-align: left;
	}
	#formArea .smf-form .smf-item__col--controls {
		align-self: center;
	}
	#formArea .smf-action {
		flex-wrap: wrap;
	}
	/* 「確認画面へ」「送信する」の下に 25px（元の .submitArea の margin: 0 0 25px） */
	#formArea .smf-action .smf-button-control:not(:has([data-action="back"])) {
		margin-bottom: 25px;
	}
	/* 確認画面：「送信する」が上、「戻る」が下（元の column-reverse） */
	#formArea .smf-action:has([data-action="back"]) {
		flex-direction: column-reverse;
	}
	#formArea .smf-action:has([data-action="back"]) .smf-button-control {
		justify-content: center !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	#formArea .smf-action:has([data-action="back"]) .smf-button-control__control {
		margin-left: auto;
		margin-right: auto;
	}
}
