/* ==========================================================================
   form.css｜ASPX 版索取資料表單（僅 261118_AI_Office.aspx 載入）
   讓 Web Forms 控制項（CheckBoxList / RadioButtonList / Validator / Button）
   沿用 HTML 版 .apply 表單的視覺；結構比照 20261104_AIPM。
   ========================================================================== */

/* Panel1 包住所有欄位，維持 .apply 原本的區塊間距 */
.aspx-form .form-panel {
  display: grid;
  gap: 28px;
}

/* --------------------------------------------------------------------------
   課程複選（CheckBoxList RepeatLayout="UnorderedList"）
   -------------------------------------------------------------------------- */
.aspx-form .pick-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aspx-form .pick-list li,
.aspx-form .chips li {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color .2s, background .2s;
}

.aspx-form .pick-list li:hover { border-color: var(--lc); }
.aspx-form .chips li:hover { border-color: var(--blue); }

.aspx-form .pick-list li:has(input:checked) {
  border-color: var(--lc);
  background: var(--blue-soft);
}

.aspx-form .chips li:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.aspx-form .pick-list input,
.aspx-form .chips input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0 0 0 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* label 撐滿整列，點文字或空白處都能勾選 */
.aspx-form .pick-list label {
  flex: 1;
  padding: 12px 16px 12px 12px;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   訓練中心（RadioButtonList RepeatLayout="UnorderedList"）
   -------------------------------------------------------------------------- */
.aspx-form .chips {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aspx-form .chips label {
  display: block;
  flex: 1;
  padding: 12px 16px 12px 12px;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   驗證碼圖片（~/GenValidationCode_style3.aspx）
   -------------------------------------------------------------------------- */
.aspx-form .cap-row .captcha {
  flex: none;
  display: flex;
}

.aspx-form .cap-row .captcha img {
  display: block;
  width: auto;
  max-width: 168px;
  height: 54px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

/* --------------------------------------------------------------------------
   驗證訊息（Validator CssClass="err" Display="Dynamic"）
   -------------------------------------------------------------------------- */
.aspx-form .fld:has(.err:not([style*="none"])) :is(input[type="text"], input[type="tel"], input[type="email"]) {
  border-color: var(--red-pen);
  box-shadow: 0 0 0 4px rgba(194, 69, 58, .1);
}

/* --------------------------------------------------------------------------
   送出按鈕（asp:Button → input[type=submit]）
   -------------------------------------------------------------------------- */
.aspx-form input.submit {
  font: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  appearance: none;
}

/* --------------------------------------------------------------------------
   系統訊息與成功視窗
   -------------------------------------------------------------------------- */
.aspx-form .form-message {
  padding: 16px 20px;
  border: 1px solid var(--red-pen);
  border-radius: 12px;
  background: #fbeceb;
  color: var(--red-pen);
  font-weight: 700;
  text-align: center;
}

.aspx-form .form-message p { margin: 0; }

.success-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.success-modal[hidden] { display: none; }

.success-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 35, 58, .6);
}

.success-modal__dialog {
  position: relative;
  width: min(100%, 420px);
  padding: 40px 28px 34px;
  border: 2px solid #0f1c31;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 10px 10px 0 #0f1c31;
  color: var(--ink);
  text-align: center;
}

.success-modal__dialog p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
}

.success-modal__dialog .success-modal__sub {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--slate);
}

.success-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 1.875rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 480px) {
  .aspx-form .cap-row .captcha img { height: 46px; }
}
