﻿/* เกี่ยวกับ (การเลือก "แท็บ" อยู่ใน Main เพราะใช้ร่วมกันกับ "ระบบ: ร้านช้อป") */
/* * */

/* ส่วนของ "ป้าย" บนปุ่มแท็บเมนู */
.allmember-tab-text {
    position: relative;
    display: inline-block;
}
.recharge-new-badge {
    position: absolute;
    top: -7px;
    right: -65px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .recharge-new-badge {
        top: -5px;
        right: -50px;
		font-size: 0.55rem;
		padding: 2px 6px;
    }
}
/* ===================================== */

/* เกี่ยวกับ (รายละเอียดเพิ่มเติม - เติมเงินสำเร็จแล้ว!) */
.details-table {
    font-size: 11px;
	text-align: center;
	border-collapse: collapse;
    width: 100%;
    max-width: auto;
    table-layout: fixed;
}
.details-table, .details-table th, .details-table td {
    border: 0.105rem solid #000000;
}
.details-table th, .details-table td {
    border: 0.105rem solid #000000;
    padding: 1px;
    text-align: center;
}
.details-table th {
    padding: 4px;
    background-color: #ffffd8;
}

/* เกี่ยวกับ (ข้อมูลการชำระเงิน) */
.details-recharge-table {
    font-size: 12px;
	text-align: center;
	border-collapse: collapse;
    width: 98%;
    max-width: auto;
    table-layout: fixed;
}
.details-recharge-table, .details-recharge-table th, .details-recharge-table td {
    border: 2px solid #000000;
}
.details-recharge-table th, .details-recharge-table td {
    border: 2px solid #000000;
    padding: auto;
    text-align: center;
}
.details-recharge-table th {
    padding: 7px;
    background-color: #ffffd8;
}
.left-column {
    background-color: #ffcebc; /* สีพื้นหลังของหัวข้อ */
    font-weight: bold; /* เพิ่มความหนาของข้อความเพื่อให้โดดเด่น */
}
.right-column {
    background-color: #f5f5f5; /* สีพื้นหลังของผลลัพธ์ */
    color: green; /* สีข้อความของผลลัพธ์ */
}


/* เกี่ยวกับ (วิธีการสร้างลิงก์) */
.btn-create-gift-link {
    background-color: #6c757d;
    border-color: #6c757d;
	color: #ffffff;
    cursor: pointer;
    border-radius: 5px;
    font-size: 13.5px;
    margin-top: 5px;
	margin-bottom: 5px;
	width: 100%;
	height: 37px;
}
.btn-create-gift-link:hover {
    background-color: #5a6268;
	border-color: #5a6268;
}

.create-gift-link-container {
    margin-top: 8px;
	max-height: 500px; /* ปรับความสูงของช่องที่เลื่อน */
    overflow-x: hidden; /* ทำให้สามารถเลื่อน.. ซ้าย-ขวา ได้ */
	overflow-y: auto; /* ทำให้สามารถเลื่อน.. ขึ้น-ลง ได้ */
	-webkit-overflow-scrolling: touch; /* สำหรับการเลื่อนที่ราบรื่นบนอุปกรณ์มือถือ */
	background-color: #aaffff;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.7);
    border-radius: 3px;
    padding: 10px;
}
.create-gift-link-details {
	background-color: #ceffe6;
    box-shadow: 0 1px 5px rgba(0,0,0,0.5);
    border-radius: 3px;
    border: 1px solid #000;
    padding: 10px;
}
.btn-prev-create-gift-link {
    background-color: #c37e00;
    border-color: #c37e00;
	color: #ffffff;
    cursor: pointer;
    border-radius: 5px;
    font-size: 13.5px;
    margin-top: 15px;
    margin-right: 3px;
    width: 100%;
	height: 37px;
}
.btn-prev-create-gift-link:hover {
    background-color: #ae7000;
    border-color: #ae7000;
}
.btn-next-create-gift-link {
    background-color: #008bcd;
    border-color: #008bcd;
	color: #ffffff;
    cursor: pointer;
    border-radius: 5px;
    font-size: 13.5px;
    margin-top: 15px;
    width: 100%;
	height: 37px;
}
.btn-next-create-gift-link:hover {
    background-color: #007ab3;
    border-color: #007ab3;
}
.btn-close-create-gift-link {
    background-color: #343a40;
    border-color: #343a40;
	color: #ffffff;
    cursor: pointer;
    border-radius: 5px;
    font-size: 13.5px;
    margin-top: 15px;
    width: 100%;
	height: 37px;
}
.btn-close-create-gift-link:hover {
    background-color: #23272b;
    border-color: #23272b;
}

