/* 납품대금 조정협의 신청서(직접신청/대행신청) 미리보기·출력.
   문서 본체는 Views/About/_DirectRequestPaper.cshtml, _AgencyRequestPaper.cshtml(원본 hwpx를 옮긴 것),
   팝업은 Views/About/_AdjustRequestPreviewModal.cshtml, 동작은 wwwroot/js/adjustRequestPreview.js. */

/* ---------- 문서(화면: 미리보기 / 인쇄 공통) ---------- */
.rq-paper {color: #000; font-family: '바탕', 'Batang', '함초롬바탕', 'HCR Batang', 'Noto Serif KR', serif; font-size: 10pt; line-height: 1.5;}
.rq-paper * {box-sizing: border-box;}
.rq-paper p {margin: 0; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;}

/* 화면에서는 A4 용지 한 장씩 따로 보이게 한다(인쇄에서는 아래 @media print가 용지 여백으로 대체) */
.rq-page {width: 210mm; min-height: 297mm; margin: 0 auto 16px; padding: 15mm 20mm; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .18);}

.rq-top {margin: 0;}
.rq-gap {height: 1.5em;}
.rq-note {margin-top: 3mm; font-size: 10pt;}

.rq-table {width: 100%; border-collapse: collapse; table-layout: fixed;}
.rq-table td {border: 0.25mm solid #000; padding: 1.2mm 2mm; vertical-align: middle; font-family: '돋움', 'Dotum', '맑은 고딕', 'Malgun Gothic', sans-serif; line-height: 1.5; overflow-wrap: anywhere;}
.rq-table tr:first-child td {font-family: '바탕', 'Batang', '함초롬바탕', 'HCR Batang', 'Noto Serif KR', serif;}
.rq-paper .rq-serif {font-family: '바탕', 'Batang', '함초롬바탕', 'HCR Batang', 'Noto Serif KR', serif;}
.rq-table tr:first-child td p {letter-spacing: 0.12em;}

.rq-table p.rq-c {text-align: center;}
.rq-table p.rq-r {text-align: right;}
.rq-table p.rq-l {text-align: left;}
.rq-table p.rq-d {text-align: justify; text-align-last: justify;}
.rq-table p.rq-b {font-weight: 700;}
.rq-table p.rq-serif {font-weight: 400;}
.rq-table p.rq-serif.rq-b {font-weight: 700;}

/* 세부내역표(9열)는 좁은 칸이 많아서, 원본처럼 한 줄에 들어가도록 칸 안 여백과 자간을 줄인다 */
.rq-table.rq-dense td {padding: 0.8mm 0.6mm; letter-spacing: -0.04em; overflow-wrap: break-word;}
.rq-table.rq-dense p {white-space: pre-wrap;}

.rq-chk {font-family: '돋움', 'Dotum', '맑은 고딕', sans-serif;}

/* ---------- 미리보기 팝업 ---------- */
.rq-modal {display: none; position: fixed; inset: 0; z-index: 99999; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55);}
.rq-modal.open {display: flex;}
.rq-modal-box {display: flex; flex-direction: column; width: 100%; max-width: 940px; height: 100%; max-height: 960px; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden;}
.rq-modal-header {display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; padding: 14px 20px; border-bottom: 1px solid #e5eaf2;}
.rq-modal-header h3 {margin: 0; font-size: 20px; font-weight: 600; color: #111d46;}
.rq-modal-close {width: 34px; height: 34px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: #5b6479; cursor: pointer;}
.rq-modal-body {flex: 1 1 auto; overflow: auto; padding: 20px 12px; background: #e9edf3;}
.rq-modal-footer {display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; padding: 12px 20px; border-top: 1px solid #e5eaf2; background: #fff;}
.rq-modal-footer .rq-modal-notice {margin: 0; font-size: 14px; color: #66718a;}
.rq-modal-actions {display: flex; gap: 10px; margin-left: auto;}
.rq-modal-btn {display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; min-height: 44px; padding: 0 22px; border: 1px solid #d8deea; border-radius: 6px; background: #fff; color: #18264d; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s;}
.rq-modal-btn:hover {background: #f4f7fb;}
.rq-modal-btn.primary {border-color: #0866f9; background: #0866f9; color: #fff;}
.rq-modal-btn.primary:hover {background: #0056dc;}
@media (max-width: 640px) {
	.rq-modal-footer {flex-direction: column; align-items: stretch;}
	.rq-modal-actions {margin-left: 0;}
	.rq-modal-btn {flex: 1; min-width: 0;}
}

/* ---------- 인쇄 ---------- */
@media print {
	@page {size: A4; margin: 15mm 20mm;}

	* {-webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;}
	html, body {background: #fff !important;}

	.rq-page {width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; background: none;}
	.rq-page + .rq-page {break-before: page; page-break-before: always;}
	.rq-table tr {break-inside: avoid; page-break-inside: avoid;}
}
