﻿@charset "UTF-8";
/* 公開頁共用：跳過區塊連結、頁首、快速選單、頁尾、無障礙輔助樣式
   對應 MonthlyPass.html 的頁首/頁尾版面，讓各頁導覽位置與順序一致 */

html {
    scroll-padding-top: 6rem; /* 避免黏性頁首蓋住取得焦點的元件 */
}

/* 頁尾固定在畫面底部（內容不足一屏時），比照 MonthlyPass.html 的 min-h-screen + flex-col */
body.pub-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

    body.pub-body > #main-content {
        flex: 1 0 auto;
    }

/* ---------- 跳過區塊（平時隱藏，取得焦點時顯示） ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 0.75rem 1rem;
    background: #ffffff;
    color: #004d61;
    border: 2px solid #004d61;
    border-radius: 0.5rem;
    font-weight: 700;
    text-decoration: none;
}

    .skip-link:focus {
        left: 1rem;
        top: 1rem;
    }

#main-content:focus {
    outline: none;
}

/* ---------- 螢幕報讀專用文字 ---------- */
.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;
}

/* ---------- 必填文字（取代 CSS 星號，報讀軟體可讀到） ---------- */
.required-text {
    color: #b02a37;
    font-weight: 700;
    margin-left: 0.15rem;
}

/* ---------- 查詢狀態訊息 ---------- */
.query-status {
    margin: 0 0 0.75rem;
    font-weight: 600;
    color: #212529;
}

    .query-status:empty {
        margin: 0;
    }

/* ---------- 對比修正：各頁輔助灰字（含 startbootstrap 的 #a7aeb8） ---------- */
.text-muted,
.text-secondary {
    color: #555c63 !important;
}

/* Bootstrap 主色 #0d6efd 與白色對比僅 4.5:1 臨界值，改用較深藍 */
.text-primary {
    color: #0a58ca !important;
}

.bg-primary {
    background-color: #0a58ca !important;
}

/* startbootstrap 的 .btn-success（#00ac69）與白字對比僅 2.95:1（名單頁「資料匯出」按鈕） */
.btn-success {
    --bs-btn-bg: #00754a;
    --bs-btn-border-color: #00754a;
    --bs-btn-hover-bg: #005c3a;
    --bs-btn-hover-border-color: #005c3a;
    background-color: #00754a;
    border-color: #00754a;
    color: #ffffff;
}

    .btn-success:hover,
    .btn-success:focus {
        background-color: #005c3a;
        border-color: #005c3a;
        color: #ffffff;
    }

.btn-primary {
    --bs-btn-bg: #0a58ca;
    --bs-btn-border-color: #0a58ca;
    --bs-btn-hover-bg: #084298;
    --bs-btn-hover-border-color: #084298;
    --bs-btn-active-bg: #052c65;
    --bs-btn-active-border-color: #052c65;
}

/* ---------- 可搜尋下拉（accessible-autocomplete；外觀比照 Select2 / Bootstrap .form-select） ---------- */
.pub-autocomplete .autocomplete__wrapper {
    position: relative;
    z-index: 0; /* 讓箭頭（z-index:-1）留在輸入框下方但不被外層背景蓋住 */
    background: #ffffff;
    border-radius: 0.375rem;
}

.pub-autocomplete:focus-within .autocomplete__wrapper {
    z-index: 1040; /* 展開時選單蓋在其他欄位之上 */
}

