/* 九曜会 決済システム スタイル */

.kuyokai-matching {
	max-width: 480px;
	margin: 2em auto;
}

html body .kuyokai-matching .kuyokai-matching__intro {
	background: #f6f8fa !important;
	padding: 1.5em 1.7em !important;
	border-radius: 6px !important;
	margin: 0 0 2em !important;
	line-height: 1.8 !important;
	color: #333;
}

.kuyokai-matching__field {
	margin-bottom: 1.5em;
}

.kuyokai-matching__field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.6em;
}

.kuyokai-matching__field input {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	box-sizing: border-box;
}

/* テーマ側の input ルール (width:100%; display:block) を打ち消すため !important を併用 */
.kuyokai-matching__member-no {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 0.5em;
	flex-wrap: nowrap;
}

.kuyokai-matching__member-no input {
	width: 5em !important;
	display: inline-block !important;
	text-align: center;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.1em;
	flex: 0 0 auto;
}

.kuyokai-matching__hyphen {
	font-size: 1.2em;
	color: #555;
	user-select: none;
	flex: 0 0 auto;
}

.kuyokai-matching__hint {
	margin: 0.3em 0 0;
	color: #555;
	font-size: 0.85em;
}

/* 会員番号の確認方法（見出し + 封筒の説明画像） */
html body .kuyokai-matching .kuyokai-matching__guide {
	margin-top: 1.6em;
}

html body .kuyokai-matching .kuyokai-matching__guide-title {
	margin: 0 0 0.5em !important;
	font-weight: 600 !important;
	color: #1e6e3e !important;
	font-size: 0.95em !important;
}

html body .kuyokai-matching .kuyokai-matching__guide-img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 480px;
	border: 1px solid #e3e3e3;
	border-radius: 6px;
}

/* 名前入力欄の下の補足注記 */
html body .kuyokai-matching .kuyokai-matching__name-note {
	margin: 0.5em 0 0 !important;
	color: #555 !important;
	font-size: 0.85em !important;
	line-height: 1.7 !important;
}

.kuyokai-matching__field-error {
	margin: 0.3em 0 0;
	color: #b00;
	font-size: 0.9em;
	display: none;
}

.kuyokai-required {
	color: #c00;
}

.kuyokai-matching__submit {
	display: inline-block;
	background: #1e6e3e;
	color: #fff;
	border: 0;
	padding: 0.8em 2em;
	font-size: 1em;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.kuyokai-matching__submit:hover:not(:disabled) {
	background: #155929;
	box-shadow: 0 4px 8px rgba(30, 110, 62, 0.3);
}

.kuyokai-matching__submit:disabled {
	background: #a8c8b3;
	opacity: 0.7;
	cursor: not-allowed;
}

.kuyokai-matching__message {
	margin-top: 1em;
	padding: 0.8em;
	border-radius: 4px;
	min-height: 1em;
}

.kuyokai-matching__message.is-error {
	background: #fde7e7;
	color: #b00;
}

.kuyokai-complete {
	max-width: 480px;
	margin: 2em auto;
	text-align: center;
}

.kuyokai-maintenance {
	max-width: 600px;
	margin: 4em auto;
	text-align: center;
}

.kuyokai-payment__error {
	background: #fde7e7;
	color: #b00;
	padding: 1em;
	border-radius: 4px;
}

/* 決済ページ：CF7 の決済 submit ボタンを目立たせる
   テーマ jinr の汎用 button スタイルに勝つため、html body プレフィックス + !important で specificity を確実に上げる */
.kuyokai-payment {
	max-width: 720px;
	margin: 2em auto;
}

/* 決済ページ本文（固定ページ側で書かれる説明文）の装飾 */
.kuyokai-payment > h2,
.kuyokai-payment > h3 {
	margin: 1.8em 0 0.8em;
	padding-left: 0.6em;
	border-left: 4px solid #1e6e3e;
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.5;
}

.kuyokai-payment > p {
	line-height: 1.8;
	margin: 0 0 1.2em;
}

/* 引用ブロック（コールアウト用途） */
.kuyokai-payment blockquote {
	background: #f6f8fa;
	border-left: 4px solid #1e6e3e;
	padding: 1.2em 1.5em;
	margin: 1.5em 0;
	border-radius: 0 6px 6px 0;
	line-height: 1.8;
}

.kuyokai-payment blockquote p:last-child {
	margin-bottom: 0;
}

/* 表（金額のケース別ガイドに最適） */
.kuyokai-payment table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
}

