/* ============================================================
terms_modal.css — entry.htm「サービス利用規約モーダル」内
module_terms.htm（約款本文）専用スタイル
※ /terms/ ページ本体（terms.css）とは完全に独立したファイル
============================================================ */

/* ------------------------------------------------------------
モーダルレイアウト上書き：
ヘッダー・上部注意文・フッターは常時固定し、約款本文
（.terms-modal-scroll）だけを内部スクロールさせる。
.modal-dialog / .modal-body は他モーダルとも共有するクラスのため、
#termsModal に限定して上書きする。
------------------------------------------------------------ */
#termsModal .modal-dialog {
	display: flex;
	flex-direction: column;
	max-height: 90vh;
	overflow: hidden;
	/* ダイアログ全体としてはスクロールさせない */
}

#termsModal .modal-header {
	flex-shrink: 0;
}

#termsModal .modal-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 0;
	gap: 0;
	overflow: hidden;
	min-height: 0;
	/* flexアイテムを本文サイズ以上に縮小可能にし、内側スクロールを効かせる */
}

#termsModal .modal-notice-box {
	flex-shrink: 0;
	margin: 24px;
}

#termsModal .terms-modal-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
	min-height: 0;
}

#termsModal .modal-footer {
	flex-shrink: 0;
}


.terms-icon-green {
	color: var(--color-forest-600);
}

.text-danger-strong {
	color: #B91C1C;
}

/* ------------------------------------------------------------
利用規約本文用CSS
------------------------------------------------------------ */

/* 章見出しスタイル（第1章〜第10章、附則） */
.terms-chapter {
	margin-top: 32px;
	margin-bottom: 16px;
}

.terms-chapter:first-of-type {
	margin-top: 0;
}

.terms-chapter-title {
	font-family: var(--font-serif);
	font-size: 18px;
	font-weight: 700;
	color: var(--color-forest-dark);
	padding-left: 12px;
	border-left: 4px solid var(--color-forest-sub);
	margin: 0;
	line-height: 1.4;
}

@media (min-width: 768px) {
	.terms-chapter {
		margin-top: 40px;
		margin-bottom: 20px;
	}

	.terms-chapter-title {
		font-size: 20px;
	}
}

/* 各条文カード */
.terms-article {
	margin-bottom: 24px;
}

/* 条文ヘッダー */
.terms-article-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.terms-article-title {
	font-family: var(--font-serif);
	font-size: 18px;
	font-weight: 700;
	color: var(--color-forest-900);
	margin: 0;
}

/* 条文本文テキスト */
.terms-article-body {
	font-size: 15px;
	line-height: 160%;
	display: flex;
	flex-direction: column;
	gap: 12px;
	color: #374151;
}

@media (min-width: 768px) {
	.terms-article-body {
		font-size: 16px;
		padding-left: 20px;
	}
}

/* イロハ表示 */
.terms-list {
	margin-left: 30px;
}

/* テーブルスタイル（取消料テーブル・改定履歴テーブル） */
.terms-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 10px 0;
	border: 1px solid var(--color-earth-200);
	border-radius: 8px;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.5;
}

.terms-table th,
.terms-table td {
	padding: 10px 12px;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--color-earth-100);
	border-right: 1px solid var(--color-earth-100);
}

.terms-table th:last-child,
.terms-table td:last-child {
	border-right: none;
}

.terms-table tbody tr:last-child th,
.terms-table tbody tr:last-child td {
	border-bottom: none;
}

.terms-table thead th {
	background-color: var(--color-sand);
	color: var(--color-forest-900);
	font-weight: 700;
	white-space: nowrap;
	border-bottom: 1px solid var(--color-earth-200);
}

.terms-table tbody td {
	background-color: #FFFFFF;
	color: #374151;
}

.terms-table tbody tr:nth-child(even) td {
	background-color: rgba(247, 245, 240, 0.30);
}

@media (min-width: 768px) {
	.terms-table {
		font-size: 14px;
	}

	.terms-table th,
	.terms-table td {
		padding: 12px 16px;
	}
}