/* --- 1. โครงสร้างหลัก (Main Structure) --- */
.payment-outer-wrapper {
    background-color: #f7f3e9;
    padding: 60px 0;
}

.payment-main-headline {
    text-align: center;
    font-weight: 600;
    font-size: 2.4rem;
    margin-bottom: 50px;
    color: #1a1a1a;
}

.payment-content-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
}

/* --- 2. ฝั่งซ้าย (Sidebar Information) --- */
.payment-info-column { padding: 50px; }

.info-question-text {
    text-align: center;
    font-size: 24px;
    line-height: 1.6;
    color: #555;
    font-weight: 400;
    margin-bottom: 35px;
    margin-top: 35px;
}

.contact-methods-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.contact-pills-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.contact-pill-box {
    background: #f8f0e5;
    border: 1px solid #f2e8d5;
    padding: 5px 35px;
    border-radius: 50px;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.contact-pill-box i {
    background-color: #28a745;
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.line-link-wrapper {
    text-decoration: none !important; /* กำจัดเส้นใต้เด็ดขาด */
    color: inherit !important;       /* ใช้สีเดิมของข้อความ ไม่ใช้สีน้ำเงิน */
    display: inline-block !important; /* ล็อกขนาดและตำแหน่งให้คงที่ */
    border: none !important;          /* ป้องกันเส้นขอบรูปภาพ */
    outline: none !important;
}

.line-qr-wrapper img {
    width: 157px;
    height: 157px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0px 5px 3px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 30px auto 0;
}

.line-id-text { margin-top: 5px; font-size: 14px; color: #333; text-align: center; }
.office-hours-text { text-align: center; font-size: 16px; color: #888; margin-bottom: 40px; }

.sidebar-bank-card { position: relative; max-width: 320px; margin: 0 auto; }
.scb-img { width: 100%; display: block; border-radius: 10px; }

.payment-copy-btn {
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffab2d;
    border: none;
    padding: 5px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    
    /* 🚩 เพิ่มตรงนี้เพื่อให้ปุ่มไม่ขยับเวลาข้อความเปลี่ยน */
    min-width: 110px; 
    transition: all 0.2s ease;
}

.payment-copy-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}
/* --- 3. ฝั่งขวา (Form Section) --- */
.payment-form-column { padding: 50px; }
.custom-input-group { margin-bottom: 22px; }
.custom-input-group label { display: block; font-size: 0.9rem; margin-bottom: 8px; color: #333; font-weight: 500; }
.custom-input-group input { width: 100%; border: 1px solid #e8e8e8; border-radius: 6px; padding: 10px 15px; font-size: 0.95rem; }
.req { color: #cc0000; }

.slip-upload-area {
    border: 1px solid #ccc;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    background: #fafafa;
    color: #999;
    cursor: pointer;
}

.slip-upload-area i { font-size: 1.8rem; margin-bottom: 10px; display: block; }

.btn-confirm-payment {
    background-color: #ffab2d;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: #ffffff;
    cursor: pointer;
    display: inline-block; 
    width: auto;  
}

/* --- 4. บทความที่น่าสนใจ (Articles) --- */
.articles-section { margin-top: 80px; padding-bottom: 80px; }
.articles-title { text-align: center; font-weight: normal; font-size: 48px; margin-bottom: 40px; color: #000; }
.articles-list { max-width: 1300px; margin: 0 auto; }

.article-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #aaa;
    text-decoration: none;
    color: #000;
    font-size: 25px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.article-row:last-child { border-bottom: 1px solid #aaa; }
.article-row:hover { color: #fbab00 !important; transform: translateX(6px); }
.article-row i { color: #000; font-size: 1.2rem; transition: color 0.2s; }
.article-row:hover i { color: #fbab00; }

/* --- 5. ยุบรวมส่วนลบขอบดำ (Clean Focus States) --- */
input:focus, 
input:focus-visible, 
button:focus, 
button:focus-visible, 
.article-row:focus,
.copy-acc-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* เฉพาะ input ให้มีเส้นสีส้มเวลาพิมพ์ */
.custom-input-group input:focus {
    border-color: #ffab2d;
    box-shadow: 0 0 0 2px rgba(255, 171, 45, 0.1) !important;
}

/* --- 6. Responsive Design (ขยายเต็มขอบมือถือ) --- */
@media (max-width: 991px) {
    .payment-info-column { border-right: none; border-bottom: 1px solid #eee; }
}

@media (max-width: 768px) {
    /* 1. ขยาย Card ให้เต็มขอบจอและลบ Padding ชั้นนอกออก */
    .payment-outer-wrapper { 
        padding: 0 !important; 
    }

    /* บังคับให้ Container ชั้นนอกสุดกว้าง 100% ไม่ติดขอบข้าง */
    .page-container, .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 2. สลับลำดับ: ให้ฟอร์มขึ้นก่อน (ใช้ Flex Column-Reverse) */
    .payment-content-card .row {
        display: flex;
        flex-direction: column-reverse; /* ดันคอลัมน์ขวา (Form) ขึ้นไปข้างบน */
    }

    .payment-content-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* 3. จัดการพื้นที่ภายในคอลัมน์ */
    .payment-info-column, 
    .payment-form-column {
        padding: 30px 20px !important; /* เว้นช่องว่างแค่ด้านในสำหรับเนื้อหา */
        width: 100% !important;
    }

    /* 4. ปรับแต่งฟอร์ม (ส่วนบน) */
    .btn-confirm-payment {
        width: 100%; /* ปุ่มยืนยันชำระเงินเต็มกว้างในมือถือ */
        margin-bottom: 20px;
    }

    /* 5. ปรับแต่งข้อมูลติดต่อ (ส่วนล่าง) */
    .contact-methods-flex {
        flex-direction: column; /* วางเบอร์โทรกับ QR ซ้อนกัน */
        gap: 20px;
        align-items: center;
    }

    .info-question-text {
        font-size: 18px !important;
        margin-bottom: 25px;
    }

    .line-qr-wrapper img {
        margin-top: 10px; /* ลดระยะห่างด้านบนของ QR */
    }

    /* 6. ส่วนบทความ (FAQ) ให้เส้น Border แผ่ทะลุขอบ */
    .articles-section {
        padding: 40px 0 !important;
        margin-top: 20px;
    }

    .articles-title {
        font-size: 1.8rem;
        padding: 0 20px; /* ให้หัวข้อเว้นจากขอบจอเล็กน้อย */
    }

    .article-row {
        padding: 20px 20px; /* เส้น Border จะยาวชนขอบจอ */
        font-size: 1.1rem;
    }
    .articles-title {
        font-size: 24px;
    }
    .payment-main-headline {
        font-size: 28px;
        font-weight: normal !important;
        padding-top: 35px;
        margin-bottom: 30px;
    }
}