﻿/* =========================
表頭整體
========================= */
.disc-table-head {
    background-color: #f0b603;
}

/* =========================
表頭 th
========================= */
.disc-table-head th {
    background-color: #f0b603 !important;
    color: #35435c !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    padding: 12px 10px !important;
    text-align: left;
/*    border-bottom: 2px solid #d6a100;*/
    white-space: nowrap;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

/* 第一個 header 加左圓角 */
.disc-table-head th:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

/* 最後一個 header 加右圓角 */
.disc-table-head th:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

#discTable_QueryResults {
    table-layout: fixed;
    width: 100%;
}

    /* 欄位寬度 */
    #discTable_QueryResults .col-org {
        width: 16.66667%;
    }

    #discTable_QueryResults .col-case {
        width: 16.66667%;
    }

    #discTable_QueryResults .col-person {
        width: 8.33333%;
    }

    #discTable_QueryResults .col-main {
        width: 25%;
    }

    #discTable_QueryResults .col-status {
        width: 8.33333%;
    }

    #discTable_QueryResults .col-date {
        width: 16.66667%;
    }

    #discTable_QueryResults .col-file {
        width: 8.33333%;
    }


/* =========================
hover（可選）
========================= */
#discTable_QueryResults tr:hover td {
    background-color: #f0f0f0;
}

/* =========================
tbody 基本樣式
========================= */
#discTable_QueryResults td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.875rem;
    color: #333;
    border-left: none !important;
    border-right: none !important;
    border-top: 0px solid #ddd;
    vertical-align: middle; /* 垂直置中*/
}

#discTable_QueryResults tbody tr:first-child td {
    border-top: none !important;
}

/* 手機版：七欄要塞進 390px，標題允許換行、縮小字級與內距（舊站 SearchDisciplineResult.vue 手機版同樣是縮字級） */
@media only screen and (max-width: 48rem) {
    .disc-table-head th {
        white-space: normal;
        padding: 8px 4px !important;
        font-size: 0.75rem !important;
        line-height: 1.25rem;
    }

    #discTable_QueryResults td {
        padding: 8px 4px;
        font-size: 0.75rem;
        line-height: 1.25rem;
        word-break: break-word;
    }

    /* 明細頁的標籤欄是 bootstrap 的 col-2（16.67%），390px 上只剩 60px，「懲戒機關」「被付懲戒人」都會折成兩行；
       手機版改成 25% / 75% 一組 */
    .CertData .discInfo .disc-row .disc-col.col-2 {
        width: 25%;
    }

    .CertData .discInfo .disc-row .disc-col.col-10 {
        width: 75%;
    }

    /* 搜尋防呆訊息框：舊站 .el-message-box { width: 80% } */
    .message-box {
        width: 90%;
        max-width: 420px;
        padding: 40px 15px 10px;
    }
}


/* ===== 詳細頁 css ===== */
.fullWidth {
    width: 100%;
}

/* ===== 工具按鈕容器 ===== */
.toolButtons {
    position: relative;
    top: 70px;
    font-weight: 700;
    text-align: right;
    z-index: 100;
}

/* 讓兩個按鈕水平排列 */
.toolButtons > div {
    display: inline-flex;
    gap: 12px; /* 兩個按鈕間距 */
    align-items: center;
}

/* download 跟 print 共用按鈕外觀（延用 print 的設計） */
.toolButtons .download,
.toolButtons .print {
    position: relative;
    width: 20px;
    height: 20px;
    background-color: #f0b603;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    left: -10px;
}

/* icon 大小統一 */
.toolButtons .download_icon,
.toolButtons .printer_icon {
    width: 20px;
    height: 20px;
}

/* hover（可選） */
.toolButtons .download:hover,
.toolButtons .print:hover {
    opacity: 0.85;
}

@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none) {
    .print_isNormal {
        right: 150px;
    }
    .download_isNormal {
        right: 150px;
    }
}

img {
    overflow-clip-margin: content-box;
    overflow: clip;
}

.discTitle {
    height: 100%;
    position: relative;
    top: -45px;
    margin: 0 auto;
}
.PreviousPage, .print {
    padding: 5px 15px;
    font-size: 1.125rem !important;
    line-height: 1.25rem;
    background-color: #f0b603;
}

.PreviousPage, .download {
    padding: 5px 15px;
    font-size: 1.125rem !important;
    line-height: 1.25rem;
    background-color: #f0b603;
}

.PreviousPage {
    cursor: pointer;
    color: #35435c;
    border-radius: 22px 22px 0 0;
}
.discTitle .el-menu--horizontal .el-menu-item.is-active {
    width: 68%;
    background-color: #fff;
    border-bottom: 2px solid #f0b603 !important;
    margin: 0 15% 0 14%;
}
.discTitle .el-menu--horizontal .el-menu-item {
    cursor: unset !important;
    border-bottom: 2px solid #f0b603 !important;
    background-color: #f8f8f8;
}
.discTitle .el-menu-item {
    width: 70%;
    height: 90px !important;
    font-size: 1.25rem;
    letter-spacing: 0;
    line-height: 5.625rem !important;
    font-weight: 700;
}
/* ========================== */



