﻿/* ==========================================================================
   健康促進網路問卷系統 - 學生端頁面樣式（書本版型）
   2026-09-18 偉銘 - 新增：登入頁優化（下拉選單放大、驗證碼顯示修正、響應式）
   2026-09-18 偉銘 - 新增：登入確認頁（Home/CheckStdnt）沿用同一套書本版型

   使用說明：
   - 供下列學生端頁面共用（各頁自行 <link> 引用）：
       Views/Outer/Logon.cshtml       學生登入
       Views/Home/CheckStdnt.cshtml   登入確認
   - 使用對象為中小學學生，字級刻意放大、間距加寬，降低誤點機率
   - 專案為 Bootstrap 4，此處不使用 BS5 專屬類別
   - 檔名沿用 Logon.css（已於服務單列管），實際內容為學生端共用
   ========================================================================== */

:root
{
    --ayq-green: #3B897A;
    --ayq-green-dark: #2d6c60;
    --ayq-green-light: #eaf4f1;
    --ayq-cover-dark: #1f4f46;      /* 書封深色端 */
    --ayq-paper: #fdfbf4;           /* 書頁紙色 */
    --ayq-text: #24332f;
    --ayq-muted: #6d7b77;
    --ayq-border: #d6cfbc;          /* 紙面上的欄位框線 */
}

/* --------------------------------------------------------------------------
   版心加寬
   _Layout 的 .container.body-content 在大螢幕下最寬只有 1140px，
   登入區塞入放大後的下拉選單會顯得侷促；本頁（僅本頁載入此 CSS）放寬到 1320px
   -------------------------------------------------------------------------- */
@media (min-width: 1200px)
{
    .body-content
    {
        max-width: 1320px;
    }
}

/* --------------------------------------------------------------------------
   書本外觀
   .ayq-book        = 書封（露出在書頁外的綠色邊）
   .ayq-book-pages  = 攤開的兩頁，左右各半，書脊落在正中央
   -------------------------------------------------------------------------- */
.ayq-book
{
    position: relative;
    margin: 20px 0 46px;
    padding: 15px;
    background: linear-gradient(135deg, var(--ayq-green) 0%, var(--ayq-cover-dark) 100%);
    border-radius: 8px 16px 16px 8px;
    box-shadow: 0 20px 40px rgba(20, 60, 50, .30),
                0 3px 8px rgba(0, 0, 0, .16);
}

/* 書封上的燙邊細線 */
.ayq-book::before
{
    content: '';
    position: absolute;
    top: 7px;
    right: 7px;
    bottom: 7px;
    left: 7px;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 6px;
    pointer-events: none;
}

/* 書籤緞帶：自書封頂端垂下 */
.ayq-bookmark
{
    position: absolute;
    top: -6px;
    right: 56px;
    width: 30px;
    height: 74px;
    background: linear-gradient(180deg, #e0b341 0%, #c8912a 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .28);
    z-index: 2;
}

/* 緞帶下緣的燕尾缺口 */
.ayq-bookmark::after
{
    content: '';
    position: absolute;
    left: 0;
    bottom: -12px;
    border-left: 15px solid #c8912a;
    border-right: 15px solid #c8912a;
    border-bottom: 12px solid transparent;
}

.ayq-book-pages
{
    position: relative;
    background: var(--ayq-paper);
    border-radius: 3px;
    overflow: hidden;
    /* 左右外緣的堆疊頁緣 */
    box-shadow: inset 3px 0 0 #f2eee2,
                inset 6px 0 0 #e9e4d4,
                inset -3px 0 0 #f2eee2,
                inset -6px 0 0 #e9e4d4,
                0 0 0 1px rgba(60, 50, 30, .10);
}

/* 書脊：左右頁各自朝中間打出內陰影，形成書溝 */
.ayq-page
{
    background: var(--ayq-paper);
}

.ayq-page-l
{
    box-shadow: inset -24px 0 28px -22px rgba(70, 55, 30, .50);
}

.ayq-page-r
{
    box-shadow: inset 24px 0 28px -22px rgba(70, 55, 30, .50);
    border-left: 1px solid rgba(70, 55, 30, .16);
}

/* --------------------------------------------------------------------------
   左側：登入表單
   -------------------------------------------------------------------------- */
.ayq-logon-form
{
    padding: 30px 30px 34px;
    color: var(--ayq-text);
}

.ayq-logon-brand
{
    text-align: center;
    margin-bottom: 12px;
}

/* 白色火箭圖需襯綠色圓底，否則在紙色書頁上看不見 */
.ayq-brand-badge
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ayq-green) 0%, var(--ayq-cover-dark) 100%);
    box-shadow: 0 6px 16px rgba(20, 60, 50, .26);
}