.kuyokai-payment table th,
.kuyokai-payment table td {
	padding: 0.8em 1em;
	border: 1px solid #d0d7de;
	text-align: left;
	line-height: 1.7;
	vertical-align: top;
}

.kuyokai-payment table th {
	background: #1e6e3e;
	color: #fff;
	font-weight: 600;
}

.kuyokai-payment table tr:nth-child(even) td {
	background: #f6f8fa;
}

/* リスト：チェックマーク風 */
.kuyokai-payment ul {
	list-style: none;
	padding-left: 0;
	margin: 1em 0;
}

.kuyokai-payment ul li {
	position: relative;
	padding: 0.3em 0 0.3em 1.6em;
	line-height: 1.7;
}

.kuyokai-payment ul li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.3em;
	color: #1e6e3e;
	font-weight: 700;
}

/* 注意喚起用：強調された段落（クラス指定で使う） */
.kuyokai-payment .kuyokai-callout,
.kuyokai-payment p.kuyokai-callout {
	background: #fff8e1;
	border-left: 4px solid #d97706;
	padding: 1.2em 1.5em;
	margin: 1.5em 0;
	border-radius: 0 6px 6px 0;
	line-height: 1.8;
}

/* サイトのフッター色に合わせた深緑ベースのボタン */
html body .kuyokai-payment input[type="submit"].wpcf7-submit,
html body .kuyokai-payment button[type="submit"].wpcf7-submit,
html body .kuyokai-payment .wpcf7-form input[type="submit"],
html body .kuyokai-payment .wpcf7-form button[type="submit"] {
	display: inline-block !important;
	background: #1e6e3e !important;
	background-color: #1e6e3e !important;
	color: #fff !important;
	border: 0 !important;
	padding: 0.9em 2.5em !important;
	font-size: 1.05em !important;
	font-weight: 700 !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	box-shadow: 0 2px 4px rgba(30, 110, 62, 0.25) !important;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease !important;
	text-shadow: none !important;
}

html body .kuyokai-payment input[type="submit"].wpcf7-submit:hover,
html body .kuyokai-payment button[type="submit"].wpcf7-submit:hover,
html body .kuyokai-payment .wpcf7-form input[type="submit"]:hover,
html body .kuyokai-payment .wpcf7-form button[type="submit"]:hover {
	background: #155929 !important;
	background-color: #155929 !important;
	box-shadow: 0 6px 12px rgba(30, 110, 62, 0.4) !important;
	transform: translateY(-1px) !important;
}

html body .kuyokai-payment input[type="submit"].wpcf7-submit:active,
html body .kuyokai-payment button[type="submit"].wpcf7-submit:active,
html body .kuyokai-payment .wpcf7-form input[type="submit"]:active,
html body .kuyokai-payment .wpcf7-form button[type="submit"]:active {
	transform: translateY(0) !important;
	box-shadow: 0 2px 4px rgba(30, 110, 62, 0.25) !important;
}

html body .kuyokai-payment input[type="submit"].wpcf7-submit:disabled,
html body .kuyokai-payment input[type="submit"].wpcf7-submit[disabled],
html body .kuyokai-payment button[type="submit"].wpcf7-submit:disabled,
html body .kuyokai-payment button[type="submit"].wpcf7-submit[disabled],
html body .kuyokai-payment .wpcf7-form input[type="submit"]:disabled,
html body .kuyokai-payment .wpcf7-form button[type="submit"]:disabled {
	background: #a8c8b3 !important;
	background-color: #a8c8b3 !important;
	cursor: not-allowed !important;
	box-shadow: none !important;
	transform: none !important;
	opacity: 0.7 !important;
}

/* 「カード情報を入力する」はセカンダリ扱い（枠線のみ）で、メインの「決済する」と差をつける */
html body .kuyokai-payment #payjp_checkout_box {
	margin-bottom: 1.2em;
}