.card-title-recharge {
    font-size: 1.1rem;
	text-align: center;
}
@media (max-width: 768px) {
    .card-title-recharge {
        font-size: 0.9rem;
    }
    
}


/* เกี่ยวกับ (การแสดงรูปภาพซ้อนทับที่ QR code) */
/* กำหนดรูปภาพที่โค้ด JS ใน function getPaymentDetails(id_pay) { */
.qr-container {
    position: relative; /* ทำให้ตำแหน่งภายในสามารถอ้างอิงได้ */
    display: inline-block; /* ช่วยให้จัดกึ่งกลางได้ดีขึ้น */
}
.qr-overlay-image {
    position: absolute; /* กำหนดตำแหน่งสัมพัทธ์กับ .qr-container */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* จัดกึ่งกลางเป๊ะๆ */
    width: 8%; /* กำหนดขนาดตามต้องการ */
    height: 8%; /* กำหนดขนาดตามต้องการ */
    z-index: 10; /* ให้รูปภาพอยู่ด้านบน QR Code */
}

/* เกี่ยวกับ (อัตราเติมเงิน) */
.badge {
    font-size: 0.75em;
    vertical-align: middle;
    animation: pulse 0.7s infinite;
	color: #ffffff;
	background-color: #ff0000;
}
.badge-mul {
    font-size: 1.1em;
    vertical-align: middle;
    animation: pulse 0.3s infinite;
	color: #ffffff;
	border-radius: 5px;
    background-color: #ff0000;
	padding: 0 4px;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.text-danger {
    color: #ff0000 !important;
    font-weight: 700;
    text-shadow: 0 0 2px rgba(220, 53, 69, 0.3);
}



/* ****** ส่วนของ "การแสดงรูปภาพแอปที่ใช้เติมเงิน" ****** */

@keyframes cloudMove {
    0% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
    100% { transform: translate(0, 0); }
}

/* ส่วนแสดงรูปภาพ */
.images-show-recharge {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* จัดกลาง */
    gap: 10px;               /* กำหนดระยะห่างระหว่างรูปตรงนี้ (แทน Margin) */
    width: 100%;             /* บังคับกว้างเต็มพื้นที่ */
    position: relative;
    z-index: 1;
	margin-top: 8px;
	margin-bottom: 24px;
}

.img-show-recharge {
    width: 50px;
    height: 50px;
    /* ห้ามใส่ margin ซ้ายขวาตรงนี้ ถ้าอยากให้มันขยับไปได้เยอะๆ */
    object-fit: contain;
    border-radius: 12px;     /* ปรับตามความชอบ */
    background-color: grey;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3);
    border: 1px solid #b9b9b9;
    transition: all 0.2s ease;
}

/* ถ้ายังติดขอบ Bootstrap ให้ใช้ class นี้ช่วย */
.container.show-recharge {
    max-width: 100% !important; /* ปลดล็อคความกว้าง Container */
    padding-left: 5px;
    padding-right: 5px;
}

