/**
 * ฐาน responsive ทุกอุปกรณ์ — โหลดหลัง Bootstrap
 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

/* iPhone / notch — หลีก bottom fixed bar */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* ลดความหน่วงแตะบนบางเบราว์เซอร์มือถือ */
button,
a,
.wm-btn,
.vela-btn,
.wm-category,
.vela-nav-link {
    touch-action: manipulation;
}

/* ตารางในเนื้อหา — ให้เลื่อนแนวนอนแทนล้นจอ */
.table-responsive,
.wm-main,
.m007-main {
    max-width: 100%;
}

/**
 * Chrome / Safari / Edge: autofill ใส่พื้นหลังสว่างทับธีมมืด — บังคับให้เข้มและตัวอักษรอ่านได้
 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(22, 22, 28, 0.96) inset !important;
    box-shadow: 0 0 0 1000px rgba(22, 22, 28, 0.96) inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc;
    transition: background-color 99999s ease-out;
}

/* สีน้ำเงินเฉพาะฟอร์มในโลบี้ WM — ห้ามใช้กับโมดัลสมัคร (อยู่นอก .wm-clone-page) เลยไม่กลายคนละสีกับช่องอื่น */
body.wm-clone-mode .wm-clone-page input:-webkit-autofill,
body.wm-clone-mode .wm-clone-page textarea:-webkit-autofill,
body.wm-clone-mode .wm-clone-page select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(12, 32, 70, 0.98) inset !important;
    box-shadow: 0 0 0 1000px rgba(12, 32, 70, 0.98) inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* ถ้าเบราว์เซอร์จับความสำคัญผิด ย้ำให้โมดัลใช้โทนเดียวกับ .modern-input-group */
body.wm-clone-mode .auth-modal-card input:-webkit-autofill,
body.wm-clone-mode .auth-modal-card input:-webkit-autofill:hover,
body.wm-clone-mode .auth-modal-card input:-webkit-autofill:focus,
body.wm-clone-mode .auth-modal-card textarea:-webkit-autofill,
body.wm-clone-mode .auth-modal-card select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(28, 28, 34, 0.98) inset !important;
    box-shadow: 0 0 0 1000px rgba(28, 28, 34, 0.98) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #fff;
    transition: background-color 99999s ease-out;
}

/* ป๊อปอัพประกาศหน้าเว็บ (SweetAlert2) */
.site-popup-swal {
    border: 1px solid rgba(242, 201, 76, 0.25);
    border-radius: 16px;
}

.site-popup-swal .site-popup-ok {
    background: linear-gradient(135deg, #f4d06a 0%, #f0b429 100%) !important;
    color: #1a1203 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.5rem 1.75rem !important;
    font-weight: 600 !important;
}
