@charset "UTF-8";

/* ============================================================
 * printPageArea.css - printPageArea.js 전용 인쇄 스타일 (개발자 관리)
 *
 * ※ 이 파일은 디자인 파일이 아니라 기능 파일입니다.
 *    printPageArea.js 가 인쇄 시 붙이는 .print-mode / .print-area / .print-area-ancestor
 *    클래스에 반응하는 규칙만 들어 있으며, JS 와 짝을 이루어 동작합니다.
 *    퍼블리싱 작업 시 이 파일은 수정하지 말고, 인쇄물 디자인은 print.css 등 별도 파일에서 작업해 주세요.
 *
 * 영종구청 홈페이지 /main/lib/css/print.css 를 이식용으로 일반화한 것.
 * include/header.php 에서 항상 로드됨 (규칙이 전부 @media print 안에 있어 화면에는 영향 없음).
 * ============================================================ */
@media print {

	/* 기본 페이지 설정 (원본과 동일) */
	body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	@page { size: A4; margin: 0; }   /* 여백이 필요하면 margin: 10mm 등으로 조정 */

	/* ------------------------------------------------------------
	 * 1) 범용 규칙 - 프로젝트 구조와 무관하게 동작
	 *    printPageArea.js 가 붙여주는 클래스를 기준으로
	 *    "인쇄 대상(.print-area) → body 까지의 경로" 를 제외한 형제 요소를 모두 숨긴다.
	 * ------------------------------------------------------------ */
	body.print-mode > *:not(.print-area-ancestor):not(.print-area),
	body.print-mode .print-area-ancestor > *:not(.print-area-ancestor):not(.print-area) { display: none !important; }

	/* 조상 요소의 장식(::before/::after) 및 레이아웃 초기화 */
	body.print-mode .print-area-ancestor::before,
	body.print-mode .print-area-ancestor::after { display: none !important; }
	body.print-mode .print-area-ancestor {
		display: block !important;
		position: static !important;
		float: none !important;
		width: auto !important;
		max-width: none !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		background: #fff !important;
		box-shadow: none !important;
		overflow: visible !important;
	}
	body.print-mode .print-area {
		position: static !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		overflow: visible !important;
	}

	/* 인쇄 버튼 자체는 항상 숨김 */
	body.print-mode .sub_page_print_btn,
	body.print-mode .cm_btn_print,
	body.print-mode .print-hide { display: none !important; }

	/* ------------------------------------------------------------
	 * 2) 프로젝트별 추가 숨김 (선택)
	 *    인쇄 영역 안쪽에 있어서 1) 규칙으로 숨겨지지 않는 요소는
	 *    여기에 직접 나열하거나, 해당 요소에 class="print-hide" 를 부여한다.
	 *    아래는 원본(영종구청) 프로젝트에서 사용하던 목록 - 이식 대상에 맞게 수정/삭제.
	 * ------------------------------------------------------------ */
	body.print-mode #skipNavi,
	body.print-mode .top_banner_area,
	body.print-mode .cm_masthead,
	body.print-mode #header,
	body.print-mode #footer,
	body.print-mode .top_visual,
	body.print-mode .sub_page_head,
	body.print-mode .cm_tab,
	body.print-mode .cm_content_satisfaction { display: none !important; }
}
