﻿html {
  font-size: 87.5%;
}

@media (min-width: 768px) {
  html {
    font-size: 100%;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
        min-height: 100vh;
        margin: 0;
        display: flex;
        flex-direction: column;
}

/* 難字（造字）網頁字型：中推會「外網網頁字型」元件（artifacts/罕見字tools/2_外網網頁字型）。
   字檔只涵蓋 Unicode 造字區 U+E000–U+F8FF，也就是 LYDB 姓名/事務所欄位裡實際存的難字碼位
   （例：王相{U+E019}、石永{U+ED4A}），其餘字元一律落到後面的字型，不會影響既有版面。
   舊站 cert-web 是同樣做法（App.vue 的 @font-face + /font/eudc.ttf）。
   內網那支 cmexwebfont.js 走 https://cwesfont.intra.moj 的 subset 服務，外網連不到，故改用靜態字型檔。 */
@font-face {
    font-family: eudc;
    src: url('../font/eudc.ttf') format('truetype');
    /* 限定造字區：字檔 724KB，沒有 unicode-range 的話每頁都會下載，而且會變成
       body 的 first available font，讓 line-height:normal 的行高整站多 1px。
       加了之後只有頁面真的出現難字才下載，其餘完全不受影響（headless Chrome 實測）。 */
    unicode-range: U+E000-F8FF;
    font-display: swap;
}

@font-face {
    font-family: eudc_kai;
    src: url('../font/eudc_kai.ttf') format('truetype');
    /* 限定造字區：字檔 724KB，沒有 unicode-range 的話每頁都會下載，而且會變成
       body 的 first available font，讓 line-height:normal 的行高整站多 1px。
       加了之後只有頁面真的出現難字才下載，其餘完全不受影響（headless Chrome 實測）。 */
    unicode-range: U+E000-F8FF;
    font-display: swap;
}

/* 全域字體：比照舊站的 #app, html 設定。
   Bootstrap 有 body { font-family: var(--bs-body-font-family) }，所以必須同時指定 body 才蓋得掉；
   site.css 載入順序在 bootstrap.css 之後，同權重後者勝，不需要 !important。
   只設在 html/body（祖先）上，難字的 .custom-text 是宣告在元素本身，繼承弱於自身宣告，不會被蓋掉。
   這裡把 eudc 排在最前面當保險：它只有 U+E000–U+F8FF 有字，一般中英文照樣落到後面的正黑體，
   版面不受影響，但沒掛 .custom-text 的地方（頁尾、提示文字等）若冒出難字也不會變成空白框。 */
html, body {
    font-family: eudc, "Helvetica Neue", Helvetica, "Microsoft JhengHei", "微軟正黑體", "標楷體", "MingLiU-ExtB", "PMingLiU-ExtB", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/*body {
  margin-bottom: 60px;
}*/
/*全域設定 舊code沒有*/
*, *::before, *::after {
    box-sizing: content-box !important;
}

/*layout*/
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-wrapr {
    display: flex;
    flex-direction: column;
}

.header {
    height: 280px;
    min-width: 1200px;
}
/*guild info中的欄位名稱*/
.guildheaderbg {
    background-color: #eab600 !important;
    color: #333 !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: none !important;
    padding : 16px !important;
}
/*guild info中的公會名稱*/
.guild-info-title {
    z-index: 10;
}

.guild-title-menu {
    background-color: transparent;
    border-bottom: none;
}

.guildInfoList {
    margin: -20px 0 0;
    background: #fff;
    padding: 0 0 20px;
    border: 1px solid #eee;
    z-index: 10;
    position: relative;
}

.guild-table {
    text-align: center;
    vertical-align: middle;
    width: 100%;
    margin-bottom: 0;
    font-size: 1rem;
}

.guild-row {
    border-bottom: 1px solid #ddd;
}

.guildname {
    text-align: center;
    padding: 16px 8px !important;
    color: #35435C !important;
    font-weight: 700 !important;
}
/*guild info中的表單內容*/
.guildcontent {
    text-align:center; 
    padding:16px 8px !important; 
    color:#35435C !important;
}

.guildcontent .guild-address-text {
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
}

/* 手機版公會一覽表：電話/傳真不能斷行，表格最小寬度會超出 390px；
   改成固定欄寬並允許斷字，字級比照舊站 GuildInfoList.vue 手機版的 12px */
@media only screen and (max-width: 48rem) {
    .guild-table {
        table-layout: fixed;
        font-size: 0.75rem;
    }

    .guildheaderbg,
    .guildname,
    .guildcontent {
        padding: 10px 4px !important;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}

/* 載入資料轉圈圈 */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7); /* 半透明白色 */
    z-index: 9999; /* 確保在最上層 */
    display: none; /* 預設不顯示 */
    text-align: center;
    padding-top: 20%;
}



.content {
    background-color: #f8f8f8;
    padding-bottom: 15px;
    min-width: 1022px;
    max-width: 100%;
    flex: 1 0 auto;
}

    .content > .container {
        display: block;
    }

    .content main {
        display: block;
        min-height: 1px;
    }

        .content main::after {
            content: "";
            display: block;
            clear: both;
        }

    .content main > #lawyerContainer,
    .content main > #discContainer,
    .content main > #detailContent {
        clear: both;
    }

