/* ==========================================================================
   bs3-compat.css — Bootstrap 3 → 5 相容層 (CADCH_00026A, 2026-11-25)
   佈景內的樣板已改用 BS5 寫法；本檔僅為「未被佈景覆寫的模組樣板」及
   後台編輯器貼入的舊內容提供保底樣式。新寫的樣板請直接用 BS5 class。
   ========================================================================== */

/* --- 保留 BS3 時期的基本外觀（字型 / 字級 / 連結 / 欄距 / 標題）---------- */
:root {
  --bs-body-font-family: Arial, "微軟正黑體", "Microsoft JhengHei", "新細明體", PMingLiU, sans-serif;
  --bs-body-font-size: 14px;
  --bs-body-line-height: 1.42857143;
  --bs-body-color: #333;
  --bs-link-color: #337ab7;
  --bs-link-hover-color: #23527c;
}
a { color: #337ab7; text-decoration: none; }
a:hover, a:focus { color: #23527c; }
.row:not([class*=" g-"]):not([class*=" gx-"]):not([class^="g-"]), .container, .container-fluid { --bs-gutter-x: 30px; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 500; line-height: 1.1; }
h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; }
h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; }
h1, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 18px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; }
p { margin: 0 0 10px; }
label { font-weight: 700; margin-bottom: 5px; display: inline-block; max-width: 100%; }
.form-check-label { font-weight: normal; }
.form-control, .form-select, .btn, .input-group-text { font-size: 14px; }
hr { opacity: 1; border-top: 1px solid #eee; }
legend { font-size: 21px; border-bottom: 1px solid #e5e5e5; margin-bottom: 20px; }

/* --- Grid: col-xs-* / offsets / push-pull ------------------------------- */
/* 只有 col-xs-* 時才生效；同元素上的 col-sm/md/lg-* 在各自斷點仍會蓋過它 */
.row > [class*="col-xs-"] { flex: 0 0 auto; }
.row > .col-xs-1{width:8.3333333%} .row > .col-xs-2{width:16.666667%} .row > .col-xs-3{width:25%} .row > .col-xs-4{width:33.333333%} .row > .col-xs-5{width:41.666667%} .row > .col-xs-6{width:50%} .row > .col-xs-7{width:58.333333%} .row > .col-xs-8{width:66.666667%} .row > .col-xs-9{width:75%} .row > .col-xs-10{width:83.333333%} .row > .col-xs-11{width:91.666667%} .row > .col-xs-12{width:100%}
@media (min-width:576px){ .row > .col-sm-1{width:8.3333333%} .row > .col-sm-2{width:16.666667%} .row > .col-sm-3{width:25%} .row > .col-sm-4{width:33.333333%} .row > .col-sm-5{width:41.666667%} .row > .col-sm-6{width:50%} .row > .col-sm-7{width:58.333333%} .row > .col-sm-8{width:66.666667%} .row > .col-sm-9{width:75%} .row > .col-sm-10{width:83.333333%} .row > .col-sm-11{width:91.666667%} .row > .col-sm-12{width:100%} }
@media (min-width:768px){ .row > .col-md-1{width:8.3333333%} .row > .col-md-2{width:16.666667%} .row > .col-md-3{width:25%} .row > .col-md-4{width:33.333333%} .row > .col-md-5{width:41.666667%} .row > .col-md-6{width:50%} .row > .col-md-7{width:58.333333%} .row > .col-md-8{width:66.666667%} .row > .col-md-9{width:75%} .row > .col-md-10{width:83.333333%} .row > .col-md-11{width:91.666667%} .row > .col-md-12{width:100%} }
@media (min-width:992px){ .row > .col-lg-1{width:8.3333333%} .row > .col-lg-2{width:16.666667%} .row > .col-lg-3{width:25%} .row > .col-lg-4{width:33.333333%} .row > .col-lg-5{width:41.666667%} .row > .col-lg-6{width:50%} .row > .col-lg-7{width:58.333333%} .row > .col-lg-8{width:66.666667%} .row > .col-lg-9{width:75%} .row > .col-lg-10{width:83.333333%} .row > .col-lg-11{width:91.666667%} .row > .col-lg-12{width:100%} }
@media (min-width:1200px){ .row > .col-xl-1{width:8.3333333%} .row > .col-xl-2{width:16.666667%} .row > .col-xl-3{width:25%} .row > .col-xl-4{width:33.333333%} .row > .col-xl-5{width:41.666667%} .row > .col-xl-6{width:50%} .row > .col-xl-7{width:58.333333%} .row > .col-xl-8{width:66.666667%} .row > .col-xl-9{width:75%} .row > .col-xl-10{width:83.333333%} .row > .col-xl-11{width:91.666667%} .row > .col-xl-12{width:100%} }
/* BS3 的 .no-gutter：row 保留 -15px 外距（滿版），欄位內距歸零 */
.no-gutter > [class*="col-"] { padding-left: 0; padding-right: 0; }

/* --- Responsive utilities ---------------------------------------------- */
@media (max-width: 575.98px) { .hidden-xs { display: none !important; } }
@media (min-width: 576px) and (max-width: 767.98px) { .hidden-sm { display: none !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .hidden-md { display: none !important; } }
@media (min-width: 992px) { .hidden-lg { display: none !important; } }
.hidden { display: none !important; }

/* --- Helpers ----------------------------------------------------------- */
.pull-right { float: right !important; }
.pull-left  { float: left !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.img-responsive { display: block; max-width: 100%; height: auto; }
.img-circle { border-radius: 50%; }
.img-rounded { border-radius: .375rem; }
.caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle;
  border-top: 4px solid; border-right: 4px solid transparent; border-left: 4px solid transparent; }

/* --- Buttons ----------------------------------------------------------- */
.btn-default { color: #333; background-color: #fff; border-color: #ccc; }
.btn-default:hover, .btn-default:focus, .btn-default.active { color: #333; background-color: #e6e6e6; border-color: #adadad; }
.btn-xs { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; }
.btn-block { display: block; width: 100%; }
/* BS3 data-toggle="buttons"：隱藏按鈕內的 radio/checkbox */
.btn-group-toggle > .btn input[type="radio"], .btn-group-toggle > .btn input[type="checkbox"],
[data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"] {
  position: absolute; clip: rect(0,0,0,0); pointer-events: none; }

/* --- Forms ------------------------------------------------------------- */
.form-group { margin-bottom: 1rem; }
.form-horizontal .form-group { display: flex; flex-wrap: wrap; margin-left: calc(var(--bs-gutter-x, 1.5rem) * -.5); margin-right: calc(var(--bs-gutter-x, 1.5rem) * -.5); }
.form-horizontal .form-group > [class*="col-"] { padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5); padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5); }
.help-block { display: block; margin-top: .25rem; color: #737373; font-size: .875em; }
.input-group-addon { display: flex; align-items: center; padding: .375rem .75rem; background-color: #e9ecef; border: 1px solid #ced4da; }
.input-group-btn { display: flex; }
.input-group > .input-group-btn > .btn { position: relative; z-index: 2; }
.input-group > .input-group-btn:not(:first-child) > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group > .input-group-btn:first-child > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* --- Components removed in BS5 ---------------------------------------- */
.thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff;
  border: 1px solid #ddd; border-radius: 4px; transition: border .2s ease-in-out; }
.thumbnail > img, .thumbnail a > img { display: block; max-width: 100%; height: auto; margin-left: auto; margin-right: auto; }
.thumbnail .caption { padding: 9px; color: #333; }
.panel { margin-bottom: 20px; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; }
.panel-heading { padding: 10px 15px; border-bottom: 1px solid #ddd; background-color: #f5f5f5; }
.panel-title { margin: 0; font-size: 16px; }
.panel-body { padding: 15px; }
.panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; }
.card.panel { border-radius: 4px; }
.well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; }
.label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: 700; line-height: 1; color: #fff;
  text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; }
.label-default{background-color:#777}.label-primary{background-color:#337ab7}.label-success{background-color:#5cb85c}
.label-info{background-color:#5bc0de}.label-warning{background-color:#f0ad4e}.label-danger{background-color:#d9534f}
.badge:not([class*="bg-"]) { background-color: #777; }
.nav-stacked { flex-direction: column; }
.nav > li > a { display: block; padding: 10px 15px; text-decoration: none; }
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; }
.media-heading { margin-top: 0; margin-bottom: 5px; }
.dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; color: #333; white-space: nowrap; text-decoration: none; }
.dropdown-menu > li > a:hover { background-color: #f5f5f5; }
.breadcrumb > li:not(.breadcrumb-item) + li::before { padding: 0 5px; color: #ccc; content: "/\00a0"; }
.pagination > li > a, .pagination > li > span { position: relative; display: block; padding: 6px 12px; margin-left: -1px;
  color: #337ab7; text-decoration: none; background-color: #fff; border: 1px solid #ddd; }
.pagination > .active > a, .pagination > .active > span { z-index: 3; color: #fff; background-color: #337ab7; border-color: #337ab7; }
.table > tbody > tr.danger > td, .table > tbody > tr.danger > th { background-color: #f2dede; }
.table > tbody > tr.warning > td { background-color: #fcf8e3; }
.table > tbody > tr.success > td { background-color: #dff0d8; }
.table > tbody > tr.info > td { background-color: #d9edf7; }

/* --- Glyphicons → Bootstrap Icons ------------------------------------- */
.glyphicon { display: inline-block; font-family: "bootstrap-icons" !important; font-style: normal; font-weight: normal !important;
  line-height: 1; vertical-align: -.125em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.glyphicon-plus::before{content:"\f64d";}
.glyphicon-minus::before{content:"\f63b";}
.glyphicon-comment::before{content:"\f268";}
.glyphicon-envelope::before{content:"\f32f";}
.glyphicon-user::before{content:"\f4e1";}
.glyphicon-info-sign::before{content:"\f430";}
.glyphicon-edit::before{content:"\f4ca";}
.glyphicon-circle-arrow-right::before{content:"\f133";}
.glyphicon-circle-arrow-left::before{content:"\f129";}
.glyphicon-circle-arrow-down::before{content:"\f118";}
.glyphicon-trash::before{content:"\f5de";}
.glyphicon-question-sign::before{content:"\f504";}
.glyphicon-pencil::before{content:"\f4cb";}
.glyphicon-wrench::before{content:"\f621";}
.glyphicon-tag::before{content:"\f5af";}
.glyphicon-search::before{content:"\f52a";}
.glyphicon-remove::before{content:"\f659";}
.glyphicon-print::before{content:"\f501";}
.glyphicon-ok-sign::before{content:"\f26a";}
.glyphicon-off::before{content:"\f4ff";}
.glyphicon-lock::before{content:"\f47a";}
.glyphicon-file::before{content:"\f392";}
.glyphicon-ok::before{content:"\f633";}
.glyphicon-home::before{content:"\f424";}
.glyphicon-star::before{content:"\f586";}
.glyphicon-chevron-left::before{content:"\f284";}
.glyphicon-chevron-right::before{content:"\f285";}
.glyphicon-shopping-cart::before{content:"\f242";}
.glyphicon-heart::before{content:"\f415";}
.glyphicon-calendar::before{content:"\f1f6";}
.glyphicon-time::before{content:"\f293";}
.glyphicon-eye-open::before{content:"\f341";}
.glyphicon-refresh::before{content:"\f116";}
.glyphicon-download::before{content:"\f30a";}
.glyphicon-upload::before{content:"\f603";}
.glyphicon-list::before{content:"\f479";}
.glyphicon-th::before{content:"\f3f8";}
.glyphicon-th-large::before{content:"\f3fb";}
.glyphicon-arrow-right::before{content:"\f138";}
.glyphicon-arrow-left::before{content:"\f12f";}
.glyphicon-arrow-up::before{content:"\f148";}
.glyphicon-arrow-down::before{content:"\f128";}
.glyphicon-cog::before{content:"\f3e2";}
.glyphicon-picture::before{content:"\f42a";}
.glyphicon-film::before{content:"\f3c3";}
.glyphicon-music::before{content:"\f4a0";}
.glyphicon-phone::before{content:"\f5c1";}
.glyphicon-earphone::before{content:"\f5c1";}
.glyphicon-map-marker::before{content:"\f3e7";}
.glyphicon-globe::before{content:"\f3ee";}
.glyphicon-link::before{content:"\f470";}
.glyphicon-share::before{content:"\f52e";}
.glyphicon-thumbs-up::before{content:"\f407";}
.glyphicon-exclamation-sign::before{content:"\f332";}
.glyphicon-warning-sign::before{content:"\f33a";}
.glyphicon-plus-sign::before{content:"\f4f9";}
.glyphicon-minus-sign::before{content:"\f2e5";}
.glyphicon-remove-sign::before{content:"\f622";}
.glyphicon-folder-open::before{content:"\f3d8";}
.glyphicon-folder-close::before{content:"\f3d1";}
.glyphicon-send::before{content:"\f6c0";}
.glyphicon-new-window::before{content:"\f1c5";}
.glyphicon-log-in::before{content:"\f1be";}
.glyphicon-log-out::before{content:"\f1c3";}
.glyphicon-menu-hamburger::before{content:"\f479";}
.glyphicon-triangle-bottom::before{content:"\f229";}
.glyphicon-triangle-top::before{content:"\f235";}
.glyphicon-triangle-right::before{content:"\f231";}
.glyphicon-triangle-left::before{content:"\f22d";}

/* --- Inline radios / checkboxes (BS3) ----------------------------------- */
.radio-inline, .checkbox-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: 400; vertical-align: middle; cursor: pointer; }
.radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-left: 10px; }
.radio-inline input[type="radio"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-left: -20px; margin-top: 4px; }
.checkbox, .radio { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; }
.checkbox label, .radio label { min-height: 20px; padding-left: 20px; font-weight: 400; cursor: pointer; }
.checkbox input[type="checkbox"], .radio input[type="radio"] { position: absolute; margin-left: -20px; margin-top: 4px; }