.pub-autocomplete .autocomplete__hint,
.pub-autocomplete .autocomplete__input {
    height: 38px;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.pub-autocomplete .autocomplete__hint {
    color: #555c63;
    background: transparent;
}

.pub-autocomplete .autocomplete__input {
    background-color: transparent;
}

/* 輸入框為空時隱藏提示字，避免與 placeholder 重疊（由 enhanceSelectAutocomplete 切換 class） */
.pub-autocomplete--empty .autocomplete__hint {
    visibility: hidden;
}

    .pub-autocomplete .autocomplete__input::placeholder {
        color: #6c757d;
        opacity: 1;
    }

.pub-autocomplete .autocomplete__input--focused {
    border-color: #0a58ca;
    outline: 2px solid #0a58ca;
    outline-offset: 0;
    box-shadow: none;
}

.pub-autocomplete .autocomplete__dropdown-arrow-down {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: auto;
    height: auto;
    transform: translateY(-50%);
    z-index: -1;
    color: #555c63;
    font-size: 0.8rem;
    pointer-events: none;
}

.pub-autocomplete .autocomplete__menu {
    margin-top: 2px;
    max-height: 260px;
    background: #ffffff;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.pub-autocomplete .autocomplete__option {
    padding: 0.5rem 0.75rem;
    border-width: 0;
    font-size: 0.95rem;
}

    .pub-autocomplete .autocomplete__option--focused,
    .pub-autocomplete .autocomplete__option:hover {
        background-color: #0a58ca; /* 白字約 6:1（Select2 預設 #5897fb 僅 2.9:1） */
        border-color: #0a58ca;
        color: #ffffff;
        outline: none;
    }

.pub-autocomplete .autocomplete__option--no-results,
.pub-autocomplete .autocomplete__option--no-results:hover {
    background-color: #ffffff;
    color: #555c63;
    cursor: default;
}

/* ==========================================================================
   頁首 / 頁尾：與 MonthlyPass.html（Tailwind）完全相同的外觀
   數值皆為 Tailwind v3 對應值；斷點 sm = 640px、md = 768px、lg = 1024px
   修改時請同步 MonthlyPass.html 的 <header> / <footer>
   ========================================================================== */
.pub-header,
.pub-footer {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

    .pub-header *,
    .pub-footer * {
        box-sizing: border-box;
    }

    .pub-header img,
    .pub-footer img {
        display: block;
        max-width: 100%;
    }

    /* 重設 Bootstrap 的 p / h2 / ul 外距；權重只有元素層級（:where 內為 0），下方元件的 class 間距設定仍可覆蓋 */
    :where(.pub-header, .pub-footer) p,
    :where(.pub-header, .pub-footer) h2,
    :where(.pub-header, .pub-footer) ul {
        margin: 0;
    }

/* ---------- 頁首 ---------- */
.pub-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pub-header__inner {
    max-width: 80rem;
    height: 5rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 標誌與站名：手機上下排列（避免站名被擠成一字一行），640px 以上左右排列 */
.pub-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    color: inherit;
    text-decoration: none;
}

    .pub-brand:hover,
    .pub-brand:focus {
        color: inherit;
        text-decoration: none;
    }

.pub-brand__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

    .pub-brand__logo img {
        height: 2rem;
        width: auto;
        object-fit: contain;
    }

.pub-brand__divider {
    display: none;
}

.pub-brand__title {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

/* ---------- 快速選單 ---------- */
.pub-menu {
    position: relative;
    display: inline-block;
    text-align: left;
}

.pub-menu__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    column-gap: 0.375rem;
    margin: 0;
    padding: 0.625rem 0.75rem;
    background-color: #ffffff;
    color: #334155;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: inset 0 0 0 1px #cbd5e1, 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

    .pub-menu__toggle:hover {
        background-color: #f8fafc;
    }

    .pub-menu__toggle:focus {
        outline: none;
    }

    .pub-menu__toggle:focus-visible {
        box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 4px #2563eb, 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

.pub-menu__icon {
    margin-right: 0.25rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: #2563eb;
}

/* 手機只顯示圖示（文字仍供報讀軟體） */
.pub-menu__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.pub-menu__arrow {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: -0.25rem;
    color: #9ca3af;
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.pub-menu__toggle[aria-expanded="true"] .pub-menu__arrow {
    transform: rotate(180deg);
}

.pub-menu__list {
    position: absolute;
    right: 0;
    z-index: 1040;
    width: 18rem;
    margin-top: 0.5rem;
    padding: 0;
    list-style: none;
    transform-origin: top right;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

    .pub-menu__list[hidden] {
        display: none;
    }

    .pub-menu__list li {
        padding: 0.25rem 0;
    }

        .pub-menu__list li + li {
            border-top: 1px solid #f1f5f9;
        }

    .pub-menu__list a {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        color: #334155;
        text-decoration: none;
        transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    }

        .pub-menu__list a:hover,
        .pub-menu__list a:focus {
            background-color: #f8fafc;
            color: #1d4ed8;
        }

        .pub-menu__list a .bi {
            margin-right: 0.75rem;
            font-size: 1rem;
            line-height: 1.5rem;
        }

.pub-menu__label {
    font-weight: 500;
}

@media (min-width: 640px) {
    .pub-header__inner {
        padding: 0 1.5rem;
    }

    .pub-brand {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .pub-brand__logo img {
        height: 3rem;
    }

    .pub-brand__title {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .pub-menu__toggle {
        padding: 0.625rem 1rem;
    }

    .pub-menu__text {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }
}

@media (min-width: 1024px) {
    .pub-header__inner {
        padding: 0 2rem;
    }
}

/* ---------- 頁尾 ---------- */
.pub-footer {
    margin-top: 2rem; /* 與內容的間距（MVC 頁內容底部沒有留白） */
    padding: 3rem 0;
    background-color: #0f172a;
    color: #cbd5e1;
    border-top: 4px solid #2563eb;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.pub-footer__inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.pub-footer__grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #1e293b;
}

.pub-footer__col > * + * {
    margin-top: 1rem;
}

.pub-footer__logo {
    display: inline-block;
    padding: 0.75rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

    .pub-footer__logo:hover {
        transform: scale(1.02);
    }

    .pub-footer__logo img {
        height: 2.5rem;
        width: auto;
        object-fit: contain;
    }

.pub-footer h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: 0.025em;
}

    .pub-footer h2.pub-footer__agency {
        font-size: 1rem;
        line-height: 1.5rem;
    }

.pub-footer__en {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.625;
    color: #94a3b8;
}

.pub-footer__desc {
    max-width: 24rem;
    font-size: 0.75rem;
    line-height: 1.625;
    color: #94a3b8;
}

.pub-footer__heading {
    display: flex;
    align-items: center;
}

    .pub-footer__heading > * + * {
        margin-left: 0.5rem;
    }

.pub-footer__bar {
    width: 0.375rem;
    height: 1rem;
    border-radius: 9999px;
}

.pub-footer__bar--blue {
    background-color: #3b82f6;
}

.pub-footer__bar--rose {
    background-color: #f43f5e;
}

.pub-footer__items > * + * {
    margin-top: 1rem;
}

.pub-footer__items--tight > * + * {
    margin-top: 0.75rem;
}

.pub-footer__item {
    display: flex;
    align-items: flex-start;
}

    .pub-footer__item > * + * {
        margin-left: 0.75rem;
    }

.pub-footer__item--spaced {
    padding-top: 0.25rem;
}

.pub-footer__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: 0.125rem;
    border-radius: 9999px;
    background-color: #1e293b;
    color: #94a3b8;
}

.pub-footer__icon--blue {
    background-color: #172554;
    color: #60a5fa;
}

.pub-footer__icon--rose {
    background-color: #4c0519;
    color: #fb7185;
}

.pub-footer__label {
    font-size: 0.75rem;
    line-height: 1rem;
    color: #94a3b8;
}

.pub-footer__value {
    margin-top: 0.125rem;
    color: #e2e8f0;
    font-weight: 600;
}

.pub-footer__or {
    color: #94a3b8;
    font-weight: 400;
}

.pub-footer__badge {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    background-color: #172554;
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1rem;
}

.pub-footer__note {
    font-size: 11px;
    color: #94a3b8;
}

.pub-footer__address {
    margin-top: 0.125rem;
    color: #e2e8f0;
    font-size: 0.75rem;
    line-height: 1.625;
    font-weight: 500;
}

.pub-footer__bottom {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.75rem;
    line-height: 1rem;
    color: #94a3b8;
}

.pub-footer__copyright {
    text-align: center;
}

.pub-footer__browser {
    display: flex;
    align-items: center;
}

    .pub-footer__browser > * + * {
        margin-left: 0.25rem;
    }

@media (min-width: 640px) {
    .pub-footer__inner {
        padding: 0 1.5rem;
    }

    .pub-footer__logo img {
        height: 3rem;
    }

    .pub-footer__address {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
}

@media (min-width: 768px) {
    .pub-footer__bottom {
        flex-direction: row;
    }

    .pub-footer__copyright {
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .pub-footer__inner {
        padding: 0 2rem;
    }

    .pub-footer__grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 3rem;
    }

    .pub-footer__col {
        grid-column: span 4 / span 4;
    }
}

@media print {
    .skip-link,
    .pub-header,
    .pub-footer {
        display: none !important;
    }
}
