/* ============================================================================
 *  หน้าเติมเงิน (donate/index.php)  —  ส่วนที่เป็นของหน้านี้โดยเฉพาะ
 * ----------------------------------------------------------------------------
 *  โครงหลัก สี ปุ่ม ช่องกรอก การ์ด ตาราง ใช้ร่วมกับหน้าสมาชิกใน
 *      ../css/member-ui.css      <- อยากเปลี่ยนสีธีม แก้ที่ :root ของไฟล์นั้น
 *      ../css/style.css          <- พื้นหลังและโลโก้ ชุดเดียวกับหน้าแรก
 *      ../css/layout.css         <- รองรับมือถือ / จอคอม / จอกว้าง
 *
 *  ไฟล์นี้เพิ่มเฉพาะของที่หน้าอื่นไม่มี : การ์ดแพ็คเกจ กล่องบัญชีธนาคาร
 *  โลโก้ธนาคารที่รองรับ และกล่องคำเตือน
 * ==========================================================================*/

/* การ์ดหน้าเติมเงินกว้างกว่าหน้าสมาชิกเล็กน้อย */
.mb-card.is-donate {
    width: 1120px;
}

/* ============================================================ แพ็คเกจเติมเงิน */

.dn-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;

    margin-bottom: 26px;
}

.dn-package {
    display: flex;
    flex-direction: column;

    padding: 18px 18px 16px;
    border: 1px solid var(--mb-field-line);
    border-radius: 14px;

    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));

    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dn-package:hover {
    transform: translateY(-2px);
    border-color: var(--mb-gold);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
}

.dn-package-price {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);

    color: var(--mb-gold-soft);
    font-size: 22px;
    font-weight: 500;
    text-align: center;
}

.dn-reward {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 7px;
    font-size: 14px;
}

.dn-reward span  { color: var(--mb-text-dim); }
.dn-reward strong{ color: var(--mb-text); font-weight: 400; }

.dn-reward.is-bonus strong {
    color: var(--mb-success);
}

/* ไอเทมแถม */
.dn-items {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.dn-item {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 6px;
    color: var(--mb-text);
    font-size: 13.5px;
}

.dn-item img {
    width: 24px;
    height: 24px;
    flex: none;
    object-fit: contain;
    image-rendering: pixelated;
}

/* ================================================================= สองคอลัมน์ */

.dn-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;

    margin-bottom: 26px;
}

.dn-box {
    padding: 20px;
    border: 1px solid var(--mb-field-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

/* ============================================================ บัญชีรับโอน */

.dn-bank {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    align-items: center;

    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--mb-panel-line);
    border-radius: 12px;
    background: rgba(226, 184, 87, 0.07);
}

.dn-bank dt {
    color: var(--mb-text-dim);
    font-size: 13px;
    white-space: nowrap;
}

.dn-bank dd {
    margin: 0;
    color: var(--mb-gold-soft);
    font-size: 17px;
    font-weight: 500;
    word-break: break-all;
}

/* ปุ่มคัดลอกเลขบัญชี */
.dn-copy {
    margin-left: 8px;
    padding: 3px 10px;

    border: 1px solid var(--mb-panel-line);
    border-radius: 999px;
    background: transparent;

    color: var(--mb-gold-soft);
    font-family: inherit;
    font-size: 12px;
    vertical-align: middle;
}

.dn-copy:hover {
    background: rgba(226, 184, 87, 0.16);
}

/* ================================================================== คำเตือน */

.dn-warning {
    padding: 14px 16px;
    border-left: 3px solid var(--mb-danger);
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.10);

    color: #fecaca;
    font-size: 13.5px;
    line-height: 1.95;
}

.dn-warning b {
    display: block;
    margin-bottom: 4px;
    color: #fca5a5;
    font-weight: 500;
}

.dn-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-left: 3px solid var(--mb-field-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);

    color: var(--mb-text-dim);
    font-size: 13px;
    line-height: 1.95;
}

