/* Start custom CSS for section, class: .elementor-element-cffb7d3 *//* =========================================================
   MEGA168 LOGIN - FINAL FIX
   ใช้แทน CSS แก้เดิมทั้งหมด
========================================================= */

/* เผื่อ widget / container ของ Elementor ตัดเนื้อหา */
.elementor-1026 .elementor-element.elementor-element-cffb7d3,
.elementor-1026 .elementor-element.elementor-element-cffb7d3 .elementor-widget-container {
    overflow: visible !important;
}

/* =========================
   BASE
========================= */
.mega168-login-page,
.mega168-login-page * {
    box-sizing: border-box;
}

.mega168-login-page {
    position: relative;
    width: 100%;
    min-height: 100vh !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    background: #fff;
}

.mega168-login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh !important;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 12px 40px !important;
}

.mega168-login-card {
    width: min(720px, calc(100% - 20px)) !important;
    max-width: 100%;
    height: auto !important;
    min-height: 860px !important;
    overflow: hidden !important;
    padding-bottom: 34px !important;
    border-radius: 42px !important;
}

.mega168-logo {
    padding-top: 88px !important;
}

.mega168-logo img {
    width: 300px !important;
    max-width: 50% !important;
    height: auto !important;
}

.mega168-form {
    width: min(640px, calc(100% - 46px)) !important;
    max-width: 100%;
    margin: 118px auto 0 !important;
    padding-bottom: 8px !important;
}

.mega168-login-title {
    margin: 0 0 14px !important;
    font-size: 30px !important;
    line-height: 1.25 !important;
}

.mega168-field {
    margin-bottom: 16px !important;
}

.mega168-field-label {
    font-size: 14px !important;
    padding: 4px 14px !important;
}

.mega168-input {
    width: 100% !important;
    max-width: 100% !important;
    height: 54px !important;
}

