/* ============================================================================
   nhf/register.css — R107 (2026-10-15) หน้าสมัครสมาชิกแบบเดิม (classic) ใช้งานง่าย + สวยขึ้น "ในหน้าตาเดิม" (docs/task/60)
   ----------------------------------------------------------------------------
   โหลดเฉพาะ path สมัคร (utils/nhf-css.ts isRegisterPage → composables/useLegacyHead.ts nhfCssLinks — <head> + ท้าย <body> เหมือน nhf ทุกไฟล์)
   ทุก selector อยู่ใต้ .nhf-reg (= div.container ของ components/member/RegisterPage1-4.vue) ; สี/ฟอนต์/มุม/เงา = token --nhf-* ของ
   theme-override.css (ธีม default) + nhf/red.css (ธีมแดง) เท่านั้น — ไม่มีสีใหม่ ; ไม่แตะ DOM/JS เดิม (cleave/register.js/device-fp/signap)
   กติกาเจ้าของ: ตัวอักษร ≥ 17 px · จุดกด ≥ 48 px · ปุ่มหลัก ≥ 52 px · มือถือก่อน (390) และดูดีที่ 1280 · ภาษาไทยธรรมดา
   ========================================================================== */

/* ── 0. กรอบหน้า: คอลัมน์เดียวกลางจอ (มือถือเต็มจอ / จอกว้าง ≤ 760 px) ───────────── */
.nhf-reg { padding-left: 12px; padding-right: 12px; }
@media (min-width: 768px) {
  .nhf-reg.container { max-width: 760px !important; padding-bottom: 72px; } /* 72 px = พ้นแถบ #footer-member (pc-view fixed-bottom) ของหน้าเดิม */
}
.nhf-reg, .nhf-reg p, .nhf-reg label, .nhf-reg td, .nhf-reg th, .nhf-reg li, .nhf-reg small, .nhf-reg span { font-size: 17px !important; }
.nhf-reg small { font-size: inherit !important; }
.nhf-reg #contentbox { padding-top: 2px; }