/* 火箭圖示：原本 1 秒來回過於急促，放慢並縮小位移 */
.ayq-logon-brand img
{
    width: 54px;
    animation: ayq-mover 2.6s ease-in-out infinite alternate;
}

@keyframes ayq-mover
{
    0%   { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce)
{
    .ayq-logon-brand img
    {
        animation: none;
    }
}

.ayq-logon-title
{
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .05em;
    margin: 0 0 4px;
    color: var(--ayq-cover-dark);
}

.ayq-logon-hint
{
    text-align: center;
    font-size: .95rem;
    color: var(--ayq-muted);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--ayq-border);
}

/* 欄位：字級加大、觸控目標加高 */
.ayq-field
{
    margin-bottom: 14px;
}

.ayq-field label
{
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: .03em;
    color: var(--ayq-green-dark);
}

.ayq-field .form-control,
.ayq-book select.form-control
{
    height: auto;
    min-height: 50px;
    font-size: 1.15rem;
    padding: 10px 14px;
    border: 2px solid var(--ayq-border);
    border-radius: 8px;
    color: var(--ayq-text);
    background-color: #fff;
    max-width: none;              /* 蓋掉 Site.css 對 select 的 max-width:280px */
    width: 100%;
}

.ayq-field .form-control:focus,
.ayq-book select.form-control:focus
{
    border-color: var(--ayq-green);
    box-shadow: 0 0 0 .2rem rgba(59, 137, 122, .25);
}

/* 尚未選擇時以灰字呈現，已選擇則為深色，讓學生一眼看出哪幾項還沒填 */
.ayq-book select.form-control.ayq-empty
{
    color: var(--ayq-muted);
}

/* --------------------------------------------------------------------------
   驗證碼
   -------------------------------------------------------------------------- */
.ayq-captcha
{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ayq-captcha .form-control
{
    flex: 1 1 130px;
    min-width: 120px;
    letter-spacing: .4em;
    text-align: center;
    font-size: 1.3rem;
}

/* 驗證碼圖片原始尺寸 100x36，放大顯示並完整呈現 4 位數字，不裁切 */
.ayq-captcha-img
{
    flex: 0 0 auto;
    width: 128px;
    height: 46px;
    border-radius: 6px;
    border: 2px solid var(--ayq-border);
    background: #fff;
    cursor: pointer;
}

.ayq-captcha-reload
{
    flex: 0 0 auto;
    min-height: 46px;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   登入按鈕
   -------------------------------------------------------------------------- */
/* 沿用 btn-success（規範：送出類按鈕為綠色），
   但 ace 版型的 .btn-success 顏色偏淡，此處補回飽和度 */
.ayq-btn-logon,
.ayq-btn-logon.btn-success
{
    width: 100%;
    min-height: 54px;
    margin-top: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .3em;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--ayq-green) 0%, var(--ayq-cover-dark) 100%);
    border: 0;
    box-shadow: 0 4px 12px rgba(20, 60, 50, .28);
}

