/* ============================================================
   빈칸 공통 인쇄 스타일 — A4 출력
   - .no-print      : 화면 전용 (인쇄 시 제거)
   - .print-area    : 인쇄 대상 영역 (이 영역만 인쇄)
   - .print-collapse: 인쇄 영역의 조상 래퍼 (인쇄 시 박스 제거)
   - .print-watermark: 무료 출력물 워터마크 (인쇄 시에만 노출)
   ============================================================ */

/* 워터마크는 화면에서는 항상 숨김 */
.print-watermark { display: none; }

@media print {
    @page { size: A4; margin: 12mm; }

    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 화면 전용 요소 (네비·푸터·입력 패널·버튼·광고·SEO 콘텐츠) 완전히 제거 */
    .no-print { display: none !important; }

    /* 화면 전체를 숨기고 인쇄 영역만 노출 — 조상 래퍼의 배경/장식까지 제거 */
    body * { visibility: hidden !important; }
    .print-area, .print-area * { visibility: visible !important; }

    /* 인쇄 영역의 조상 래퍼: 박스를 제거해 인쇄 영역이 페이지 전체 폭을 쓰게 함
       (display:contents → 패딩·배경·max-width·grid 레이아웃이 모두 사라짐) */
    .print-collapse { display: contents !important; }

    /* 인쇄 영역: 화면용 카드 장식 제거, 정상 흐름에서 전체 폭 사용 */
    .print-area {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        overflow: visible !important;
    }

    /* 배경색·테두리색을 그대로 인쇄 */
    .print-area, .print-area * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* 무료 출력물 워터마크 — 대각선 1줄 */
    .print-watermark {
        display: block !important;
        position: absolute;
        inset: 0;
        z-index: 50;
        pointer-events: none;
        overflow: hidden;
    }
    .print-watermark span {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-30deg);
        font-size: 60px;
        font-weight: 800;
        letter-spacing: 0.12em;
        white-space: nowrap;
        color: rgba(22, 163, 74, 0.10);
    }
}