/* ── 1. หัวการ์ดดำ (RegisterHeader) — มือถือ: โลโก้ + "สมัครสมาชิก" แถวเดียว ───────── */
.nhf-reg .nhf-reg-head { padding: 10px 14px !important; border-radius: var(--nhf-r) !important; }
.nhf-reg .nhf-reg-head > .row { align-items: center; flex-wrap: nowrap; }
.nhf-reg .nhf-reg-head > .row > [class*="col-"] { flex: 1 1 auto; width: auto; max-width: none; }
.nhf-reg .nhf-reg-head .indexlogo { text-align: left; }
.nhf-reg .nhf-reg-head .logoindex { width: auto; max-width: 180px; height: auto; display: block; margin: 0; }
.nhf-reg .nhf-reg-head .logoindex a { display: inline-flex; align-items: center; min-height: 48px; }
.nhf-reg .nhf-reg-head .logoindex img { width: auto; max-width: 100%; max-height: 44px; display: block; }
.nhf-reg .nhf-reg-head .logo-text-fallback { font-size: 24px !important; color: #fff; }
.nhf-reg .nhf-reg-head h3 { font-size: 22px !important; margin: 0 !important; text-align: right; white-space: nowrap; color: #fff !important; }
@media (min-width: 768px) {
  .nhf-reg .nhf-reg-head { padding: 14px 20px !important; }
  .nhf-reg .nhf-reg-head .logoindex { max-width: 220px; }
  .nhf-reg .nhf-reg-head .logoindex a { display: inline-flex; align-items: center; min-height: 48px; }
.nhf-reg .nhf-reg-head .logoindex img { max-height: 54px; }
  .nhf-reg .nhf-reg-head h3 { font-size: 26px !important; }
}

/* ── 2. ตัวบอกขั้น 3 ขั้น (1 เบอร์โทร · 2 ตั้งรหัสผ่าน · 3 เสร็จ) ──────────────────── */
.nhf-reg .nhf-reg-steps { display: flex; gap: 6px; list-style: none; margin: 10px 0 0; padding: 0; }
.nhf-reg .nhf-reg-steps li {
  flex: 1 1 0; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px;
  border-radius: var(--nhf-r-sm); background: var(--nhf-paper-2); color: var(--nhf-muted);
  font-family: var(--nhf-font-display); font-weight: 500; line-height: 1.2; border: 1px solid var(--nhf-line);
}
.nhf-reg .nhf-reg-steps li.is-current { background: var(--nhf-paper); color: var(--nhf-ink); border-color: var(--nhf-red-line); box-shadow: var(--nhf-shadow-1); }
.nhf-reg .nhf-reg-steps li.is-done { background: var(--nhf-green-soft); color: var(--nhf-green-deep); border-color: transparent; }
.nhf-reg .nhf-reg-steps__n {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--nhf-paper-3); color: var(--nhf-ink-2); font-size: 17px !important; font-weight: 500;
}
.nhf-reg .nhf-reg-steps li.is-current .nhf-reg-steps__n { background: var(--nhf-red-hi); color: #fff; }
.nhf-reg .nhf-reg-steps li.is-done .nhf-reg-steps__n { background: var(--nhf-green); color: #fff; }
.nhf-reg .nhf-reg-steps__t { font-size: 17px !important; }
@media (max-width: 479px) { /* จอแคบ: ขั้นที่ไม่ใช่ปัจจุบันโชว์แค่เลข ขั้นปัจจุบันได้พื้นที่ที่เหลือ */
  .nhf-reg .nhf-reg-steps li:not(.is-current) { flex: 0 0 auto; }
  .nhf-reg .nhf-reg-steps li:not(.is-current) .nhf-reg-steps__t { display: none; }
}

/* ── 3. การ์ดขาว + หัวข้อ + ช่องกรอก ───────────────────────────────────────────── */
.nhf-reg .nhf-reg-card { border-radius: var(--nhf-r-lg) !important; box-shadow: var(--nhf-shadow-2) !important; border-color: var(--nhf-line) !important; margin-bottom: 14px !important; }
.nhf-reg .nhf-reg-card__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 20px !important; margin: 0 0 12px !important; line-height: 1.3; }
.nhf-reg .nhf-reg-card__title .badge { font-size: 17px !important; padding: 4px 12px; line-height: 1.3; }
.nhf-reg .nhf-reg-alert {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--nhf-r-sm);
  background: var(--nhf-red-soft); border: 1px solid var(--nhf-red-line); color: var(--nhf-red-ink); font-size: 17px !important; line-height: 1.4;
}
.nhf-reg .nhf-reg-alert i { color: var(--nhf-red); margin-top: 3px; font-size: 18px !important; }
.nhf-reg .nhf-reg-alert--success { background: var(--nhf-green-soft); border-color: rgba(31, 157, 85, .3); color: var(--nhf-green-deep); }
.nhf-reg .nhf-reg-alert--success i { color: var(--nhf-green); }
.nhf-reg .nhf-reg-field { margin: 0 0 14px; }
.nhf-reg .nhf-reg-label, .nhf-reg h6 {
  display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 0; border: 0 !important;
  font-family: var(--nhf-font-display); font-weight: 500; font-size: 18px !important; color: var(--nhf-ink) !important; line-height: 1.3;
}
.nhf-reg .nhf-reg-label i { color: var(--nhf-red); font-size: 18px !important; }
.nhf-reg .form-control {
  min-height: 56px; padding: 8px 14px; font-size: 20px !important; line-height: 1.3; color: var(--nhf-ink) !important;
  border: 1.5px solid var(--nhf-line-2) !important; border-radius: var(--nhf-r-sm) !important; background: var(--nhf-paper) !important; box-shadow: none;
}
.nhf-reg .form-control:focus { border-color: var(--nhf-red) !important; box-shadow: var(--nhf-ring) !important; }
.nhf-reg .form-control::placeholder { color: var(--nhf-muted-2); font-size: 17px !important; }
.nhf-reg .form-control.is-invalid, .nhf-reg .has-error .form-control { border-color: var(--nhf-red) !important; background: var(--nhf-red-soft) !important; }
.nhf-reg .has-error #username_text, .nhf-reg .has-error #password_text, .nhf-reg .has-error #repassword_text { display: block; margin-top: 6px; }
.nhf-reg .has-error small, .nhf-reg .has-error font { font-size: 17px !important; }
.nhf-reg .nhf-reg-help { margin: 6px 0 0; color: var(--nhf-muted); font-size: 17px !important; line-height: 1.4; }
.nhf-reg .nhf-reg-help--center { text-align: center; margin-top: 12px; }
.nhf-reg .nhf-reg-help a { color: var(--nhf-red); font-weight: 500; text-decoration: underline; display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 6px; }
.nhf-reg .nhf-reg-err { margin: 6px 0 0; color: var(--nhf-red); font-size: 17px !important; font-weight: 500; line-height: 1.4; }
.nhf-reg .nhf-reg-err[hidden] { display: none; }

/* เบอร์โทร: +66 ธงไทย ติดช่องกรอกตัวใหญ่ */
.nhf-reg .nhf-reg-tel { display: flex; align-items: stretch; }
.nhf-reg .nhf-reg-tel__cc {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 0 12px; min-height: 56px;
  border: 1.5px solid var(--nhf-line-2); border-right: 0; border-radius: var(--nhf-r-sm) 0 0 var(--nhf-r-sm);
  background: var(--nhf-paper-2); color: var(--nhf-ink-2); font-family: var(--nhf-font-display); font-size: 18px !important; font-weight: 500;
}
.nhf-reg .nhf-reg-tel__cc .flag-icon { font-size: 18px !important; }
.nhf-reg .nhf-reg-tel .form-control { flex: 1 1 auto; min-width: 0; border-radius: 0 var(--nhf-r-sm) var(--nhf-r-sm) 0 !important; font-family: var(--nhf-font-display); font-size: 24px !important; letter-spacing: 1.5px; }

/* captcha: รูป + ช่อง 4 หลัก + ปุ่ม "เปลี่ยนรูป" แถวเดียว (ห่อแถวเมื่อแคบมาก) */
.nhf-reg .nhf-reg-captcha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nhf-reg .nhf-reg-captcha .captcha-image { flex: 0 0 auto; height: 56px; width: auto; max-width: 150px; cursor: pointer; border-radius: var(--nhf-r-sm); border: 1.5px solid var(--nhf-line-2); background: #fff; }
.nhf-reg .nhf-reg-captcha .form-control { flex: 1 1 96px; min-width: 96px; text-align: center; letter-spacing: 3px; font-family: var(--nhf-font-display); font-size: 24px !important; }
.nhf-reg .nhf-reg-captcha__re { flex: 0 0 auto; min-height: 56px; white-space: nowrap; }
@media (max-width: 479px) { /* จอแคบ: ปุ่ม "เปลี่ยนรูป" เป็นปุ่มไอคอน 56×56 ให้ รูป + ช่อง + ปุ่ม อยู่แถวเดียว (aria-label/title ยังบอกชื่อ ; กดที่รูปก็เปลี่ยนได้) */
  .nhf-reg .nhf-reg-captcha__re { width: 56px; min-width: 56px; padding: 0 !important; }
  .nhf-reg .nhf-reg-captcha__re-t { display: none; }
}

/* ปุ่ม: ทุกปุ่ม ≥ 48 px · ปุ่มหลักแดง ≥ 56 px */
.nhf-reg .btn { min-height: 48px; font-size: 17px !important; padding: 8px 14px !important; border-radius: var(--nhf-r-sm) !important; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.3; }
.nhf-reg .btn.btn-block { display: flex; width: 100%; }
.nhf-reg .btn-outline-dark { background: var(--nhf-paper) !important; color: var(--nhf-ink) !important; border: 1.5px solid var(--nhf-ink) !important; }
.nhf-reg .btn-outline-dark:hover, .nhf-reg .btn-outline-dark:focus { background: var(--nhf-paper-2) !important; color: var(--nhf-ink) !important; }
.nhf-reg .nhf-reg-cta { min-height: 56px; font-size: 20px !important; font-weight: 500 !important; margin-top: 4px; border-radius: var(--nhf-r) !important; box-shadow: var(--nhf-shadow-1); }
.nhf-reg .nhf-reg-cta:hover { box-shadow: var(--nhf-shadow-2); }
.nhf-reg .nhf-reg-login { text-align: center; margin: 10px 0 0; color: var(--nhf-ink-2); }
.nhf-reg .nhf-reg-login a { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 10px; color: var(--nhf-red); font-weight: 500; text-decoration: underline; }

/* รหัสผ่าน: ช่อง + ปุ่ม แสดง/ซ่อน */
.nhf-reg .nhf-reg-pw { display: flex; align-items: stretch; gap: 8px; }
.nhf-reg .nhf-reg-pw .form-control { flex: 1 1 auto; min-width: 0; }
.nhf-reg .nhf-reg-pw__eye { flex: 0 0 auto; min-height: 56px; min-width: 96px; white-space: nowrap; }

/* ── 4. ตารางอัตราจ่าย: ชิปที่กางได้ (<details>) ใต้ฟอร์ม — พับไว้ก่อน ─────────────── */
.nhf-reg .nhf-reg-rates { display: grid; gap: 8px; margin: 0 0 24px; }
@media (min-width: 768px) { .nhf-reg .nhf-reg-rates { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.nhf-reg .nhf-reg-rate { background: var(--nhf-paper); border-radius: var(--nhf-r); box-shadow: var(--nhf-shadow-1); border: 1px solid var(--nhf-line); overflow: hidden; }
.nhf-reg .nhf-reg-rate > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 52px; padding: 8px 14px; color: var(--nhf-ink); font-family: var(--nhf-font-display); font-weight: 500; line-height: 1.3;
}
.nhf-reg .nhf-reg-rate > summary::-webkit-details-marker { display: none; }
.nhf-reg .nhf-reg-rate > summary b { color: var(--nhf-red); font-size: 19px !important; font-weight: 500; }
.nhf-reg .nhf-reg-rate > summary i { color: var(--nhf-muted); font-size: 17px !important; transition: transform var(--nhf-fast) var(--nhf-ease); }
.nhf-reg .nhf-reg-rate[open] > summary { border-bottom: 1px solid var(--nhf-line); }
.nhf-reg .nhf-reg-rate[open] > summary i { transform: rotate(180deg); }
.nhf-reg .nhf-reg-rate__body { padding: 10px 12px 12px; }
.nhf-reg .nhf-reg-rate__lead { margin: 0 0 8px; text-align: center; color: var(--nhf-ink-2); }
.nhf-reg .nhf-reg-rate__lead b { color: var(--nhf-red); font-size: 22px !important; font-weight: 500; font-family: var(--nhf-font-display); }
.nhf-reg .nhf-reg-rate .table { margin: 0; }
.nhf-reg .nhf-reg-rate .table th, .nhf-reg .nhf-reg-rate .table td, .nhf-reg .nhf-reg-rate .table b, .nhf-reg .nhf-reg-rate .table small { font-size: 17px !important; }
.nhf-reg .nhf-reg-rate .table th, .nhf-reg .nhf-reg-rate .table td { padding: 8px 8px !important; vertical-align: middle; line-height: 1.3; }
.nhf-reg .nhf-reg-rate .table thead th { font-weight: 500; }

/* ── 5. หน้า OTP สำรอง (page2 — production ข้ามหน้านี้ให้เอง) ────────────────────── */
.nhf-reg .nhf-reg-otp__reflabel { color: var(--nhf-muted); }
.nhf-reg .num-pad h4 { font-size: 26px !important; letter-spacing: 2px; margin: 0 0 8px; }
.nhf-reg .label-number { display: flex; justify-content: center; gap: 8px; margin: 0 0 8px; }
.nhf-reg label.number { width: 56px; height: 64px; margin: 0; border-radius: var(--nhf-r-sm); font-size: 32px !important; line-height: 64px; }
.nhf-reg .key-pad .btn { min-height: 56px; font-size: 22px !important; }
.nhf-reg .key-pad .btn-reset { font-size: 17px !important; }
.nhf-reg .nhf-reg-otp__resend { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 14px; padding-top: 12px; border-top: 1px solid var(--nhf-line); }
.nhf-reg .nhf-reg-otp__resend b { font-family: var(--nhf-font-display); font-weight: 500; font-size: 19px !important; }

/* ── 6. หน้าสำเร็จ ───────────────────────────────────────────────────────────────── */
.nhf-reg .nhf-reg-success { text-align: center; padding: 6px 0 2px; }
.nhf-reg .nhf-reg-success__icon { display: block; font-size: 72px !important; line-height: 1; }
.nhf-reg .nhf-reg-success h4 { font-size: 24px !important; margin: 8px 0 0 !important; }
.nhf-reg .nhf-reg-cred { margin: 14px 0; padding: 12px; text-align: center; background: var(--nhf-paper-2); border: 1px solid var(--nhf-line); border-radius: var(--nhf-r); }
.nhf-reg .nhf-reg-cred h5 { font-size: 18px !important; margin: 0 0 8px; }
.nhf-reg .nhf-reg-cred hr { margin: 8px 0; }
.nhf-reg .nhf-reg-cred table { margin: 0 auto; }
.nhf-reg .nhf-reg-cred td { padding: 4px 8px; text-align: left; font-family: var(--nhf-font-display); font-size: 20px !important; }
.nhf-reg .badge { font-size: 17px !important; }
.nhf-reg .nhf-reg-cred td .badge { padding: 6px 10px; }
.nhf-reg .nhf-reg-cred__ref, .nhf-reg .nhf-reg-cred__memo { margin: 8px 0 0; line-height: 1.45; }
.nhf-reg .nhf-reg-cred__memo a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; color: var(--nhf-red); font-weight: 500; text-decoration: underline; }
.nhf-reg .nhf-reg-cred__band { border-radius: var(--nhf-r-sm); padding: 8px 10px !important; line-height: 1.4; }
.nhf-reg .nhf-reg-actions { display: grid; gap: 10px; margin-top: 12px; }
.nhf-reg .nhf-reg-actions .btn { min-height: 56px; font-size: 20px !important; font-weight: 500 !important; border-radius: var(--nhf-r) !important; }
@media (min-width: 768px) { .nhf-reg .nhf-reg-actions { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