@media (max-width: 768px) {
    .images-show-recharge {
        gap: 6px !important; /* ระยะห่าง ซ้าย-ขวา */
		row-gap: 5px !important; /* ระยะห่าง บน-ล่าง (ระหว่างบรรทัด) */
	    margin-top: 4px;
	    margin-bottom: 17px;
    }
    .img-show-recharge {
        width: 28px; /* เพิ่มขนาดนิดนึงให้ดูรู้เรื่อง */
        height: 28px;
		margin: 0 !important;   /* ล้างค่า mt-2, mr-2, ml-2 ที่ใส่ไว้ใน HTML ทิ้งให้หมดบนมือถือ */
		box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
}



/* ส่วนของ หน้าต่าง Modal */
#PromptPayScbModal .modal-dialog,
#PromptPayKbankModal .modal-dialog,
#TrueWalletGiftLinkModal .modal-dialog,
#TrueWalletQRLinkModal .modal-dialog,
#TrueWalletSlipModal .modal-dialog,
#AllMemberModal .modal-dialog,
#SuccessRechargeModal .modal-dialog,
#RateRechargeModal .modal-dialog,
#CreateGiftLinkModal .modal-dialog {
    max-width: 60%;
    width: auto;
}
@media (max-width: 768px) {
    #PromptPayScbModal .modal-dialog,
	#PromptPayKbankModal .modal-dialog,
	#TrueWalletGiftLinkModal .modal-dialog,
	#TrueWalletQRLinkModal .modal-dialog,
    #TrueWalletSlipModal .modal-dialog,
	#AllMemberModal .modal-dialog,
    #SuccessRechargeModal .modal-dialog,
    #RateRechargeModal .modal-dialog,
    #CreateGiftLinkModal .modal-dialog	{
        max-width: 99%;
        width: auto;
    }
}


/* ===============|> เริ่มต้น ▶ ปุ่มกด "ย้อนกลับ - ถัดไป" การแบ่งหน้า "ประวัติการเติมเงิน" <|=============== */

.btn-pagination {
    background-color: #4a5568;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.btn-pagination:hover:not(.disabled) {
    background-color: #2d3748;
}
.btn-pagination.disabled {
    background-color: #718096;
    cursor: not-allowed;
    opacity: 0.5;
}
.btn-pagination:focus {
    outline: 2px solid #63b3ed;
    outline-offset: 2px;
}

/* ===============|> เริ่มต้น ▶ หน้าต่าง Modal "เติมเงินสำเร็จ!" <|=============== */

#SuccessRechargeModal .modal-title {
    text-align: center;
}
.bg-gradient-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
}
.success-icon-header {
    animation: bounceIn 0.6s ease-out;
}
.received-item, .bonus-item {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.received-item:hover, .bonus-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.main-amount-section .real-money-display {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.display-6 {
    font-size: 2.5rem;
    font-weight: 700;
}
.text-light {
    color: #f8f9fa !important;
}
.bg-gray-700 {
    background-color: #374151 !important;
}
.border-gray-600 {
    border-color: #4b5563 !important;
}
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .display-6 {
        font-size: 2rem;
    }
    
    .received-item, .bonus-item {
        padding: 1rem !important;
    }
    
    .modal-body {
        padding: 1.5rem !important;
    }
}

/* ===============|> สิ้นสุด ⬛ หน้าต่าง Modal "เติมเงินสำเร็จ!" <|=============== */

/* เกี่ยวกับ (QR Code) */
.qr-image {
    width: 230px;
    height: 230px;
    margin: 0 auto;
    cursor: pointer;
}

/* การตัดขอบรูป QR Code และรูปเพิ่มด้านบน */
.qr-container-for-cut {
    aspect-ratio: 1 / 1.15; /* ให้กรอบเป็นสี่เหลี่ยมจัตุรัส */
	max-width: 60vw; /* ขนาดสูงสุดเป็นเปอร์เซ็นต์ของ viewport */
	max-height: 60vh; /* ขนาดสูงสุดเป็นเปอร์เซ็นต์ของ viewport */
    overflow: hidden; /* ซ่อนส่วนที่เกิน */
    margin: 0 auto 15px; /* จัดตำแหน่งและระยะห่างด้านล่าง */
    position: relative;
	clip-path: inset(0 4% 20% 4%); /* ปรับค่าตัดด้าน.. บน, ขวา, ล่าง, ซ้าย */
}
.qr-image-for-cut {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ปรับขนาดรูปภาพให้พอดีกับกรอบ */
    display: block; /* ทำให้ไม่มีช่องว่างใต้ภาพ */
}

/* รายละเอียด */
.qr-hint-text {
    font-size: 13px;
	color: #fbbf24;
    font-weight: bold;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
}

/* ส่วนของปุ่ม "เปิดแอป TrueMoney" */
.btn-glow {
    animation: borderPulse 2s infinite;
    position: relative;
    /* background: linear-gradient(45deg, #10b981, #059669); */
    /* border: none; */
}
@keyframes borderPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.9);
    animation: none;
}