html body .kuyokai-payment #payjp_checkout_box input[type="button"] {
	display: inline-block !important;
	background: #fff !important;
	background-color: #fff !important;
	color: #1e6e3e !important;
	border: 2px solid #1e6e3e !important;
	padding: 0.55em 1.4em !important;
	font-size: 0.9em !important;
	font-weight: 600 !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	box-shadow: none !important;
	transition: background-color 0.2s ease, color 0.2s ease !important;
	text-shadow: none !important;
}

html body .kuyokai-payment #payjp_checkout_box input[type="button"]:hover {
	background: #f0f7f3 !important;
	background-color: #f0f7f3 !important;
}

html body .kuyokai-payment #payjp_checkout_box input[type="button"]:active {
	background: #e0eee6 !important;
	background-color: #e0eee6 !important;
}

/* 送信中のスピナーと余白 */
.kuyokai-payment .wpcf7-spinner {
	margin-left: 0.5em;
}

/* 金額・メールアドレスのフィールドも横幅を統一 */
.kuyokai-payment .wpcf7-form-control-wrap {
	display: block;
	margin-bottom: 1em;
}

.kuyokai-payment input[type="number"],
.kuyokai-payment input[type="email"] {
	max-width: 24em;
}

/* === 利用規約リンク === */
/* PAY.JP のカードボタン (#payjp_checkout_box) は既定でブロック要素。
   inline-block 化して「利用規約はこちら」リンクを右隣に並べる。 */
html body .kuyokai-payment #payjp_checkout_box {
	display: inline-block;
	vertical-align: middle;
}

html body .kuyokai-payment .kuyokai-terms-link {
	display: inline-block;
	margin-left: 1em;
	font-size: 0.95em;
	color: #2b7a4b;
	text-decoration: underline;
	cursor: pointer;
	vertical-align: middle;
}

html body .kuyokai-payment .kuyokai-terms-link:hover,
html body .kuyokai-payment .kuyokai-terms-link:focus {
	color: #1d5733;
	text-decoration: underline;
}

/* === 利用規約モーダル === */
.kuyokai-terms-modal[hidden] {
	display: none;
}

html body .kuyokai-terms-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
	box-sizing: border-box;
}

html body .kuyokai-terms-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

html body .kuyokai-terms-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 720px;
	max-height: 85vh;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

html body .kuyokai-terms-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1em 1.3em;
	border-bottom: 1px solid #e3e3e3;
}

html body .kuyokai-terms-modal__title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1.15em;
	line-height: 1.4;
	color: #222;
}

html body .kuyokai-terms-modal__close {
	flex: 0 0 auto;
	width: 2em;
	height: 2em;
	margin-left: 1em;
	padding: 0;
	font-size: 1.4em;
	line-height: 1;
	color: #555;
	background: transparent;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

html body .kuyokai-terms-modal__close:hover,
html body .kuyokai-terms-modal__close:focus {
	background: #f0f0f0;
	color: #000;
}

html body .kuyokai-terms-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 1.3em 1.5em;
	line-height: 1.8;
	color: #333;
	-webkit-overflow-scrolling: touch;
}

html body .kuyokai-terms-modal__body h1,
html body .kuyokai-terms-modal__body h2,
html body .kuyokai-terms-modal__body h3,
html body .kuyokai-terms-modal__body h4 {
	margin: 1.2em 0 0.5em;
	line-height: 1.5;
}

html body .kuyokai-terms-modal__body ol,
html body .kuyokai-terms-modal__body ul {
	padding-left: 1.5em;
}

html body .kuyokai-terms-modal__footer {
	flex: 0 0 auto;
	padding: 0.9em 1.3em;
	text-align: right;
	border-top: 1px solid #e3e3e3;
}

html body .kuyokai-terms-modal__close-btn {
	padding: 0.55em 1.6em;
	font-size: 1em;
	color: #fff;
	background: #06c755;
	background-color: #06c755;
	border: 0;
	border-radius: 5px;
	cursor: pointer;
}

html body .kuyokai-terms-modal__close-btn:hover,
html body .kuyokai-terms-modal__close-btn:focus {
	background: #05a948;
	background-color: #05a948;
}

/* モーダル表示中は背面スクロールを抑止 */
body.kuyokai-terms-open {
	overflow: hidden;
}