/* 1170px 比照舊站 $content_width（原本 header.css 另外覆寫成 1170，這裡直接寫成同一個值，header.css 那份已移除） */
.container {
    min-width: 1170px;
    max-width: 73.125rem;
    padding: 0 15px 0 15px;
    margin: 0 auto;
}

.level {
    display: flex;
    align-items: center;
}

.footer {
    position: relative;
    overflow: hidden;
    min-width: 1200px;
    flex-shrink: 0;
}

    .footer .footer_bg {
        background-image: url("~@/images/footer-bg.png");
        background-repeat: no-repeat;
        background-size: cover;
    }

        .footer .footer_bg:before {
            content: "";
            display: block;
            position: absolute;
            width: 100%;
            height: 10px;
            top: 0;
            opacity: 0.6;
            background-image: linear-gradient(90deg, #4693b5 0%, #49b8a1 100%);
        }

.toMainArea {
    z-index: 2;
    position: absolute;
    top: -27px;
    left: 50%;
    color: #000000;
    font-size: large;
    background-color: #FEECE0;
    padding: 5px 10px;
    border: black 1px solid;
    border-radius: 0 0 5px 5px;
    font-weight: bold; 
}

    .toMainArea:focus-visible {
        top: 0px;
        text-decoration: none;
    }

@media print {
    /* 隱藏不必要的元件 */
    .toMainArea, .no-print, .banner {
        display: none !important;
    }

    /* 設定外層最大不超過100% 以解決版面過大被截斷的狀況 */
    .container, .content, .lawyerTitle, .lawyerCert, .issueInfo, .fullWidth, .footer {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }

    .footer {
        break-inside: avoid; /* 避免在 footer 內換頁切斷 */
    }

    .footer_content .el-col {
        height: auto !important; /* 讓 footer 的高度自適應，不要被上面 el-col 固定 57px 影響 */
        border: none !important; /* 避免 footer 出現底線 */
    }
    .CertData .lawyerInfo {
        padding: 10px !important; /* 縮小容器邊距 */
        margin: 0 auto !important;
    }

    /* 設定紙張與列印樣式 */
    @page {
        size: A4 portrait;
        margin: 1.0cm; /* 將預留的邊界縮小以留出空間，若太緊可微調 */
    }
    body {
        margin: 0;
        font-size: 11pt; /* 大大縮小字體尺寸，避免內容因為字體太大把版面撐破 */
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* 處理 layout: 將原本的 el-col 網格保留比例，不讓其降級成手機版 100% 堆疊 */
    .el-row {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .el-col {
        float: none !important;
        box-sizing: border-box !important;
        padding-top: 16px !important;  /* 修改上下為 16px */
        padding-bottom: 16px !important;
        border-bottom: 1px solid #e3e3e3 !important; /* 補回分割底線 */
        height: 57px !important; /* 16px font-size 的行高約 24px + 16px * 2 = 56~57px */
        line-height: 1.5625rem !important;
        overflow: hidden !important; /* 避免過長文字把行距撐開 */
    }

    .print-no-border {
        border-bottom: none !important; 
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 強制鎖定寬度對應桌面版設定 (因為列印預設寬度常低於 992px) */
    .el-col-3 { width: 12.5% !important; flex: 0 0 12.5% !important; max-width: 12.5% !important; }
    .el-col-4 { width: 16.66667% !important; flex: 0 0 16.66667% !important; max-width: 16.66667% !important; }
    .el-col-6 { width: 25% !important; flex: 0 0 25% !important; max-width: 25% !important; }
    .el-col-7 { width: 29.16667% !important; flex: 0 0 29.16667% !important; max-width: 29.16667% !important; }
    .el-col-10 { width: 41.66667% !important; flex: 0 0 41.66667% !important; max-width: 41.66667% !important; }
    .el-col-11 { width: 45.83333% !important; flex: 0 0 45.83333% !important; max-width: 45.83333% !important; }
    .el-col-20 { width: 83.33333% !important; flex: 0 0 83.33333% !important; max-width: 83.33333% !important; }
    .el-col-24 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
    .el-col-20 { width: 83.33333% !important; flex: 0 0 83.33333% !important; max-width: 83.33333% !important; }
    .el-col-24 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }

    /* 細節微調：確保對齊與背景色 */
    .el-row .el-col, 
    .el-row .el-col div, 
    .el-row .el-col span, 
    .span_textalign, 
    .custom-text {
        text-align: left !important;
        line-height: inherit !important;
    }

    .CertData .lawyerInfo .el-row .el-col span {
        float: none !important;
        display: block !important;
        text-align: left !important;
    }


    /* 固定大頭照到右上方才不會跑版，且必須將其原本父層的 no-print 忽略 */
    .lawyerInfo {
        position: relative !important;
    }
    
    /* 將英文姓名的獨立樣式覆寫取消 (讓他重新排回來) */
    .dn-print {
        display: block !important;
    }
    /* 這裡有兩個圖片區塊，一個原版是 for 手機的 (有帶 no-print)，我們要解除它的限制或是強制顯示另一個 */
    .el-col-xs-0 { display: block !important; } 

    .lawyerImage {
        position: absolute !important;
        /* 由英文姓名 (第二行首) 到電子郵件 (第五行尾)，高度差對應新的 padding */
        top: 57px !important; /* 第一行為姓名，高度 57px，故照片將從第二行開頭處起始 */
        right: 0% !important;
        left: auto !important; 
        width: 170px !important; /* 配合增大後的行高維持視覺比例 */
        height: 226px !important; /* 第 2 到第 5 行，共 4 列*/
        border: 1px solid #ccc !important;
        display: block !important;
        visibility: visible !important;
        background-color: #fff !important;
        z-index: 99 !important;
    }
    .lawyerImage img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        /* 比照舊站與螢幕版的等比縮放：用 contain 讓整張圖都落在框內，比例不符時留白而不裁切。
           原本的 cover 會把直式的「未提供照片」圖（386×680）上下裁掉，列印出來文字被截斷。 */
        object-fit: contain !important;
        display: block !important;
    }

    .plr-25 {
        padding-left: 5px !important;/* 降低邊距讓更多位置給網頁資料 */
        padding-right: 5px !important;
    }
}

@media only screen and (max-width: 62rem) {
    .header {
        min-width: 100%;
    }

    .container {
        min-width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
    }

    .footer {
        min-width: 100%;
    }

        .footer .footer_bg {
            background-position: 60%;
        }

    .content {
        min-width: 100%;
    }

    /* 頁尾左右兩欄（.w75/.w25 帶 !important）在 992px 以下改為上下堆疊，比照舊站 el-col :md="18"/:md="6" 只在 ≥992 生效 */
    .footer_content .w75,
    .footer_content .w25 {
        width: 100% !important;
    }
}
.el-backtop {
    position: fixed;
    right: 40px;
    bottom: 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0b603 !important;
    color: #409eff;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 5;

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;

    -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .82);
    box-shadow: 0 0 6px rgba(0, 0, 0, .82);
}
.div_img {
    border-radius: 8px;
}
.img_iconhome {
    width: 40px;
    height: 40px;
}
@media only screen and (max-width: 48rem) {
    .el-backtop {
        bottom: 25px !important;
        right: 25px !important;
    }

    .el-dialog {
        margin-top: 5vh !important;
    }
}
/*layout*/
/*message*/

/* 文字樣式 */
.info-msg {
    color: red;
    font-size: 1.375rem;
    font-weight: 700;
    text-align: center;
    padding-top: 10px;
}

/* 確定按鈕樣式 */
.btn-confirm {
    background-color: #f0b603 !important; /* 黃色底 */
    border-color: #f0b603;
    color: #35435c;
    width: 27%;
    border-radius: 22px !important;
    padding: 9px 15px !important;
    font-weight: 600;
    font-size: 0.75rem;
    transform: scale(0.9);
    transition: all 0.2s ease-in-out;
}

    .btn-confirm:hover {
        background-color: #FFD633 !important; /* 淺黃 */
        color: white !important; /* 白字 */
    }

/* 背景遮罩變黑 */
.jconfirm-bg {
    background-color: rgba(0, 0, 0, 0.6) !important;
}
.jconfirm .jconfirm-box .jconfirm-buttons {
    border-top: none !important; 
    margin-top: 0 !important; 
}
.jconfirm .jconfirm-box div.jconfirm-closeIcon .fa {
    font-size: 1.5625rem !important;
}
.jconfirm .jconfirm-box div.jconfirm-content-pane
{
    margin-bottom: 0px !important;
}
.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons {
    padding: 0px;
    padding-bottom: 5px !important;
}
/*message*/
.notacceptable {
    margin-top: -5%;
    background-color: #fff;
    height: 100%;
    padding: 20px 12px 20px 12px;
    -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    position: relative;
    z-index: 100;
}
    .notacceptable h3 {
        font-size: 1.5rem;
        font-weight: 100;
        margin-top: 1em;
        margin-block-end: 1em;
    }
    .notacceptable .button {
        background-color: #f0b603;
        border-color: #f0b603;
        font-weight: 700;
    }
        .notacceptable .button:hover {
            background-color: #fcca26 !important;
            color: #fff !important;
        }
        .notacceptable .button span {
            color: #35435c;
            font-size: 1.125rem;
        }

.mlmr-15 {
    margin-left: -15px;
    margin-right: -15px;
}
.plpr15 {
    padding-left: 15px;
    padding-right: 15px;
}
.mb-10 {
    margin-bottom: 10px;
}
.box-sizing-border-box {
    box-sizing: border-box !important;
}
.bsbbAfter *{
    box-sizing: border-box !important;
}
.w75{
    width:75% !important;
}
.w25 {
    width: 25% !important;
}
.cp {
    cursor: pointer;
}
.disNone {
    display: none;
}
.hw-240 {
    height: 240px;
    width: 240px;
}
.mlr-25 {
    margin-left: -2.5px;
    margin-right: -2.5px;
}
.plr-25 {
    padding-left: 2.5px !important;
    padding-right: 2.5px !important;
}
.dn {
    display: none;
}

/* [網站導覽用] 滑鼠懸停時改變背景色為淺亮色 */
.hover-bg-light:hover {
    background-color: #f8f9fa !important;
}

/* [網站導覽用] 滑鼠懸停時改變文字顏色為主色(Primary) */
.hover-text-primary:hover {
    color: #0d6efd !important;
}

/* [網站導覽用] 設定基礎漸變動畫效果 */
.transition-all {
    transition: all 0.2s ease-in-out;
}

/* [網站導覽用 將滑鼠游標強制設定為預設指標 (非手指圖案) */
.cursor-default {
    cursor: default !important;
}

/* [網站導覽用] 滑鼠懸停時將元件上抬並增加陰影效果以產生立體感 */
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}