.dn-note b {
    display: block;
    margin-bottom: 4px;
    color: var(--mb-text);
    font-weight: 400;
}

/* ==================================================== ธนาคารที่รองรับสลิป */

.dn-banklogos {
    margin-top: 16px;
}

.dn-banklogos-title {
    margin-bottom: 10px;
    color: var(--mb-text-dim);
    font-size: 13px;
}

.dn-banklogos-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dn-banklogos-list img {
    width: 42px;
    height: 42px;

    padding: 4px;
    border: 1px solid var(--mb-field-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);

    object-fit: contain;
}

/* ====================================================================== มือถือ */

@media (max-width: 1024px) {

    .dn-columns {
        grid-template-columns: 1fr;
    }

    .dn-packages {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {

    .dn-packages {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dn-package {
        padding: 14px;
    }

    .dn-package-price {
        font-size: 18px;
    }

    .dn-bank {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }

    .dn-bank dd {
        margin-bottom: 10px;
        font-size: 16px;
    }
}

/* ============================================================================
 *  Donate Point / โปรโมชั่นจำกัด / สต็อก / ปุ่มแลกแพ็คเกจ
 * ==========================================================================*/

/* กล่องตัวเลข Donate Point ให้เด่นกว่าอันอื่น */
.mb-stat.dn-stat-point {
    border-color: var(--mb-panel-line);
    background: linear-gradient(180deg, rgba(226, 184, 87, 0.16), rgba(226, 184, 87, 0.05));
}

.mb-stat.dn-stat-point > i {
    width: 34px;
    flex: none;
    color: var(--mb-gold);
    font-size: 26px;
    text-align: center;
}

/* กล่องแต้มสะสมแลกรางวัล : โทนเขียวมิ้นต์ แยกจาก Donate Point ที่เป็นโทนทอง */
.mb-stat.dn-stat-reward {
    border-color: var(--mb-panel-line);
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.16), rgba(52, 211, 153, 0.05));
}

.mb-stat.dn-stat-reward > i {
    width: 34px;
    flex: none;
    color: #6ee7b7;
    font-size: 26px;
    text-align: center;
}

.mb-stat-sub {
    margin-top: 2px;
    color: var(--mb-text-dim);
    font-size: 12px;
    font-weight: 300;
}

/* กล่องอธิบายว่าแต้มสะสมได้มาจากไหน */
.dn-howto {
    margin-bottom: 24px;
    padding: 14px 16px;

    border: 1px solid rgba(52, 211, 153, .3);
    border-left: 3px solid #34d399;
    border-radius: 10px;

    background: rgba(52, 211, 153, .07);
    color: var(--mb-text-dim);

    font-size: 13px;
    line-height: 1.95;
}

/* เฉพาะ b ตัวแรกเป็นหัวข้อ ตัวอื่นเป็นคำเน้นกลางบรรทัด ห้ามขึ้นบรรทัดใหม่ */
.dn-howto > b:first-child {
    display: block;
    margin-bottom: 4px;
    color: #a7f3d0;
    font-weight: 400;
}

.dn-howto b {
    color: #fff;
    font-weight: 500;
}

.dn-howto a {
    color: #6ee7b7;
    text-decoration: underline;
}

/* --------------------------------------------------------------- การ์ดแพ็คเกจ */

.dn-package {
    position: relative;
    overflow: hidden;
}

.dn-package-label {
    margin-bottom: 2px;
    color: var(--mb-text-dim);
    font-size: 13px;
    text-align: center;
}

.dn-package-price span {
    margin-left: 4px;
    color: var(--mb-text-dim);
    font-size: 13px;
    font-weight: 300;
}

/* แพ็คเกจโปรโมชั่น : ขอบทองเรืองแสง + แถบคาดมุม */
.dn-package.is-promo {
    border-color: var(--mb-gold);
    background: linear-gradient(180deg, rgba(226, 184, 87, 0.14), rgba(255, 255, 255, 0.03));
    box-shadow: 0 0 0 1px rgba(226, 184, 87, 0.25), 0 10px 26px rgba(0, 0, 0, .45);
}

.dn-ribbon {
    position: absolute;
    top: 16px;
    right: -42px;

    width: 160px;
    padding: 5px 0;

    background: linear-gradient(180deg, #f0cd77, var(--mb-gold) 45%, #b98f36);
    color: #2a1e05;

    font-size: 12px;
    font-weight: 500;
    text-align: center;
    letter-spacing: .3px;

    transform: rotate(38deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
    pointer-events: none;
}

/* ============================================================================
   PACKAGE LIMITED  —  แพ็คเกจที่ 1 ไอดีแลกได้จำกัดจำนวนครั้ง
   ----------------------------------------------------------------------------
   ใช้โทนม่วง-ฟ้าเพื่อให้แยกออกจากการ์ดปกติ (โทนทอง) ตั้งแต่แรกเห็น
========================================================================== */

.dn-package.is-limited {
    border-color: rgba(139, 129, 246, .55);
    background: linear-gradient(180deg, rgba(120, 110, 240, .16), rgba(255, 255, 255, .03));
    box-shadow: 0 0 0 1px rgba(139, 129, 246, .22), 0 10px 26px rgba(0, 0, 0, .45);
}

.dn-package.is-limited:hover {
    border-color: rgba(163, 155, 250, .85);
    box-shadow: 0 0 0 1px rgba(163, 155, 250, .35), 0 14px 32px rgba(0, 0, 0, .5);
}

.dn-package.is-limited .dn-ribbon {
    background: linear-gradient(180deg, #b6aefb, #7d6ff0 45%, #4f43b8);
    color: #fff;
}

.dn-package.is-limited .dn-stock-bar span {
    background: linear-gradient(90deg, #7d6ff0, #b6aefb);
}

/* บรรทัดบอกโควตาต่อไอดี */
.dn-perid {
    margin-top: 12px;
    padding: 7px 10px;

    border: 1px solid rgba(139, 129, 246, .35);
    border-radius: 8px;

    background: rgba(120, 110, 240, .12);
    color: #cdc7fb;

    font-size: 12.5px;
    text-align: center;
}

.dn-perid i {
    margin-right: 5px;
}

.dn-perid b {
    color: #fff;
    font-weight: 500;
}

/* บัญชีนี้แลกครบโควตาแล้ว */
.dn-package.is-claimed {
    opacity: .58;
    filter: grayscale(.55);
}

.dn-package.is-claimed:hover {
    transform: none;
    box-shadow: none;
}

.dn-package.is-claimed .dn-perid {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
    color: var(--mb-text-dim);
}

/* หัวข้อของกล่อง Package Limited */
.mb-section-title.is-limited {
    color: #cdc7fb;
}

.mb-section-title.is-limited i {
    color: #a79df9;
}

/* ============================================================================
   REWARD  —  ของรางวัลที่แลกด้วยแต้มสะสม (หน้า reward.php)
   ใช้โทนเขียวมิ้นต์ให้ตรงกับกล่องแต้มสะสมด้านบน
========================================================================== */

.dn-package.is-reward {
    border-color: rgba(52, 211, 153, .42);
    background: linear-gradient(180deg, rgba(52, 211, 153, .12), rgba(255, 255, 255, .03));
}

.dn-package.is-reward:hover {
    border-color: rgba(110, 231, 183, .85);
    box-shadow: 0 0 0 1px rgba(110, 231, 183, .3), 0 14px 32px rgba(0, 0, 0, .5);
}

.dn-package.is-reward .dn-package-price {
    color: #a7f3d0;
}

.dn-package.is-reward .dn-ribbon {
    background: linear-gradient(180deg, #a7f3d0, #34d399 45%, #12805c);
    color: #04291d;
}

.dn-package.is-reward .dn-stock-bar span {
    background: linear-gradient(90deg, #34d399, #a7f3d0);
}

/* ของรางวัลที่จำกัดต่อไอดีด้วย ให้กรอบม่วงชนะเหมือนกล่อง Limited */
.dn-package.is-reward.is-limited {
    border-color: rgba(139, 129, 246, .55);
}

.mb-section-title.is-reward {
    color: #a7f3d0;
}

.mb-section-title.is-reward i {
    color: #6ee7b7;
}

.mb-section-note {
    margin-left: 10px;
    color: var(--mb-text-dim);
    font-size: 13px;
    font-weight: 300;
}

/* แพ็คเกจที่ขายหมดแล้ว */
.dn-package.is-soldout {
    opacity: .55;
    filter: grayscale(.7);
}

.dn-package.is-soldout:hover {
    transform: none;
    border-color: var(--mb-field-line);
    box-shadow: none;
}

/* --------------------------------------------------------------------- สต็อก */

.dn-stock {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.dn-stock-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    overflow: hidden;
}

.dn-stock-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mb-gold), #f0cd77);
}

.dn-stock-text {
    margin-top: 6px;
    color: var(--mb-text-dim);
    font-size: 12.5px;
    text-align: center;
}

.dn-stock-text b {
    color: var(--mb-gold-soft);
    font-weight: 500;
}

.dn-package.is-soldout .dn-stock-bar span {
    background: rgba(255, 255, 255, 0.25);
}

/* ------------------------------------------------------------ ปุ่มแลกแพ็คเกจ */

.dn-buy {
    margin-top: auto;
    padding-top: 14px;
}

.dn-buy form {
    margin: 0;
}

.dn-buy-btn {
    width: 100%;
    padding: 11px 10px;

    border: 0;
    border-radius: 10px;

    background: linear-gradient(180deg, #f0cd77, var(--mb-gold) 45%, #b98f36);
    color: #2a1e05;

    font-family: inherit;
    font-size: 15px;
    font-weight: 500;

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: filter .15s ease, transform .12s ease;
}

.dn-buy-btn:hover {
    filter: brightness(1.07);
}

.dn-buy-btn:active {
    transform: translateY(1px);
}

.dn-buy-btn.is-disabled,
.dn-buy-btn:disabled {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--mb-field-line);
    color: var(--mb-text-dim);
    font-weight: 300;
    box-shadow: none;
    cursor: not-allowed;
}

.dn-buy-btn.is-disabled:hover,
.dn-buy-btn:disabled:hover {
    filter: none;
}

/* จำนวนไอเทมต่อท้ายชื่อ */
.dn-item b {
    margin-left: auto;
    color: var(--mb-gold-soft);
    font-size: 12.5px;
    font-weight: 500;
}

/* จอแคบมาก ให้เหลือคอลัมน์เดียว การ์ดจะได้ไม่บีบจนอ่านไม่ออก */
@media (max-width: 480px) {

    .dn-packages {
        grid-template-columns: 1fr;
    }
}

/* ปุ่มบนการ์ดที่ Point ไม่พอ : พาไปหน้าเติมเงิน */
a.dn-buy-btn.is-topup {
    display: block;
    box-sizing: border-box;

    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--mb-panel-line);
    color: var(--mb-gold-soft);

    font-weight: 300;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
}

a.dn-buy-btn.is-topup:hover {
    background: rgba(226, 184, 87, 0.16);
    color: #ffffff;
    filter: none;
}

/* ============================================================ เลือกตัวละครรับของ */

.dn-charpick {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: start;

    margin-bottom: 26px;
    padding: 18px 20px;

    border: 1px solid var(--mb-field-line);
    border-left: 3px solid var(--mb-gold);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.dn-charpick .mb-field {
    margin-bottom: 0;
}

.dn-charpick-note {
    padding-top: 22px;
    color: var(--mb-text-dim);
    font-size: 13px;
    line-height: 1.95;
}

.dn-charpick-note b {
    display: block;
    margin-bottom: 4px;
    color: var(--mb-text);
    font-weight: 400;
}

@media (max-width: 1024px) {

    .dn-charpick {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dn-charpick-note {
        padding-top: 0;
    }
}