/* ===== 詳細頁主要內容 ===== */
/*.CertData {
    width: 100%;
    height: 100%;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}
    .CertData .discInfo {
        padding: 24px;
        background-color: #fff;
        -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
        box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    }
        .CertData .discInfo .el-row {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
        }
        .CertData .discInfo .el-col {
            box-sizing: border-box !important;
        }
            .CertData .discInfo .el-row .el-col:nth-child(odd) {
                font-weight: 700;
                color: #172133;
            }

            .CertData .discInfo .el-row .el-col:first-child {
                padding: 12px 0 12px 0;
            }

            .CertData .discInfo .el-row .el-col {
                padding: 16px 0 16px 0;
                border-bottom: 1px solid #e3e3e3;
            }
            .CertData .discInfo .el-row .el-col-24 {
                width: 100%;
            }
            .CertData .discInfo .el-row .el-col-20 {
                width: 83.3333%;
            }
            .CertData .discInfo .el-row .el-col-12 {
                width: 50%;
            }
            .CertData .discInfo .el-row .el-col-10 {
                width: 41.6667%;
            }
            .CertData .discInfo .el-row .el-col-8 {
                width: 33.3333%;
            }
            .CertData .discInfo .el-row .el-col-6 {
                width: 25%;
            }
            .CertData .discInfo .el-row .el-col-4 {
                width: 16.6667%;
            }
            .CertData .discInfo .el-row .el-col-2 {
                width: 8.3333%;
            }
                .CertData .discInfo .el-row .el-col:first-child span {
                    font-size: 1.125rem;
                }

                .CertData .discInfo .el-row .el-col span {
                    float: left;
                    font-size: 1rem;
                    line-height: 1.5rem;
                }*/
/*@media only screen and (max-width: 47.9375rem) {
    .CertData .discInfo .el-row .el-col-xs-20 {
        width: 83.3333%;
    }
}

@media only screen and (min-width: 768px) {
    .CertData .discInfo .el-row .el-col-sm-8 {
        width: 33.33333%;
    }
    .CertData .discInfo .el-row .el-col-sm-20 {
        width: 83.3333%;
    }
}*/

/*@media only screen and (min-width: 992px) {
    .CertData .discInfo .el-row .el-col-md-8 {
        width: 33.33333%;
    }
    .CertData .discInfo .el-row .el-col-md-20 {
        width: 83.3333%;
    }
}*/
/*@media only screen and (min-width: 768px) {
    .CertData .el-col-sm-4 {
        width: 16.66667%;
    }
}
@media only screen and (min-width: 992px) {
    .CertData .el-col-md-3 {
        width: 12.5%;
    }*/
}
/*.el-col-20 {
    width: 83.33333%;
}*/
/*@media only screen and (min-width: 768px) {
    .el-col-sm-20 {
        width: 83.33333%;
    }
}
@media only screen and (min-width: 992px) {
    .el-col-md-21 {
        width: 86.5%;
    }*/
}
/*.CertData .discInfo .el-row .el-col span {
    float: left;
    font-size: 1rem;
    line-height: 1.5rem;
}*/
/*@media only screen and (min-width: 768px) {
    .CertData .el-col-sm-6 {
        width: 25%;
    }
}
@media only screen and (min-width: 992px) {
    .CertData .el-col-md-7 {
        width: 29.16667%;
    }
}*/
.custom-text {
    /* eudc = 造字區 U+E000–U+F8FF（site.css 的 @font-face）；
       MingLiU-ExtB 系列補 Unicode 擴充 B 區（U+20000–U+2A6DF），
       LYDB 有 3 位律師的姓名落在這一區，造字檔涵蓋不到。 */
    font-family: eudc, "\65B0\7D30\660E\9AD4", "MingLiU-ExtB", "PMingLiU-ExtB", Verdana, Generva, Arial, Helvetica, sans-serif;
    line-height: 1.2;
}
/*@media only screen and (min-width: 992px) {
    .el-col-md-0 {
        display: none;
        width: 0;
    }
}

@media only screen and (min-width: 768px) {
    .el-col-sm-10 {
        width: 39.66667%;
    }
}
@media only screen and (min-width: 992px) {
    .el-col-md-11 {
        width: 43.83333%;
    }
}*/
/*.CertData .discInfo .el-row .el-col span a {
    font-weight: 700;
    color: #f0b603;
    text-decoration: none;
}
.CertData .discInfo .el-row .el-col:nth-last-child(-n+2) {
    border-bottom: none;
}*/


