﻿/* ------------------------------------------------------------------
   สไตล์ทั้งหมดของแคมเปญ GoalGolf E-Voucher
   ถอดมาจาก design "E-Voucher Golf Landing Minimal" ใน Claude Design ตรง ๆ
   (style-hover / style-focus ของ design canvas ถูกแปลงเป็น class + :hover/:focus)

   ใช้ร่วมกัน 2 หน้า : Default.aspx (ลงทะเบียน+ชำระเงิน) และ Voucher.aspx (ผลการชำระเงิน)
   ------------------------------------------------------------------ */
* { box-sizing: border-box; }
body { margin: 0; background: #fff; font-family: 'Noto Sans Thai', -apple-system, 'Helvetica Neue', Helvetica, sans-serif; -webkit-font-smoothing: antialiased; color: #1d1d1f; }
a { color: #1D6F4C; text-decoration: none; }
a:hover { color: #14563b; text-decoration: underline; text-underline-offset: 3px; }
input { font-family: inherit; }
input:focus { outline: none; }

@keyframes up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes soft { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes drift { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.008); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* จอหลัก 3 จอของ design : landing / qr / success สลับกันทั้งจอ */
[data-step] { display: none; }
[data-step].is-active { display: block; }

.nav-a { color: #1d1d1f; opacity: .85; }
.nav-a:hover { color: #1d1d1f; }

.btn-mini { min-height: 30px; padding: 0 14px; border: none; border-radius: 100px; background: #1D6F4C; color: #fff; font: 500 12.5px 'Noto Sans Thai', sans-serif; cursor: pointer; transition: opacity .2s; }
.btn-mini:hover { opacity: .82; }

.btn-cta { min-height: 48px; padding: 0 26px; border: none; border-radius: 100px; background: #1D6F4C; color: #fff; font: 500 16px 'Noto Sans Thai', sans-serif; cursor: pointer; transition: opacity .2s, transform .2s; }
.btn-cta:hover { opacity: .85; transform: translateY(-1px); }

.btn-text { min-height: 48px; padding: 0; border: none; background: none; color: #1D6F4C; font: 400 16px 'Noto Sans Thai', sans-serif; cursor: pointer; }

.btn-pay { width: 100%; min-height: 52px; border: none; border-radius: 100px; background: #1D6F4C; color: #fff; font: 500 17px 'Noto Sans Thai', sans-serif; cursor: pointer; transition: opacity .2s, transform .2s; }
.btn-pay:hover { opacity: .85; transform: translateY(-1px); }
.btn-pay[disabled] { opacity: .55; cursor: default; transform: none; }

.btn-check { width: 100%; min-height: 52px; border: none; border-radius: 100px; background: #1D6F4C; color: #fff; font: 500 16px 'Noto Sans Thai', sans-serif; cursor: pointer; margin-top: 20px; transition: opacity .2s; }
.btn-check:hover { opacity: .85; }

.btn-back { border: none; background: none; padding: 0; margin-bottom: 22px; font: 400 14px 'Noto Sans Thai', sans-serif; color: #1D6F4C; cursor: pointer; }

.btn-done { flex: 1 1 180px; min-height: 48px; border: none; border-radius: 100px; background: #1D6F4C; color: #fff; font: 500 15px 'Noto Sans Thai', sans-serif; cursor: pointer; transition: opacity .2s; }
.btn-done:hover { opacity: .85; }
.btn-outline { flex: 1 1 180px; min-height: 48px; border: 1px solid rgba(0,0,0,.14); border-radius: 100px; background: #fff; color: #1d1d1f; font: 500 15px 'Noto Sans Thai', sans-serif; cursor: pointer; }

.btn-accept { width: 100%; min-height: 50px; border: none; border-radius: 100px; background: #1D6F4C; color: #fff; font: 500 16px 'Noto Sans Thai', sans-serif; cursor: pointer; transition: opacity .2s; }
.btn-accept:hover { opacity: .85; }

.fld { min-height: 48px; width: 100%; border-radius: 12px; border: 1px solid rgba(0,0,0,.1); background: #fbfbfd; padding: 0 14px; font-size: 16px; color: #1d1d1f; transition: border-color .2s, box-shadow .2s; }
.fld:focus { border-color: #1D6F4C; box-shadow: 0 0 0 3px rgba(29,111,76,.14); }
.fld-mono { font: 400 16px 'IBM Plex Mono', monospace; letter-spacing: .06em; }

.benefit { background: #f5f5f7; border-radius: 22px; padding: clamp(26px,3vw,40px); text-align: center; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.benefit:hover { transform: scale(1.015); }

.tab { min-height: 58px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 0 15px; cursor: pointer; border-radius: 14px; text-align: left; transition: border-color .2s, background .2s; border: 1.5px solid rgba(0,0,0,.1); background: #fbfbfd; color: #1d1d1f; }
.tab.is-on { border-color: #1D6F4C; background: rgba(29,111,76,.06); }

.accept-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px; border-radius: 14px; transition: background .2s; background: #fbfbfd; border: 1px solid rgba(0,0,0,.08); }
.accept-row.is-on { background: rgba(29,111,76,.06); border-color: rgba(29,111,76,.4); }
.accept-box { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 1px; transition: background .2s; background: #fff; border: 1.5px solid rgba(0,0,0,.22); }
.accept-row.is-on .accept-box { background: #1D6F4C; border-color: #1D6F4C; }
.accept-tick { font-size: 12px; color: #fff; line-height: 1; opacity: 0; }
.accept-row.is-on .accept-tick { opacity: 1; }

.err-box { background: rgba(239,68,68,.07); border-radius: 12px; padding: 12px 14px; font: 400 13px/1.5 'Noto Sans Thai', sans-serif; color: #c0392b; animation: soft .25s ease both; }
.err-box.is-hidden { display: none; }

/* ---------- ความยินยอม PDPA (Default.aspx) ----------
   ข้อ 1-2 เลือกได้ตามใจ / ข้อ 3 บังคับ จึงมีกรอบเน้นและสถานะ error ของตัวเอง */
.pdpa-sec { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; border-radius: 14px; background: #fbfbfd; border: 1px solid rgba(0,0,0,.08); }
.pdpa-head { display: flex; flex-direction: column; gap: 3px; }
.pdpa-title { font: 500 14px 'Noto Sans Thai', sans-serif; color: #1d1d1f; }
.pdpa-sub { font: 400 12.5px 'Noto Sans Thai', sans-serif; color: #86868b; }
.pdpa-item { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.pdpa-chk { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #1D6F4C; cursor: pointer; }
.pdpa-text { font: 400 13px/1.65 'Noto Sans Thai', sans-serif; color: #6e6e73; text-wrap: pretty; }
.pdpa-no { font-weight: 500; color: #1d1d1f; }
.pdpa-req { padding: 12px; border-radius: 12px; background: rgba(29,111,76,.05); border: 1px solid rgba(29,111,76,.28); transition: background .2s, border-color .2s; }
.pdpa-req.has-err { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.45); }
.pdpa-note { margin: 7px 0 0 28px; font: 500 11.5px 'Noto Sans Thai', sans-serif; color: #1D6F4C; }
.pdpa-err { display: none; margin: 7px 0 0 28px; font: 400 11.5px 'Noto Sans Thai', sans-serif; color: #c0392b; }
.pdpa-req.has-err .pdpa-note { display: none; }
.pdpa-req.has-err .pdpa-err { display: block; }

/* ---------- แถบ "กำลังตรวจสอบอัตโนมัติ" ใต้ QR (Default.aspx) ---------- */
.qr-auto { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font: 400 12.5px 'Noto Sans Thai', sans-serif; color: #86868b; }
.qr-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #1D6F4C; animation: qrpulse 1.4s ease-in-out infinite; }
.qr-auto.is-off .qr-dot { background: #c7c7cc; animation: none; }
@keyframes qrpulse { 0%, 100% { opacity: .25; transform: scale(.75); } 50% { opacity: 1; transform: scale(1); } }

.kv { display: flex; justify-content: space-between; gap: 12px; }
.foot-a { color: #86868b; }

#termsModal { display: none; }
#termsModal.is-active { display: flex; }

/* ---------- เฉพาะหน้า Voucher.aspx ---------- */
.vc-wrap { max-width: 560px; margin: 0 auto; padding: clamp(40px,6vw,80px) clamp(18px,4vw,32px); animation: soft .3s ease both; }
.vc-code { margin-top: 10px; font: 500 clamp(22px,3vw,30px) 'IBM Plex Mono', monospace; letter-spacing: .06em; word-break: break-all; }
.vc-code.is-used { color: #86868b; text-decoration: line-through; }
.vc-badge { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 100px; font: 500 12.5px 'Noto Sans Thai', sans-serif; background: rgba(239,68,68,.09); color: #c0392b; }
.vc-notice { display: flex; flex-direction: column; gap: 12px; background: rgba(29,111,76,.06); border: 1px solid rgba(29,111,76,.28); border-radius: 16px; padding: 18px; margin-top: 22px; }
.vc-notice p { margin: 0; font: 400 13.5px/1.7 'Noto Sans Thai', sans-serif; color: #1d1d1f; }

/* เงื่อนไขการใช้ E-Voucher ท้ายหน้า Voucher.aspx — เดิมอยู่ในโมดัล ตอนนี้อ่านได้เลยไม่ต้องกดปุ่ม
   scroll-margin-top เผื่อความสูงแถบด้านบนที่เป็น sticky (48px) ตอนกดลิงก์ "เงื่อนไข" */
.vc-terms { max-width: 560px; margin: 0 auto; padding: 0 clamp(18px,4vw,32px) clamp(40px,6vw,72px); scroll-margin-top: 64px; }
.vc-terms-box { background: #f5f5f7; border-radius: 22px; padding: clamp(22px,3vw,32px); }
.vc-terms-h { margin: 0 0 18px; font: 600 clamp(17px,2vw,20px) 'Noto Sans Thai', sans-serif; letter-spacing: -.02em; }
.vc-terms-item { display: flex; gap: 14px; }
.vc-terms-item + .vc-terms-item { margin-top: 16px; }
.vc-terms-no { flex: none; font: 500 13px 'IBM Plex Mono', monospace; color: #86868b; padding-top: 2px; }
.vc-terms-item p { margin: 0; font: 400 14px/1.75 'Noto Sans Thai', sans-serif; color: #1d1d1f; text-wrap: pretty; }
