html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans JP', sans-serif; }
:root {
    --hojinkai-blue: #2F80ED;
    --hojinkai-blue-dark: #1C60B3;
}
.nolink {
    pointer-events: none;
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    height: 300px;
    max-height: 40vh;
}
/* 動画コンテナのスタイル調整 */
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* タブのアクティブスタイル */
.search-tab-active {
    background-color: white;
    color: var(--hojinkai-blue);
    border-top: 2px solid var(--hojinkai-blue);
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid white; /* 下線を消してコンテンツと一体化 */
    position: relative;
    z-index: 10;
    font-weight: 700;
}
.search-tab-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid transparent;
    border-bottom: 1px solid #e5e7eb;
}
.search-tab-inactive:hover {
    background-color: #e5e7eb;
}

.single h2 {
    margin-top: 32px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

.single h3 {
    margin-top: 16px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

.single p {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.8;
}

.single a {
    margin-top: 16px;
    color: #2F80ED;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.8;
}

.single a.is-pdf::after {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-left: 6px;
    background-image: url(../images/content_ico_pdf.gif);
    background-size: contain;
    background-repeat: no-repeat;
}

/* 印刷用スタイル */
@media print {
	@page { 
		size: A4;
		margin: 10mm;
	}
	body {
		background: white;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

/* デフォルト: ヘッダー、フッター、メイン、隠れたモーダルは非表示 */
	header, footer, main,
    .modal-head {
		display: none !important; } 

/* --- モーダル印刷用スタイル --- */
	#modal-container {
		position: absolute !important;
		top: 0 !important;
		left: 0 !important;
		background: white !important;
		width: 100% !important;
		height: auto !important;
		display: block !important;
		z-index: 9999; padding: 0 !important;
		overflow: visible !important;
	}
	#modal-content {
		box-shadow: none !important;
		width: 100% !important;
		max-width: 100% !important;
		max-height: none !important;
		border: none !important;
		padding: 0 !important;
		margin: 0 !important;
		overflow: visible !important;
		transform: none !important;
	}
	/* ボタン類を非表示 */
	#modal-close, .modal-header-buttons {
		display: none !important;
	}

	/* A4 1枚に収めるためのコンテンツ調整 */
	.modal-print-layout {
		font-size: 9pt;
		line-height: 1.4;
		width: 100%;
	}
	.modal-print-layout h3 {
		font-size: 14pt;
		margin-bottom: 10px;
		text-align: center;
		border-bottom: 2px solid #000;
		padding-bottom: 5px;
	}
	.modal-print-layout table {
		width: 100%;
		border-collapse: collapse;
		margin-bottom: 10px;
		table-layout: fixed;
	}
	.modal-print-layout th, .modal-print-layout td {
		border: 1px solid #666;
		padding: 4px 6px;
		text-align: left;
		vertical-align: top;
		word-wrap: break-word;
	}
	.modal-print-layout th {
		background-color: #f0f0f0 !important;
		width: 18%;
		font-weight: bold;
	}
	/* 長文テキストの縮小処理 */
	.long-text {
		font-size: 8.5pt;
	}
	/* ページ分割禁止 */
	.modal-print-layout {
		page-break-inside: avoid;
	}

    /* --- 検索結果一覧印刷モード (body.print-search-mode) --- */
    body.print-search-mode main {
        display: block !important;
    }
    body.print-search-mode header,
    body.print-search-mode footer,
    body.print-search-mode section:not(#activities),
    body.print-search-mode #modal-container,
    body.print-search-mode #search-filters,
    body.print-search-mode .mt-12 > div.flex /* タブ */
    {
            display: none !important;
    }

    body.print-search-mode #activities {
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    body.print-search-mode #activities h2 {
        display: none !important; /* セクションタイトル非表示 */
    }

    /* 検索結果エリア内の操作コントロールを隠す */
    body.print-search-mode #print-results-button,
    body.print-search-mode #items-per-page,
    body.print-search-mode label[for="items-per-page"],
    body.print-search-mode nav[aria-label="Pagination"] {
            display: none !important;
    }
    
    body.print-search-mode #search-results-grid {
        margin-top: 20px;
    }

    /* --- モーダル印刷モード --- */
    body.print-modal-mode header,
    body.print-modal-mode footer,
    body.print-modal-mode main,
    body.print-modal-mode section,
    body.print-modal-mode #activities,
    body.print-modal-mode #search-filters {
        display: none !important;
    }

    /* モーダルだけ表示 */
    body.print-modal-mode #modal-container {
        position: static !important;
        background: none !important;
        display: block !important;
    }

    /* 黒背景消す */
    body.print-modal-mode #modal-container::before {
        display: none !important;
    }

    /* 中身だけ広げる */
    body.print-modal-mode #modal-container > div {
        max-width: 100% !important;
        max-height: none !important;
        box-shadow: none !important;
    }
}

#modal-print-button {
    position: absolute;
    right: 15%;
}