/* ===== 懲戒決議書內文 ===== */
@page {
    size: A4;
    margin: 2.5cm;
}

/* A4 主容器 */
.a4-page {
    width: 100%;
}

.a4-page div {
    line-height: 1.5rem;
}

.doc-header {
    margin-bottom: 20px;
}

.doc-line {
    margin: 4px 0;
}

.doc-right {
    text-align: right;
}

.doc-left {
    text-align: left;
}

/* 人員區 */
.doc-person .line {
    margin: 2px 0;
    white-space: pre-wrap; /* 保留資料原本的縮排空白，過長仍會自動折行 */
}

/* 避免 PDF 分頁斷裂 */
/*.doc-content, .doc-person {
    page-break-inside: avoid;
}*/

.seg-content {
    text-align: justify; /* 兩端對齊 */
    text-align-last: left; /* 確保最後一行也是靠左對齊，避免最後一行被平均分散 */
}

/* 純文字決議書的每一行：保留資料原本的開頭縮排（半形/全形空白），過長仍會自動折行 */
.seg-content .res-title,
.seg-content .res-p {
    white-space: pre-wrap;
}

.rescontent-html p,
.rescontent-html blockquote {
    font-size: inherit;
    line-height: 1.5rem;
    margin: 0 0 0.5rem;
}

.rescontent-html blockquote {
    border-left: 0;
    color: inherit;
    padding: 0;
    margin-left: 2em;
    margin-right: 0;
}

.rescontent-html blockquote p:last-child {
    margin-bottom: 0;
}

.rescontent-html table {
    border-collapse: collapse;
    margin: 0 0 0.5rem;
    box-sizing: border-box;
}

.rescontent-html th,
.rescontent-html td {
    border: 1px solid #555 !important;
    line-height: 1.5rem;
    padding: 4px 6px;
    vertical-align: top;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box;
}

.rescontent-html th {
    font-weight: 700;
    /* 表單設為首頁(首行/首列)時，CKEditor 以瀏覽器預設呈現為置中；
       .seg-content 的 justify / text-align-last 會蓋掉該預設，這裡補回 */
    text-align: center;
    text-align-last: center;
}

.rescontent-html th *,
.rescontent-html td * {
    max-width: 100%;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box;
}

.rescontent-html td p,
.rescontent-html th p {
    margin-bottom: 0;
}


/* 日期置中 + 全形空白感 */
.doc-date {
    text-align: center;
    letter-spacing: 1em; /* 中　華　民　國效果 */
    margin: 10px 0;
}

.doc-chair, .doc-clerk {
    text-align: right !important;
    padding-right: 5em;
}

.sig-row {
    display: grid;
    grid-template-columns: 1fr 8em;
    justify-content: end;
    line-height: 2;
}

.role {
    text-align: right !important;
    padding-right: 1em;
}

.name {
    text-align: left;
}
/* ========================== */


/* ======== 搜尋防呆 ======== */
.message-box__wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center; /* 垂直置中 */
    justify-content: center; /* 水平置中 */
    /* 預設隱藏 */
    display: none;
    text-align: center;
}
.message-box__wrapper.is-visible {
    display: flex;
}

.message-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.message-box {
    position: relative;
    width: 420px;
    padding: 40px 30px 30px;
    z-index: 1;
    padding-bottom: 10px;
    vertical-align: middle;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #ebeef5;
    font-size: 1.125rem;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    overflow: hidden;
    backface-visibility: hidden;
}

.message-body {
    font-size: 1.5625rem;
    font-weight: bold;
    color: red;
    line-height: 1.0;
    margin-bottom: 20px;
}

.message-footer {
    text-align: right;
}

.message-btn {
    color: #35435c;
    width: 20%;
    border-radius: 22px;
    padding: 9px 15px;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    background: #f0b603;
    border: 1px solid #dcdfe6;
}

.message-btn:hover {
    border-color: #ffbf60;
    background-color: rgba(255, 199, 29, .9);
    color: #fff;
}

.message-close {
    position: absolute;
    top: 10px;
    right: 15px;
    border: none;
    background: transparent;
    font-size: 1.375rem;
    cursor: pointer;
}
    .message-close img {
        width: 16px;
        height: 16px;
    }
/* ========================== */