/* ส่วนของข้อความหัวข้อแต่ละแท็บ "การเติมเงินแบบ ...." */
.list-section-title-rc {
    /* ปรับความเร็วเป็น X วินาที */
    animation: blinker 1.2s linear infinite; 
    color: #FFFF99; 
    /* เพิ่มเงาสีแดงให้ข้อความดูสว่าง/เรืองแสง ทำให้ดูหนาและสะดุดตาขึ้น */
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.8), 0 0 10px rgba(255, 0, 0, 0.6);
}
/* Keyframe animation (ใช้ตัวเดิม) */
@keyframes blinker {
    50% {
        opacity: 0; /* ที่จุดกึ่งกลางของ animation ทำให้ข้อความหายไป */
    }
}
@media (max-width: 768px) {
    .list-section-title-rc {
        font-size: 0.8rem;
    }
}


/* เกี่ยวกับ (ระบบ "เติมเงินแล้วเอาข้อมูลสลิปมากรอก") */
/* ส่วนของการ "แสดงวันที่และเวลา" ของแบบตรวจสอบสลิป */
/* ให้ input อยู่ใน center ของ parent */
#v4_transaction_datetime {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
/* PC */
@media (min-width: 768px) {
    input[type="datetime-local"] {
        text-indent: 12px;
    }
}
/* Mobile */
@media (max-width: 767px) {
    input[type="datetime-local"] {
        text-indent: 21px;
    }
}

/* คัดลอกเบอร์ */
.luxury-input-group {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.4);
    height: 50px;
	margin-bottom: 1rem;
}
.form-input-gold {
    flex-grow: 1;
    background: #1f2937 !important;
    border: none !important;
    color: #fbbf24 !important;
    text-align: center; /* จัดเบอร์ไว้กลางช่อง */
    font-size: 1.2rem;
}
.btn-luxury-copy {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
    color: #000 !important;
    border: none;
    padding: 0 15px;
    font-weight: bold;
    cursor: pointer;
}
@media (max-width: 768px) {
    .luxury-input-group { height: 45px; }
    .form-input-gold { font-size: 1rem; }
    .btn-luxury-copy { padding: 0 10px; font-size: 0.9rem; }
}


/* ส่วนของ "การแนบสลิป" */
/* คอนเทนเนอร์หลัก */
.slip-upload-container {
    text-align: center;
    margin-bottom: 1rem;
}

