/* 頁面 08 — Form 領取表單 */

/* 上內距用 vh 而不是固定值:矮螢幕(SE 含 Safari 工具列只剩 553 高)要把空間讓給送出鍵,
   高螢幕才展開成設計稿的舒服比例。詳見 LESSONS_LEARNED 2026-07-30「版面預算」條目。 */
.p08-page {
  padding: clamp(20px, 5vh, 72px) 26px 60px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* T-079:表單狀態照原始設計稿改**左對齊**(擋下卡/完成登錄卡仍是置中的卡片,不受影響) */
.p08-page--form {
  align-items: stretch;
  text-align: left;
}

.p08-page--form > * {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
}

/* 「恭喜你!」— 設計稿的紅色主標 */
.p08-congrats {
  font-weight: 900;
  font-size: clamp(26px, 8vw, 32px);
  color: var(--red-divider);
  margin: 0 0 12px;
  line-height: 1.2;
}

.p08-title {
  font-weight: 900;
  font-size: clamp(19px, 5.8vw, 22px);
  color: var(--ink);
  margin: 0 0 clamp(20px, 5vh, 40px);
  line-height: 1.5;
}

.p08-form {
  width: 100%;
  max-width: 360px;
}

.p08-field {
  margin-bottom: 16px;
}

/* T-088:欄位標籤放大一階(15 → 17px)、字重加到 900 —— 這是整頁唯一要人動手填的欄位,
   標籤太小的話使用者不確定該填什麼(主席在 iPhone 15 實測時特別圈出來) */
.p08-label {
  display: block;
  font-weight: 900;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 8px;
}

.p08-input {
  width: 100%;
  height: 60px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.65);
  font-family: 'Noto Sans TC', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  padding: 0 16px;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.p08-input::placeholder {
  color: var(--ink-muted);
  opacity: 0.6;
}

.p08-input:focus {
  outline: none;
  border-color: var(--red-accent);
}

.p08-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.p08-error {
  font-size: 13px;
  font-weight: 700;
  color: var(--red-accent);
  margin-top: 8px;
  min-height: 20px;
}

.p08-turnstile {
  margin: 16px 0 0;
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.p08-submit {
  margin: clamp(16px, 3vh, 24px) 0 20px;
  transition: background-color 0.3s, transform 0.1s;
}

.p08-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.p08-submit:not(:disabled):active {
  transform: scale(0.95) translateY(1px);
}

/* 注意事項:設計稿是「注意事項:」+ 編號清單,編號與內文靠 ol 的懸掛縮排對齊,
   換行時第二行會跟第一行的文字切齊(不會頂到編號底下)。 */
/* ---- 注意事項(T-088 改成摺頁,T-099 改成「露幾行的預覽 + 展開」)----

   主席:「先顯示兩行,然後設計一個通用的方式讓大家知道完整點一下會全部顯示出來。」
   T-088 用的原生 `<details>` 做不到這件事 —— 它收合時內容**整段不顯示**,沒有「露幾行」這個狀態。
   所以改成自寫:條文永遠在 DOM 裡,收合時用 `max-height` 裁掉、下緣用漸層遮罩淡出。

   **淡出遮罩 + 按鈕是兩份互補的提示**:遮罩負責「下面還有」的直覺(不需要讀字),
   按鈕負責「可以點」的明示。只有按鈕的話,被裁斷的那一行看起來像 bug;
   只有遮罩的話,不會有人知道要點哪裡。

   條文本身逐字照捷運提供的版本,內容集中在 `js/pages/08-form.js` 的 NOTES 陣列。 */
.p08-notes {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.7;
  text-align: left;
}

.p08-notes-title {
  margin-bottom: 4px;
  font-weight: 900;
  color: var(--ink);
}

/* 收合時露出的高度:3 行(含條列的行距)。
   用 em 不用 px —— 字級 13px 是寫在 .p08-notes 上的,em 會自己跟著走;
   寫 px 的話字級一改就變成「露 2.4 行」這種難看的裁切。
   遮罩讓最後一行淡出:**被切斷的那一行如果是硬切,看起來像壞掉,淡出才讀得出「還有更多」**。 */
.p08-notes-body {
  max-height: 5.1em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.p08-notes--open .p08-notes-body {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.p08-notes-list {
  margin: 0;
  padding-left: 1.9em;
}

.p08-notes-list li {
  margin-bottom: 6px;
}

/* 第 7 點的三個子項。原文自帶（１）（２）（３)的編號,所以清單自己不再編號 ——
   不關掉的話會變成「1. （１）…」兩層編號打架。 */
.p08-notes-sub {
  list-style: none;
  margin: 4px 0 0;
  padding-left: 0.6em;
}
.p08-notes-sub li {
  margin-bottom: 4px;
  text-indent: -0.6em;   /* 讓（１）掛在行首、續行對齊文字 */
  padding-left: 0.6em;
}

/* 條文裡的連結(第 4 點的 App 網址):在小字裡要看得出是可點的 */
.p08-notes-list a {
  color: var(--red-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;   /* 網址不換行的話會把整條撐破版 */
}

/* 展開鍵。做成一整條可點的區域而不是一個小連結 ——
   它在 13px 的小字區裡,點擊目標要自己撐出高度(padding 8px 上下 + 行高 ≈ 40px)。 */
.p08-notes-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding: 8px 0;
  border: none;
  background: none;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 900;
  color: var(--red-brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.p08-notes-toggle__icon {
  font-size: 11px;
  text-decoration: none;
}
.p08-notes-toggle:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* 成功卡 */
.p08-success-card {
  max-width: 340px;
  width: 100%;
  padding: 40px 32px;
  text-align: center;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard-card);
}

.p08-success-icon {
  font-size: clamp(44px, 13vw, 52px);
  margin-bottom: 16px;
}

/* T-061a:「完成登錄」的 OK 愛心(167×145),取代原本的 🎉 emoji */
.p08-success-art {
  display: block;
  width: min(46%, 150px);
  height: auto;
  margin: 0 auto 16px;
}

/* 限量與資格的細則,字級比主文小一階 */
.p08-success-note {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-faint);
  line-height: 1.6;
  margin: -14px 0 26px;
}

/* 擋下狀態(未完成兩關 / cpr 版不可達)共用一張卡 */
.p08-blocked-card {
  max-width: 340px;
  width: 100%;
  padding: 40px 32px;
  text-align: center;
}

.p08-blocked-icon {
  font-size: clamp(40px, 12vw, 48px);
  margin-bottom: 16px;
}

.p08-blocked-title {
  font-weight: 900;
  font-size: clamp(18px, 5.5vw, 20px);
  color: var(--ink);
  margin-bottom: 14px;
}

.p08-blocked-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 24px;
}

.p08-success-title {
  font-weight: 900;
  font-size: clamp(19px, 6vw, 22px);
  color: var(--green-success);
  margin-bottom: 14px;
}

.p08-success-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 28px;
}

.p08-success-btn {
  margin: 0;
}

/* 額滿狀態 */
.p08-full-title {
  color: var(--red-accent);
}
