/* ============================================================
   Print Styles — 病痛經絡成方查詢系統
   ============================================================ */
@media print {

    /* Hide non-content elements */
    .top-nav,
    .search-panel,
    .status-bar,
    .tab-bar,
    .modal-overlay,
    .toast,
    #btnPrint {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
        font-size: 11pt;
    }

    .app-layout {
        display: block;
        margin: 0;
        height: auto;
    }

    .treatment-panel {
        display: block;
        overflow: visible;
    }

    .tab-content-area {
        overflow: visible;
        padding: 0;
    }

    /* Print header */
    .condition-title {
        font-size: 14pt;
        color: #1a1a1a;
        border-bottom: 2px solid #1a1a1a;
        margin-bottom: 12pt;
        padding-bottom: 6pt;
    }

    .condition-cat-badge {
        border: 1px solid #666;
        color: #333;
        background: transparent;
    }

    /* Table styles for print */
    .treat-table,
    .treat-table-single {
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
        page-break-inside: avoid;
        margin-bottom: 12pt;
    }

    .treat-table thead th,
    .treat-table-single thead th {
        background: #f0f0f0;
        color: #1a1a1a;
        border: 1pt solid #999;
        padding: 5pt 8pt;
        text-align: left;
        font-weight: bold;
    }

    .treat-table tbody td,
    .treat-table-single tbody td {
        border: 0.5pt solid #ccc;
        padding: 5pt 8pt;
        color: #111;
        vertical-align: top;
        white-space: pre-wrap;
        word-break: break-word;
    }

    .td-principle {
        font-weight: bold;
    }

    /* Page breaks */
    .treatment-table-wrap {
        page-break-inside: avoid;
    }

    .treatment-empty {
        display: none;
    }

    @page {
        margin: 15mm 12mm;
        size: A4;
    }
}