/* กล่องลากวาง (Drop Area) */
.slip-drop-zone {
    padding: 1rem; /* p-3 */
    border: 2px dashed #4b5563;
    border-radius: 0.5rem; /* rounded-3 */
    background: rgba(30, 41, 59, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.slip-drop-zone:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #60a5fa;
}

/* ไอคอนในกล่อง */
.slip-drop-icon {
    color: #60a5fa;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* หัวข้อและข้อความ */
.slip-drop-title {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.slip-drop-text {
    color: #9ca3af; /* text-gray-400 */
    font-size: 0.875rem; /* small */
    margin-bottom: 0.5rem;
}

/* ปุ่มกด */
.slip-btn-select {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    /* ใช้ px แทน rem เพื่อคุมขนาดให้ตายตัว */
    width: 120px;   /* กำหนดความกว้างใน PC */
    height: 35px;   /* กำหนดความสูงใน PC */
    font-size: 14px; /* ขนาดฟอนต์ใน PC */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    cursor: pointer;
}

.slip-btn-select:hover {
    background: #2563eb;
}

/* ส่วน Preview รูปภาพ */
.slip-preview-box {
    margin-top: 0.5rem;
    padding: 0.25rem;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    background: #0f172a;
    display: none; /* เริ่มต้นซ่อนไว้ */
}

.slip-preview-img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    border: 2px solid #3b82f6;
}

/* ข้อความช่วยเหลือด้านล่าง */
.slip-helper-text {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* จัดรูปให้อยู่ตรงกลาง */
.slip-preview-box {
    text-align: center;
}

.preview-wrapper {
    position: relative;
    display: inline-block; /* ให้ขนาดกล่องเท่ากับรูป */
    margin: 10px auto;
}

/* ดีไซน์ปุ่มกากบาท */
.remove-preview {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444; /* สีแดงเข้ม */
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    z-index: 10;
}

.remove-preview:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.remove-preview i {
    font-size: 14px;
}

@media (max-width: 768px) {
    /* เจาะจงไปที่คลาสปุ่มโดยเฉพาะ */
    .slip-btn-select {
        /* 1. ยกเลิก Padding ทิ้งให้หมด */
        padding: 0 !important;
        
        /* 2. กำหนดขนาดตายตัว (ปรับเลขได้ตามใจชอบ) */
        width: 80px !important;  /* ความกว้างที่พี่ต้องการ */
        height: 25px !important;  /* ความสูงที่พี่ต้องการ */
        
        /* 3. จัดตัวหนังสือให้อยู่กลางปุ่ม */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        
        /* 4. ลดขนาดฟอนต์ให้เข้ากับขนาดปุ่ม */
        font-size: 11px !important;
        line-height: 1 !important;
        
        /* 5. ล้างค่าพื้นฐานที่อาจค้ำอยู่ */
        min-width: 0 !important;
        min-height: 0 !important;
    }

    /* ยุบช่องว่างใน Drop Zone ให้แคบลงอีก */
    .slip-drop-zone {
        padding: 8px !important;
    }

    .slip-drop-icon {
        font-size: 1.2rem !important;
        margin-bottom: 2px !important;
    }

    .slip-drop-title {
        font-size: 12px !important;
    }

    .slip-drop-text {
        font-size: 10px !important;
        margin-bottom: 4px !important;
    }
	
	/* ปรับขนาดปุ่มกากบาทในมือถือ */
    .remove-preview {
        /* 1. ล้างค่าขั้นต่ำทิ้งให้หมด (จุดตายที่ทำให้มันไม่ยอมลดขนาด) */
        min-width: 0 !important;
        min-height: 0 !important;

        /* 2. ค่อยสั่งขนาดที่พี่ต้องการ (เช่น 16px หรือ 18px) */
        width: 22px !important;
        height: 22px !important;

        /* 3. จัดการเรื่องไข่ต้ม */
        line-height: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        /* 4. ขยับตำแหน่ง */
        top: -5px !important;
        right: -5px !important;
    }

}


/* เกี่ยวกับ (ส่งซองทรู) */
/* การแสดง Iframe หน้าซองทรู ใน Modal */
.gift-iframe {
    background-color: white !important;
	border: none;
    border-radius: 8px;
    height: 75vh;
    min-height: 500px;
    width: 100%;
    margin-top: 0;
	margin-bottom: 0;
	filter: invert(0.9) brightness(1.05);
}
.gift-iframe {
    overflow: hidden;
}