/* ======= 詳細頁列印 ======= */
@media print {

    @page {
        size: A4;
        margin: 10mm;
    }

    .print-container {
        width: 100%;
        max-width: 210mm;
        margin: 0 auto;
        /* 讓主內容往上靠 */
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* 隱藏不需要列印的區塊 */
    .no-print {
        display: none !important;
    }

    .disciplineContent {
        display: block !important;
    }

    /* 可選：讓背景白、字黑更清楚 */
    body {
        background: white;
        color: black;
        margin: 0;
        padding: 0;
    }

    /* 強制移除 banner（包含背景與空間） */
    .banner {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: none !important;
    }

    /*  有些情況是父層撐開 */
    .banner::before,
    .banner::after {
        display: none !important;
    }

    .header {
        height: 120px !important;
    }

    /* ===== 手機（iOS）列印最後多出空白頁、整份被縮小的修正 =====
       根因：手機版 RWD 規則都寫成 @media only screen，列印媒體下全部失效，
       .header（site.css）與 .footer_content（footer.css）的 min-width 把列印版面撐到 1200px，
       A4 可印寬度只有約 718px，瀏覽器只好整頁縮小（Chrome 實測字只剩 7pt、內文從紙寬 29% 處才開始）。
       iOS 又是「先算頁數、再另外排版一次畫 PDF」，兩次排版高度不一致時，多出來的頁就留白。
       以下規則用 :has(#disciplineContent) 限定在懲戒決議書明細頁（明細是 AJAX 載進 #discContainer，
       body 沒有頁別 class），律師證書的列印版面不受影響。 */
    html:has(#disciplineContent) .header,
    html:has(#disciplineContent) .footer_content,
    html:has(#disciplineContent) .banner {
        min-width: 0 !important;
    }

    /* body 是 flex column + min-height:100vh（site.css）。iOS 列印時 vh 看的是可視區域不是紙張，
       會在兩次排版之間變動；列印時改回一般區塊、高度隨內容，兩次排版才會得到同樣的高度。 */
    html:has(#disciplineContent),
    body:has(#disciplineContent) {
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
    }

    /* site.css 的 html{font-size:87.5%} 與 (min-width:768px){100%} 沒有限定 screen，
       列印排版過程中寬度會變動而翻轉字級；固定成目前列印實際使用的 87.5%，讓兩次排版結果一致。 */
    html:has(#disciplineContent) {
        font-size: 87.5% !important;
    }

    /* 內文兩側的空欄（col-3）不印，內文欄位（col-6）改滿版；原本內文只佔紙寬一半。 */
    .CertData .discInfo .disc-row .disc-col.col-3 {
        display: none !important;
    }

    .CertData .discInfo .disc-row .disc-col.col-6:has(#disciplineContent) {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

/*    .CertData .discInfo .el-row .el-col-4 {
        flex: none !important;
        width: 15% !important;
        max-width: 15% !important;
    }

    .CertData .discInfo .el-row .el-col-8 {
        flex: none !important;
        width: 85% !important;
        max-width: 85% !important;
    }*/

}
/* ========================== */

/* ===== 懲戒決議書內容響應設計 ===== */
/* 預設：桌機顯示內容 */
.disciplineContent {
    display: block;
}

.mobile-pdf-download {
    display: none;
}

/* 手機（XS） */
@media (max-width: 47.9375rem) {

    /* 隱藏整份公文 */
    .disciplineContent {
        display: none;
    }

    /* 顯示下載提示 */
    .mobile-pdf-download {
        display: block;
        text-align: center;
        padding: 20px;
        font-size: 1rem;
    }

        .mobile-pdf-download button {
            display: inline-block;
            padding: 10px 20px;
            color: #fff;
            border-radius: 4px;
            border-color: #ffbf60;
            background-color: rgba(255, 199, 29, .9);
            border: 1px solid #ebeef5;
        }
}
/* ========================== */


/* ===== 詳細頁主要內容 ===== */
.CertData {
    width: 100%;
    height: 100%;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}

    .CertData .discInfo {
        padding: 24px;
        background-color: #fff;
        -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
        box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
        box-sizing: border-box !important;
    }

        .CertData .discInfo .disc-row {
/*            display: -webkit-box;
            display: -ms-flexbox;*/
            display: flex;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
        }

        .CertData .discInfo .disc-col {
            box-sizing: border-box !important;
        }

        .CertData .discInfo .disc-row .disc-col:nth-child(odd) {
            font-weight: 700;
            color: #172133;
        }

        .CertData .discInfo .disc-row .disc-col:first-child {
            padding: 12px 0 12px 0;
        }

        .CertData .discInfo .disc-row .disc-col {
            padding: 16px 0 16px 0;
            border-bottom: 1px solid #e3e3e3;
        }

        .CertData .discInfo .disc-row .disc-col:first-child span {
            font-size: 1.125rem;
        }

        .CertData .discInfo .disc-row .disc-col span {
/*            float: left;*/
            text-align: left;
            display: block;
            font-size: 1rem;
            line-height: 1.5rem;
        }

.CertData .discInfo .disc-row .disc-col span a {
    font-weight: 700;
    color: #f0b603;
    text-decoration: none;
}

.CertData .discInfo .disc-row .disc-col:nth-last-child(-n+2) {
    border-bottom: none;
}
/* ========================== */
