/*
 * 全站共用頁尾。
 *
 * 這支樣式必須能獨立運作：Login/Index.cshtml、Login/Portal.cshtml 與客戶端的幾支
 * 頁面都是 Layout = null 且不載入 theme-portal.css，所以不能直接依賴那邊的 token。
 *
 * 作法是先定義一組 footer 專用變數，值取自 theme-portal.css 的 token 並帶 fallback：
 * 有載入 theme-portal.css 時沿用全站配色，沒有載入時退回自帶值。
 * 深淺色以 html[data-theme] 切換，與 theme-portal.css 的慣例一致。
 */

.site-footer {
    --footer-text: var(--text, #0f172a);
    --footer-muted: var(--muted, #64748b);
    --footer-border: var(--border, #e6eaf2);
    --footer-accent: var(--primary, #2563eb);

    width: 100%;
    margin-top: auto;
    padding: 22px 24px 26px;
    border-top: 1px solid var(--footer-border);
    color: var(--footer-muted);
    font-size: 0.8rem;
    line-height: 1.65;
    text-align: center;
}

html[data-theme="dark"] .site-footer {
    --footer-text: var(--text, #e2e8f0);
    --footer-muted: var(--muted, #94a3b8);
    --footer-border: var(--border, rgba(148, 163, 184, .18));
    --footer-accent: var(--primary, #3b82f6);
}

.site-footer__identity {
    font-weight: 700;
    color: var(--footer-text);
    margin-bottom: 4px;
}

.site-footer__purpose {
    max-width: 62ch;
    margin: 0 auto 10px;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    margin-bottom: 10px;
}

.site-footer__links a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .18s ease, border-color .18s ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
    color: var(--footer-accent);
    border-bottom-color: currentColor;
}

/* 反釣魚提示：明確聲明本站不會索取密碼，
   讓收到假冒郵件的使用者有依據可以判斷真偽。 */
.site-footer__notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 5px 12px;
    border: 1px solid var(--footer-border);
    border-radius: 999px;
    font-size: 0.75rem;
}

.site-footer__copyright {
    font-size: 0.75rem;
    opacity: .85;
}

@media (max-width: 480px) {
    .site-footer {
        padding: 18px 16px 22px;
        font-size: 0.76rem;
    }
}