.ayq-btn-logon.btn-success:hover,
.ayq-btn-logon.btn-success:focus
{
    color: #fff;
    background: linear-gradient(135deg, #46a08e 0%, #26604f 100%);
    box-shadow: 0 6px 16px rgba(20, 60, 50, .34);
}

/* --------------------------------------------------------------------------
   右側：最新消息
   -------------------------------------------------------------------------- */
/* 與左頁等高，內容不足時不會留下一塊突兀的空白 */
.ayq-logon-news
{
    background: transparent;      /* 沿用書頁紙色 */
    padding: 30px 32px 34px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ayq-news-title
{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ayq-cover-dark);
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ayq-border);
}

.ayq-news-list
{
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.ayq-news-list li
{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px dashed var(--ayq-border);
}

.ayq-news-list li:last-child
{
    border-bottom: 0;
}

.ayq-news-date
{
    flex: 0 0 auto;
    font-size: .95rem;
    color: var(--ayq-muted);
    white-space: nowrap;
    padding-top: 2px;
}

.ayq-news-link
{
    flex: 1 1 auto;
    font-size: 1.08rem;
    color: var(--ayq-text);
    text-decoration: none;
    word-break: break-all;
    cursor: pointer;
}

.ayq-news-link:hover
{
    color: var(--ayq-green-dark);
    text-decoration: underline;
}

/* 無公告時在剩餘空間垂直置中，避免文字卡在上緣、下方一大片空白 */
.ayq-news-empty
{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    text-align: center;
    color: var(--ayq-muted);
    font-size: 1.05rem;
}

.ayq-news-empty i
{
    display: block;
    font-size: 2.4rem;
    margin-bottom: 10px;
    opacity: .5;
}

/* --------------------------------------------------------------------------
   登入確認頁（Home/CheckStdnt）左頁：說明文字
   -------------------------------------------------------------------------- */
.ayq-guide
{
    padding: 30px 30px 34px;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: var(--ayq-text);
}

.ayq-guide-title
{
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ayq-cover-dark);
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--ayq-border);
}

.ayq-guide-hello
{
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--ayq-green-dark);
    margin-bottom: 10px;
}

.ayq-guide-text
{
    font-size: 1.08rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

/* 提醒事項 */
.ayq-guide-note
{
    list-style: none;
    margin: 0;
    padding: 0;
}

.ayq-guide-note li
{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 1.02rem;
    line-height: 1.8;
    padding: 8px 0;
    border-bottom: 1px dashed var(--ayq-border);
}

.ayq-guide-note li:last-child
{
    border-bottom: 0;
}

.ayq-guide-note i
{
    flex: 0 0 auto;
    margin-top: .35rem;
    color: var(--ayq-green);
}

/* 右頁表單底部按鈕區：依規範順序為「返回 → 送出」 */
.ayq-form-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

/* <button> 預設會把內容垂直置中，<a class="btn"> 不會——min-height 只把盒子撐高，
   文字仍貼在 padding-top 之下，兩顆按鈕的字會差約 7px。
   兩者都改用 flex 置中，行為才一致；gap 用來補回圖示與文字之間原本的空白 */
.ayq-form-actions .btn
{
    flex: 1 1 210px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    font-size: 1.08rem;
    font-weight: 700;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   響應式
   -------------------------------------------------------------------------- */
/* 單欄堆疊時已不是攤開的書，關掉書脊陰影，改以分隔線區隔上下兩塊 */
@media (max-width: 991.98px)
{
    .ayq-page-l
    {
        box-shadow: none;
    }

    .ayq-page-r
    {
        box-shadow: none;
        border-left: 0;
        border-top: 2px dashed var(--ayq-border);
    }

    .ayq-bookmark
    {
        right: 32px;
    }

    .ayq-logon-news
    {
        height: auto;
    }

    .ayq-news-list
    {
        overflow-y: visible;
    }

    .ayq-news-empty
    {
        padding: 50px 10px;
    }
}

@media (max-width: 575.98px)
{
    .ayq-logon-form
    {
        padding: 22px 18px 26px;
    }

    .ayq-logon-news
    {
        padding: 20px 18px 24px;
    }

    .ayq-captcha .form-control
    {
        flex: 1 1 100%;
    }
}
