/**
 * GG RESERVE フロント（MTS .content-form / テーマ overwrite 相当の見た目）
 * マークアップ: dl > dt + dd（MTS table > th + td 相当）
 */

/* --- ベース（mtssb-front.css .content-form） --- */
.content-form.ggr-reserve-form {
	margin-bottom: 1rem;
	margin-top: 4rem;
}

.content-form.ggr-reserve-form .form-message {
	background-color: #ffffe0;
	border: 1px solid #e6db55;
	margin-bottom: 1rem;
	padding: 0.5rem;
	width: 99%;
}

.content-form.ggr-reserve-form .form-message.error {
	background-color: #ffebe8;
	border: 1px solid #f08080;
}

.content-form.ggr-reserve-form fieldset {
	border: 1px solid #dddddd;
	padding: 10px 0 0 10px;
	margin: 0 0 1.5rem 0;
	width: 98%;
}

.content-form.ggr-reserve-form legend {
	font-size: 1.1rem;
	font-weight: bold;
	padding: 0 5px;
}

.content-form.ggr-reserve-form .ggr-attendee-count-error {
	margin: 0 0 0.75rem;
	color: red;
}

.content-form.ggr-reserve-form .ggr-form-dd--meta .ggr-confirm-value {
	font-weight: 400;
}

.content-form.ggr-reserve-form .ggr-form-required-note {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
}

