/* 列印樣式 */
@media print {
    /* 確保列印頁面中的文字是彩色的 */
    body {
        color: black;
        background: white;
        /*visibility: hidden;*/
    }
    /* 強制所有圖片顯示為彩色 */
    img {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    /* 隱藏列印按鈕 */
    .printBtn {
        display: none;
    }
    /*隱藏不需要列印的區域（例如導航欄、banner 等）*/
    .fastBlock,
    .ebookBanner,
    .banner,
    .footerTop,
    .footerBottom,
    .menuBtn,
    .searchSpBox,
    .menuClose,
    .btnbox,
    .languageBox,
    .rightBtnBox, /* 右側快速選單 */
    .topBtn, /* 返回頂端按鈕 */
    .ranges, /* 包含logo和其他元素的區塊 */
    .headerTop, /* 頁面上方的導航選單 */
    .headerBottom, /* 頁面下方的選單 */
    .footer { /* 隱藏頁腳 */
        display: none !important;
    }
    /* 調整列印的內容樣式（例如，設置字體、邊距等） */
    .editContent {
        font-size: 0.875rem; /* 可以根據需求調整字體大小 */
        margin: 0; /* 去除多餘的邊距 */
        padding: 10px; /* 增加內邊距 */
        visibility: visible; /* 只顯示內容區域 */
    }

    main {
        margin-top: 0 !important; /* 確保沒有上邊距 */
        padding-top: 0 !important; /* 去除上邊距 */
    }
    /* 如果需要可以設定頁面邊界等 */
    @page {
        size: A4; /* 設置列印頁面為 A4 大小 */
        margin: 20mm;
    }
}

.editContent table {
    width: 100%;
    border-collapse: collapse; /* 避免雙線 */
}

.editContent table,
.editContent th,
.editContent td {
    border: 1px solid black; /* 加回邊框 */
}

.editContent {
    overflow-x: auto; /* 保底：避免完全撐爆 */
    word-wrap: break-word; /* 長單字強制換行 */
    word-break: break-all; /* 中英文都可斷行 */
}

    .editContent table {
        max-width: 100%;
        width: 100% !important; /* 保證不超出螢幕 */
        table-layout: fixed; /* 避免欄位撐爆 */
    }

    .editContent td,
    .editContent th {
        word-break: break-word;
        white-space: normal; /* 允許換行 */
    }

    .editContent img {
        max-width: 100%; /* 圖片不超過區塊 */
        height: auto; /* 等比例縮放 */
        display: block;
        margin: 0 auto; /* 圖片置中（可選） */
    }
/* 手機板針對 .editContent 的限制 */
@media screen and (max-width: 768px) {
    .editContent {
        overflow-x: auto; /* 保底：避免完全撐爆 */
        word-wrap: break-word; /* 長單字強制換行 */
        word-break: break-all; /* 中英文都可斷行 */
    }

        .editContent table {
            max-width: 100%;
            width: 100% !important; /* 保證不超出螢幕 */
            table-layout: fixed; /* 避免欄位撐爆 */
        }

        .editContent td,
        .editContent th {
            word-break: break-word;
            white-space: normal; /* 允許換行 */
        }

        .editContent img {
            max-width: 100%; /* 圖片不超過區塊 */
            height: auto; /* 等比例縮放 */
            display: block;
            margin: 0 auto; /* 圖片置中（可選） */
        }
}
