/* 메디케이스 인쇄용 스타일
 * detail 페이지를 PDF·인쇄로 보관하는 사용자 대상.
 * 광고·내비·푸터·관련 사례 블록 등 부수 요소를 숨기고 본문에 집중.
 */
@media print {

/* ─── 색 단순화 (잉크 절약 + 가독성) ─── */
*, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
body { font-size: 11pt; line-height: 1.55; color: #000; }

/* ─── 숨김 처리 ─── */
.medicase-skip-link,
nav.navbar,
.breadcrumb,
footer,
.medicase-suggest-box,
.summary-card,
.admin-agent-card,
button,
.btn,
form,
ins.adsbygoogle,
.pagination,
.fas, .far, .fab,    /* 아이콘 (인쇄에 불필요) */
a[href^="#"]::after, /* in-page anchor 제거 */
.list-group-item .badge { display: none !important; }

/* "관련 사례" 블록 자체는 유지하되, 카드 외형만 단순화 */
nav[aria-label="페이지 네비게이션"],
nav.d-flex { display: none !important; }

/* ─── 본문 강조 ─── */
.container { max-width: 100% !important; padding: 0 !important; }
main, .container > * { width: 100% !important; }

.card {
    border: 1px solid #999 !important;
    border-radius: 0 !important;
    margin-bottom: 0.5cm !important;
    page-break-inside: avoid;
}
.card-header { background: #f5f5f5 !important; border-bottom: 1px solid #999 !important; padding: 0.3cm !important; font-weight: 600; }
.card-body { padding: 0.3cm !important; }

h1, h2, h3, h4, h5, h6 { page-break-after: avoid; color: #000 !important; }
h1 { font-size: 18pt !important; margin-bottom: 0.5cm; }
h2 { font-size: 14pt !important; }
h3 { font-size: 12pt !important; }

/* ─── 링크 URL 표시 (외부 링크만, 내부는 생략) ─── */
a[href^="http"]:not([href*="law.hospitalk.net"])::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555 !important;
    word-break: break-all;
}

/* ─── 표 ─── */
table { width: 100%; border-collapse: collapse; page-break-inside: avoid; }
th, td { border: 1px solid #999 !important; padding: 0.15cm !important; }
thead { background: #f0f0f0 !important; }

/* ─── 페이지 구분 힌트 ─── */
.detail-content { orphans: 3; widows: 3; }

/* 인쇄 시 페이지 머리에 출처 표기 */
@page { margin: 1.5cm 1.2cm; }

}
