/* css/print.css
 * 打印样式（2026-11-06 方案书 02）
 * ============================================================================
 * 场景：家长把查询结果打印/存 PDF 带下线讨论。
 * 只做一件事——把结果表完整、可溯源地印出来：
 *   1) 去掉顶栏、底部 Tab、抽屉、浮窗、查询表单、Demo 预览等运营/交互元素；
 *   2) 解除 .table-responsive 的滚动容器限制（否则只会印出当前滚动区域那一屏）；
 *   3) 12 列需要横向 A4，表头跨页重复，组行与专业行不被拆散；
 *   4) 页尾补一行数据版本 + 打印日期，纸面脱离网站后仍能溯源。
 * 只在首页 / 招生计划页引用，不动其它页面。
 * ========================================================================== */

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

    /* ---- 交互／运营元素一律不打印 ---- */
    .print-hide,          /* 查询条件整卡（index.php / plan.php 上标了 print-hide） */
    .main-topbar,
    .bottom-tab-bar,
    .sd-mask,
    .sd-drawer,
    #sdAboutMask,
    .report-banner,
    #demoArea,
    #queryForm,
    #errorAlert,
    #loading,
    .gaokao-scroll-hint,
    .nb-wrap,
    #guideOverlay,
    #noticeModal,
    .modal-backdrop {
        display: none !important;
    }

    /* ---- 表格容器解锁：滚动条里的表必须整张印出来 ---- */
    .table-responsive {
        overflow: visible !important;
        max-height: none !important;
    }

    /* sticky 在纸面上无意义，反而会叠影 */
    .fixed-header,
    .fixed-column,
    thead th.fixed-column {
        position: static !important;
        box-shadow: none !important;
    }

    .fixed-column::after {
        display: none !important;
    }

    table {
        font-size: 9pt;
        width: 100% !important;
    }

    /* 跨页时重复表头；组行与它的专业行不要被劈成两页 */
    thead {
        display: table-header-group;
    }

    tr,
    .group-row {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* 组行的浅蓝底色打印出来太淡，加一条分隔线保证组间可辨 */
    .table .group-row td {
        border-top: 1px solid #adb5bd;
    }

    /* ---- 纸面溯源行 ---- */
    .print-only {
        display: block !important;
        margin-top: 8mm;
        padding-top: 3mm;
        border-top: 1px solid #adb5bd;
        font-size: 8pt;
        color: #495057;
    }
}

/* 屏幕上不显示打印专用块（配合 index.php / plan.php 里的 .print-only 元素） */
.print-only {
    display: none;
}