/* --- フォーム行（MTS table: th 30% / td、余白は gap ではなく dt/dd の padding） --- */
.content-form.ggr-reserve-form dl.ggr-form-dl {
	display: flex;
	flex-wrap: wrap;
	width: 99%;
	margin: 0 0 5px 0;
	padding: 0;
	align-items: stretch;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dt.ggr-form-dt,
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd {
	margin: 0;
	padding: 10px;
	box-sizing: border-box;
	vertical-align: middle;
	border-top: none;
	border-right: 1px solid #dddddd;
	border-bottom: 1px solid #dddddd;
	border-left: none;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dt.ggr-form-dt {
	flex: 0 0 30%;
	width: 30%;
	max-width: 30%;
	font-size: 1rem;
	line-height: 2.2rem;
	text-align: left;
	vertical-align: top;
	font-weight: 400;
	white-space: nowrap;
	background: #f2f5f8;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dt.ggr-form-dt label {
	font-weight: 400;
	cursor: pointer;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd {
	flex: 0 0 70%;
	width: 70%;
	max-width: 70%;
	font-size: 0.9rem;
	min-height: 2.2rem;
}

/* テーマ overwrite: .c-seminar-block__item dl */
.c-seminar-block__item .content-form.ggr-reserve-form dl.ggr-form-dl {
	display: flex;
	flex-wrap: wrap;
	margin-top: 0;
}

.c-seminar-block__item .content-form.ggr-reserve-form dl.ggr-form-dl > dt.ggr-form-dt {
	flex: 0 0 30%;
	flex-shrink: 1;
	width: 30%;
	max-width: 30%;
	font-weight: 400;
	text-align: left;
	white-space: nowrap;
	background: #f2f5f8;
}

.c-seminar-block__item .content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd {
	flex: 0 0 70%;
	width: 70%;
	max-width: 70%;
}

/* --- 入力（dd 内は幅いっぱいに揃える） --- */
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd select,
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 3px;
	margin-bottom: 3px;
	font-size: 1rem;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd select {
	padding: 5px 15px 5px 5px;
	background-position: right 5px center;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .content-text.small,
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .content-text.medium,
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .content-text.fat {
	width: 100%;
	max-width: 100%;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .input-number {
	float: none;
	width: 100%;
	margin-right: 0;
	text-align: left;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .input-number select {
	width: 100%;
}

/* 参加人数（attendees 等）のみコンパクト + 単位「人」 */
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .ggr-attendee-count-select {
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0.35em;
	width: auto;
	max-width: 100%;
	text-align: left;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .ggr-attendee-count-select select,
.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .ggr-attendee-count-select .content-text.small {
	display: inline-block;
	width: auto;
	min-width: 4.5em;
	max-width: 8em;
	flex: 0 0 auto;
}

.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd .ggr-attendee-count-select__unit {
	flex: 0 0 auto;
	font-size: 1rem;
	line-height: 1.5;
	white-space: nowrap;
}

.content-form.ggr-reserve-form .error-message {
	clear: both;
	color: red;
}

.content-form.ggr-reserve-form .required {
	color: red;
}

.content-form.ggr-reserve-form label.booking-form-radio {
	margin-right: 0.4rem;
}

.content-form.ggr-reserve-form label.booking-form-radio input {
	margin-right: 0.15rem;
}

/* --- 確認ボタン上・確認画面（テーマ overwrite / MTS） --- */
.content-form.ggr-reserve-form .booking-notice {
	text-align: center;
	font-size: 1.2rem;
	font-weight: bold;
	margin-bottom: 0 !important;
}

.content-form.ggr-reserve-form .booking-confirm-notice {
	color: #cc0000;
	font-weight: bold;
	text-align: left;
	margin-bottom: 15px;
	font-size: 16px;
}

.content-form.ggr-reserve-form #action-button {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	margin: 3rem 0;
}

/* 個人情報保護（入力画面のみ） */
.content-form.ggr-reserve-form .ggr-reserve-privacy {
	margin-top: 1.5rem;
}

.content-form.ggr-reserve-form .ggr-privacy-error {
	margin-bottom: 0.75rem;
	color: red;
}

.content-form.ggr-reserve-form .ggr-privacy-agree-label {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	cursor: pointer;
}

.content-form.ggr-reserve-form .ggr-privacy-agree-label input[type="checkbox"] {
	width: 1.35rem;
	height: 1.35rem;
	margin: 0;
	flex-shrink: 0;
	accent-color: #145baf;
	cursor: pointer;
}

.content-form.ggr-reserve-form .ggr-privacy-agree-label__text {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.5;
}

.content-form.ggr-reserve-form.is-confirm .ggr-reserve-privacy,
.content-form.ggr-reserve-form.is-complete .ggr-reserve-privacy {
	display: none;
}

.content-form.ggr-reserve-form #action-button button[type="submit"].ggr-button-confirm:disabled {
	background: #a8adb6 !important;
	color: #fff !important;
	cursor: not-allowed;
	opacity: 0.92;
	box-shadow: none;
	pointer-events: none;
}

/* 送信ボタン（テーマ .content-form button[type="submit"] 相当） */
.content-form.ggr-reserve-form #action-button button[type="submit"].ggr-button-confirm,
.content-form.ggr-reserve-form #action-button button[type="submit"].ggr-button-submit {
	width: 100%;
	max-width: 26rem;
	position: relative;
	outline: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	text-decoration: none;
	background: linear-gradient(to right, #145baf, #607fce);
	padding: 1.3333333333rem 3.2rem;
	font-size: 1rem;
	line-height: 1.5;
	font-weight: 700;
	transition: all 0.3s ease;
	border-radius: 666.6rem;
	border: none;
	margin-top: 0;
	cursor: pointer;
}

.content-form.ggr-reserve-form #action-button button[type="submit"].ggr-button-back {
	margin-top: 0;
	background: #fff;
	border: 1px solid #145baf;
	color: #145baf;
	text-decoration: none;
	cursor: pointer;
	font-size: 1.0625rem;
	font-weight: 600;
	width: 100%;
	max-width: 26rem;
	padding: 1rem 1.75rem;
	border-radius: 666.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.content-form.ggr-reserve-form .ggr-confirm-value {
	line-height: 1.6;
	display: inline-block;
	padding-top: 0.35rem;
}

/* --- 完了画面（l-main 直下に section を出す） --- */
body.ggr-complete-step .l-page-header,
body.ggr-complete-step .c-breadcrumb {
	display: none;
}

body.ggr-complete-step.ggr-reserve-page .l-main {
	padding: 0;
}

p.ggr-complete-booking-id {
	text-align: center;
	margin: 0;
	padding: 0 1rem 2rem;
	font-size: 1rem;
}

.content-form.ggr-reserve-form .ggr-booking-id-notice {
	text-align: center;
	margin: 0.5rem 0 1rem;
	font-size: 1rem;
}

/* --- 参加者情報 --- */
.content-form.ggr-reserve-form .ggr-participants-fieldset {
	margin-top: 0.5rem;
}

.content-form.ggr-reserve-form .ggr-participant-row {
	margin: 0 0 1rem;
	padding: 0.75rem 0 0;
	border-top: 1px dashed #ddd;
}

.content-form.ggr-reserve-form .ggr-participant-row:first-child {
	border-top: none;
	padding-top: 0;
}

.content-form.ggr-reserve-form .ggr-participant-row__title {
	font-weight: bold;
	margin: 0.5rem 0;
	font-size: 1rem;
}

.content-form.ggr-reserve-form .ggr-participant-row dl.ggr-form-dl {
	margin-top: 0.25rem;
}

.content-form.ggr-reserve-form .ggr-participants-note {
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
}

.content-form.ggr-reserve-form .ggr-participants-unconfigured {
	color: #b45309;
}

/* --- 説明会ブロック内レイアウト --- */
.c-seminar-block .ggr-session-section-heading {
	margin-bottom: 0;
}

.c-seminar-block .ggr-session-section-heading + .ggr-session-booking-item,
.c-seminar-block .ggr-session-section-heading + .ggr-session-empty-divider {
	margin-top: 1rem;
}

.c-seminar-block .ggr-session-booking-item {
	margin-bottom: 2rem;
}

.ggr-session-empty-divider {
	margin: 1.5rem 0;
	border: 0;
	border-top: 1px solid #ddd;
}

.ggr-session-empty-notice {
	margin: 0 0 1.5rem;
}

.ggr-reception-notice {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	background: #f5f5f5;
	border-left: 4px solid #3784c5;
}

.ggr-external-apply,
.ggr-apply-button {
	margin: 1rem 0;
	text-align: center;
}

.ggr-back-to-session {
	margin: 0 0 1.5rem;
}

.ggr-back-to-session a {
	text-decoration: none;
	color: #145baf;
}

.ggr-reserve-standalone .c-seminar-block {
	margin-top: 1.5rem;
}

.ggr-reserve-standalone .content-form.ggr-reserve-form {
	margin-top: 1.5rem;
}

@media screen and (max-width: 749px) {
	.content-form.ggr-reserve-form dl.ggr-form-dl > dt.ggr-form-dt,
	.c-seminar-block__item .content-form.ggr-reserve-form dl.ggr-form-dl > dt.ggr-form-dt {
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
		text-align: left;
		border-left: none;
		line-height: 1.5;
		padding: 10px;
	}

	.content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd,
	.c-seminar-block__item .content-form.ggr-reserve-form dl.ggr-form-dl > dd.ggr-form-dd {
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
		border-left: none;
		padding: 10px;
		margin-bottom: 5px;
	}

	.content-form.ggr-reserve-form #action-button button[type="submit"].ggr-button-confirm,
	.content-form.ggr-reserve-form #action-button button[type="submit"].ggr-button-submit,
	.content-form.ggr-reserve-form #action-button button[type="submit"].ggr-button-back {
		max-width: 100%;
	}
}

/* ------------------------------------------------------------------
 * c-forms 版（入力・確認画面）
 * ラッパから content-form を外しているため、上の .content-form 系は当たらない。
 * ------------------------------------------------------------------ */
.ggr-reserve-form--cforms .c-forms__submit .ggr-button-confirm:disabled {
	background: #a8adb6 !important;
	color: #fff !important;
	cursor: not-allowed;
	opacity: 0.92;
	box-shadow: none;
	pointer-events: none;
}

/* 確認画面: 「申し込む」（幅100%）の下に置く「入力に戻る」（自動幅）の間隔 */
.ggr-reserve-form--cforms.is-confirm .c-forms__submit .ggr-button-back {
	margin-top: 1rem;
}

/* 入力欄の下に出す補足（c-forms__note は下マージン前提なので上下を入れ替える） */
.ggr-reserve-form--cforms .c-forms__note.ggr-form-note-after {
	margin-top: 0.75rem;
	margin-bottom: 0;
}

.ggr-reserve-form--cforms .c-forms__note.ggr-form-note-after a {
	text-decoration: underline;
}
