﻿/* ============================= */
/* FONT : LINE Seed Sans TH */
/* ============================= */

/*@font-face {
    font-family: 'LINESeedTH';
    src: url('/fonts/LINESeedSansTH_W_Th.woff') format('woff');
    font-weight: 200;
}

@font-face {
    font-family: 'LINESeedTH';
    src: url('/fonts/LINESeedSansTH_W_Rg.woff') format('woff');
    font-weight: 400;
}

@font-face {
    font-family: 'LINESeedTH';
    src: url('/fonts/LINESeedSansTH_W_Bd.woff') format('woff');
    font-weight: 700;
}

@font-face {
    font-family: 'LINESeedTH';
    src: url('/fonts/LINESeedSansTH_W_XBd.woff') format('woff');
    font-weight: 800;
}

@font-face {
    font-family: 'LINESeedTH';
    src: url('/fonts/LINESeedSansTH_W_He.woff') format('woff');
    font-weight: 900;
}
*/


/* ============================= */
/* BASE */
/* ============================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'LINESeedTH', sans-serif;
    background: #f4f6f9;
    min-height: 100vh;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.page-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: auto;
    padding-left: 10px;
    padding-right: 10px;
}

@media (max-width: 480px) {

    body {
        padding: 2px;
    }

    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ============================= */
/* LOGO */
/* ============================= */

.logo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

    .logo img {
        max-height: 120px;
        width: auto;
    }



/* ============================= */
/* CARD */
/* ============================= */

.card {
    width: 100%;
    max-width: 500px;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,.04);
    margin: 0 auto; /* ทำให้กลางจอ */
}

/* ============================= */
/* LICENSE PLATE */
/* ============================= */

.plate {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}


/* ============================= */
/* INFO */
/* ============================= */

.info {
    margin-top: 14px;
}

    .info .row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 4px;
        font-size: 14px;
        line-height: 1.6;
    }

        .info .row span:first-child {
            width: 45%;
            text-align: left;
            color: #555;
        }

        .info .row span:last-child {
            width: 55%;
            text-align: right;
            font-weight: 500;
        }

        .info .row.gray {
            background: #f2f3f5;
            padding: 12px 14px;
            border-radius: 10px;
        }

/* ============================= */
/* PRICE BOX */
/* ============================= */

.price-box {
    margin-top: 10px;
    background: #f8f9fb;
    padding: 16px;
    border-radius: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    padding: 6px 0;
}

.divider {
    height: 1px;
    background: #e5e5e5;
    margin: 12px 0;
}

.price-row.total {
    font-size: 18px;
    font-weight: 800;
}

    .price-row.total span:last-child {
        font-size: 22px;
        color: #d40000;
    }




/* ============================= */
/* EMAIL */
/* ============================= */

textarea {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 8px;
}



/* ============================= */
/* BUTTON GROUP */
/* ============================= */

#home_bt {
    margin-top: 22px;
}



/* ============================= */
/* PAY BUTTON */
/* ============================= */

.btn-pay {
    width: 100%;
    height: 48px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 28px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
}



/* ============================= */
/* RECEIPT BUTTON */
/* ============================= */

.btn-receipt {
    width: 100%;
    height: 44px;
    margin-top: 10px;
    background: #2f8df5;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
}



/* ============================= */
/* QR SECTION */
/* ============================= */

.qr-box {
    margin-top: 24px;
    text-align: center;
}

    .qr-box img {
        width: 260px;
        height: auto;
        margin-bottom: 12px;
    }



/* ============================= */
/* QR BUTTONS */
/* ============================= */

.btn-check {
    width: 100%;
    height: 44px;
    margin-top: 10px;
    background: #0047cc;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-weight: 700;
}

.btn-dark {
    width: 100%;
    height: 44px;
    margin-top: 10px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 24px;
}

.btn-cancel {
    width: 100%;
    height: 44px;
    margin-top: 10px;
    background: #e00000;
    color: #fff;
    border: none;
    border-radius: 24px;
}



/* ============================= */
/* CONDITION */
/* ============================= */

.condition {
    text-align: center;
    margin-top: 20px;
}

    .condition a {
        color: #d40000;
        font-size: 14px;
        cursor: pointer;
    }



/* ============================= */
/* LOADER */
/* ============================= */

.loader-container {
    margin: 12px 0;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e00000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



/* ============================= */
/* UTIL */
/* ============================= */

.hidden {
    display: none !important;
}



/* ============================= */
/* MOBILE */
/* ============================= */

@media (max-width:480px) {

    body {
        padding: 20px 12px;
    }

    .card {
        padding: 18px;
    }

    .price-row.total span:last-child {
        font-size: 20px;
    }
}

.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 6px;
}


.footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: #777;
}

.secondary-btn {
    width: 100%;
    height: 44px;
    border-radius: 22px;
    border: 1px solid #ddd;
    background: #fff;
    margin-top: 10px;
    cursor: pointer;
    font-size: 15px;
}

.line-btn {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    border: none;
    background: #06C755;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* ============================= */
/* MEMBER */
/* ============================= */

.member-box {
    margin-top: 20px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    padding: 18px;
    border-radius: 16px;
}

.member-header {
    display: flex;
    flex-direction: column;
}

@media (min-width:768px) {
    .member-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.member-title {
    font-weight: 700;
    font-size: 15px;
}

.member-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.btn-member {
    margin-top: 12px;
    background: #06C755;
    /*background:#bfbe01;*/
    color: #fff;
    border: none;
    height: 46px;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
}

@media (min-width:768px) {
    .btn-member {
        margin-top: 0;
        width: auto;
        padding: 0 18px;
    }
}

.btn-member.loading {
    opacity: .6;
    pointer-events: none;
}

.btn-member.disabled {
    background: #ccc;
    pointer-events: none;
}


/* ============================= */
/* LOADING OVERLAY */
/* ============================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-box {
    background: #fff;
    padding: 25px 30px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e00000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: auto;
}

.loading-text {
    margin-top: 10px;
    font-size: 14px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================= */
/* QR MODAL */
/* ============================= */


.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
}

/* modal card */

.qr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 18px;
    width: 320px;
    max-width: 90%;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,.2);
}

/* header */

.qr-header {
    position: relative;
    padding: 0;
    background: #00427A;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: center; /* กลางแนวนอน */
    align-items: center; /* กลางแนวตั้ง */
}

/* logo */

.qr-logo {
    width: 70%;
    height: 80px;
    object-fit: cover;
    display: block;
    position: center;
    max-width: 90%;
}

/* close */

.qr-close {
    position: absolute;
    right: 12px;
    top: 8px;
    font-size: 22px;
    cursor: pointer;
    color: #fff;
}

/* body */

.qr-body {
    padding: 20px;
}

.qr-image {
    width: 240px;
}

/* footer */

.qr-footer {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.swal2-container {
    z-index: 99999 !important;
}