.mega168-actions {
    width: 300px !important;
    max-width: 100% !important;
    margin: 26px auto 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.mega168-btn {
    width: 100% !important;
    min-height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 20 !important;
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 1025px) {

    .mega168-login-page {
        min-height: 980px !important;
    }

    .mega168-login-wrapper {
        min-height: 980px !important;
        padding: 28px 16px 55px !important;
    }

    .mega168-login-card {
        width: min(720px, calc(100% - 40px)) !important;
        min-height: 880px !important;
        padding-bottom: 40px !important;
        border-radius: 44px !important;
    }

    .mega168-logo {
        padding-top: 92px !important;
    }

    .mega168-logo img {
        width: 310px !important;
        max-width: 46% !important;
    }

    .mega168-form {
        width: min(640px, calc(100% - 56px)) !important;
        margin: 120px auto 0 !important;
    }

    .mega168-login-title {
        font-size: 31px !important;
        margin-bottom: 12px !important;
    }

    .mega168-actions {
        margin-top: 24px !important;
    }
}

/* =========================
   TABLET
========================= */
@media (min-width: 768px) and (max-width: 1024px) {

    .mega168-login-page {
        min-height: 900px !important;
    }

    .mega168-login-wrapper {
        min-height: 900px !important;
        padding: 24px 12px 50px !important;
    }

    .mega168-login-card {
        width: min(620px, calc(100% - 24px)) !important;
        min-height: 780px !important;
        border-radius: 36px !important;
        padding-bottom: 34px !important;
    }

    .mega168-logo {
        padding-top: 74px !important;
    }

    .mega168-logo img {
        width: 270px !important;
        max-width: 56% !important;
    }

    .mega168-form {
        width: calc(100% - 34px) !important;
        margin: 96px auto 0 !important;
    }

    .mega168-login-title {
        font-size: 27px !important;
    }

    .mega168-actions {
        width: 280px !important;
        margin-top: 22px !important;
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 767px) {

    /* สำคัญมาก: กันเมนูบน/ล่างของธีมบัง */
    .mega168-login-page {
        min-height: 100svh !important;
    }

    .mega168-login-wrapper {
        min-height: 100svh !important;
        padding: 88px 0 98px !important;
    }

    .mega168-login-card {
        width: calc(100% - 8px) !important;
        max-width: none !important;
        min-height: 600px !important;
        height: auto !important;
        padding-bottom: 24px !important;
        border-radius: 24px !important;
    }

    .mega168-logo {
        padding-top: 44px !important;
    }

    .mega168-logo img {
        width: 205px !important;
        max-width: 68% !important;
    }

    .mega168-form {
        width: calc(100% - 18px) !important;
        margin: 72px auto 0 !important;
        padding-bottom: 0 !important;
    }

    .mega168-login-title {
        font-size: 20px !important;
        margin-bottom: 10px !important;
    }

    .mega168-field {
        margin-bottom: 12px !important;
    }

    .mega168-field-label {
        font-size: 12px !important;
        padding: 4px 11px !important;
        margin-left: 4px !important;
        border-radius: 8px !important;
    }

    .mega168-input {
        height: 45px !important;
        font-size: 14px !important;
        padding-left: 42px !important;
        padding-right: 14px !important;
    }

    .mega168-input-icon {
        left: 14px !important;
    }

    .mega168-input-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .mega168-actions {
        width: calc(100% - 70px) !important;
        max-width: 240px !important;
        margin: 24px auto 0 !important;
        gap: 10px !important;
    }

    .mega168-btn {
        min-height: 43px !important;
        font-size: 14px !important;
    }

    /* มือถือของขวัญชนฟอร์ม เลยซ่อนไปก่อน */
    .mega168-gift-link {
        display: none !important;
    }

    /* ปรับโลก / ดาว / คลื่นให้ไม่กินพื้นที่เกิน */
    .mega168-world {
        width: 280px !important;
        right: -78px !important;
        top: 22px !important;
        opacity: .38 !important;
    }

    .mega168-stars {
        width: 220px !important;
        height: 200px !important;
        top: 145px !important;
    }

    .mega168-wave {
        width: 126% !important;
        max-width: none !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: -3px !important;
    }
}

/* =========================
   VERY SMALL MOBILE
========================= */
@media (max-width: 390px) {

    .mega168-login-wrapper {
        padding-top: 84px !important;
        padding-bottom: 96px !important;
    }

    .mega168-login-card {
        width: calc(100% - 4px) !important;
        min-height: 585px !important;
        border-radius: 20px !important;
    }

    .mega168-logo {
        padding-top: 38px !important;
    }

    .mega168-logo img {
        width: 190px !important;
        max-width: 66% !important;
    }

    .mega168-form {
        width: calc(100% - 14px) !important;
        margin-top: 66px !important;
    }

    .mega168-login-title {
        font-size: 18px !important;
    }

    .mega168-actions {
        width: calc(100% - 76px) !important;
        max-width: 220px !important;
    }
}
/* =========================================
   FIX ICON + TEXT ไม่ให้ทับกัน
========================================= */

.mega168-input-box {
    position: relative !important;
    width: 100% !important;
}

.mega168-input-icon {
    position: absolute !important;
    left: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;

    width: 24px !important;
    height: 24px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    z-index: 5 !important;
    pointer-events: none !important;
}

.mega168-input-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

/* เว้นพื้นที่ด้านซ้ายให้ไอคอน */
.mega168-input {
    width: 100% !important;

    padding-left: 58px !important;
    padding-right: 18px !important;

    text-indent: 0 !important;

    line-height: normal !important;
}

/* Placeholder */
.mega168-input::placeholder {
    padding-left: 0 !important;
    text-indent: 0 !important;
}


/* =========================================
   TABLET
========================================= */
@media (min-width: 768px) and (max-width: 1024px) {

    .mega168-input-icon {
        left: 17px !important;
    }

    .mega168-input {
        padding-left: 55px !important;
    }
}


/* =========================================
   MOBILE
========================================= */
@media (max-width: 767px) {

    .mega168-input-icon {
        left: 16px !important;

        width: 21px !important;
        height: 21px !important;
    }

    .mega168-input-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .mega168-input {
        padding-left: 50px !important;
        padding-right: 14px !important;

        font-size: 14px !important;
    }
}


/* มือถือจอเล็ก */
@media (max-width: 390px) {

    .mega168-input-icon {
        left: 14px !important;
    }

    .mega168-input {
        padding-left: 47px !important;
    }
}/* End custom CSS */
/* Start custom CSS */.elementor-widget-image a {
display: block !important;
}/* End custom CSS */