/* Mobile Recharge page (light redesign 2026-10-23).
   The page uses the product page structure and product-detail.css; this file only adds what is
   specific to mobile recharge: the page icon, the operator grid, the amount grid, the note,
   the +60 in the number box and a Total-only summary. Box rules: options radius 8, white with a
   grey line, selected = light gold + gold gradient frame (same as the product page). */

/* Header picture: gold glow instead of a game picture */
#MobileRechargePage #ProductDisplayWrapper::before {
    background: radial-gradient(45% 140% at 18% 20%, rgba(255, 196, 64, .42), transparent 70%),
                radial-gradient(40% 120% at 85% 0%, rgba(242, 154, 0, .28), transparent 70%),
                linear-gradient(160deg, #1A1D24, #2B2F38) !important;
}

#MobileRechargePage .MobileRechargeIcon {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    #MobileRechargePage .MobileRechargeIcon > i {
        font-size: 72px;
        background: linear-gradient(135deg, #FFD24A, #9C5A00);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    #MobileRechargePage .MobileRechargeIcon > b {
        position: absolute;
        right: 22%;
        bottom: 20%;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: linear-gradient(135deg, #FFD24A, #F29A00);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        box-shadow: 0 0 0 3px #fff;
    }

/* The box stacks label, grid, label, grid, note: spacing comes from the margins below, not the product page gap */
#MobileRechargePage #ProductContentWrapper .ProductVariantListWrapper {
    gap: 0 !important;
}

/* Section labels */
#MobileRechargePage .MobileRechargeLabel {
    font-size: 13px;
    font-weight: 600;
    color: #1A1D24;
    margin: 0 0 12px;
}

    #MobileRechargePage .MobileRechargeLabel:not(:first-child) {
        margin-top: 20px;
    }

/* Operators: logo above the name */
#MobileRechargePage .MobileRechargeOperatorList {
    display: grid;
    /* up to 6 per row, fewer when a tile would get narrower than 108px */
    grid-template-columns: repeat(auto-fill, minmax(max(108px, calc((100% - 60px) / 6)), 1fr));
    gap: 12px;
}

#MobileRechargePage .MobileRechargeOperatorItem {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 84px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid #E3E5E8;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background-color .2s;
}

    #MobileRechargePage .MobileRechargeOperatorItem:hover {
        border-color: #F2C14E;
    }

    #MobileRechargePage .MobileRechargeOperatorItem .Icon img {
        width: 36px;
        height: 36px;
        object-fit: contain;
        border-radius: 6px;
        display: block;
    }

    #MobileRechargePage .MobileRechargeOperatorItem .OperatorName {
        font-size: 12px;
        line-height: 1.25;
        color: #1A1D24;
    }

/* Selected operator: same look as a selected product page option (the selected amount already gets it from the site) */
#MobileRechargePage .MobileRechargeOperatorItem[is-selected="true" i] {
    background: #FFFBF1;
    border-color: transparent;
}

    #MobileRechargePage .MobileRechargeOperatorItem[is-selected="true" i]::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 8px;
        padding: 2px;
        background: linear-gradient(135deg, #FFD24A, #9C5A00);
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
    }

/* Amounts */
#MobileRechargePage #ProductContentWrapper .ProductVariantList {
    display: grid;
    /* up to 4 per row, fewer when a tile would get narrower than 150px */
    grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 36px) / 4)), 1fr));
    gap: 12px;
}

    #MobileRechargePage #ProductContentWrapper .ProductVariantList .VariantItemOption {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 56px;
        padding: 8px 14px;
        background: #fff;
        border: 1px solid #E3E5E8;
        border-radius: 8px;
        box-sizing: border-box;
        cursor: pointer;
    }

        #MobileRechargePage #ProductContentWrapper .ProductVariantList .VariantItemOption .VariantName {
            font-size: 13px;
            font-weight: 600;
            color: #1A1D24;
            white-space: nowrap;
        }

        #MobileRechargePage #ProductContentWrapper .ProductVariantList .VariantItemOption .VariantPrice {
            text-align: right;
        }

    #MobileRechargePage #ProductContentWrapper .ProductVariantList .LoadingContent {
        grid-column: 1 / -1;
        font-size: 12px;
        color: #6B7280;
        display: flex;
        gap: 8px;
        align-items: center;
    }

/* Amounts are always shown in full: no "tap to open the list" arrow from the product page */
#MobileRechargePage #ProductContentWrapper .ProductVariantList .VariantItemOption::after {
    display: none !important;
}

/* Note under the amounts */
#MobileRechargePage .MobileRechargeNote {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin-top: 16px;
    font-size: 12px;
    color: #6B7280;
}

    #MobileRechargePage .MobileRechargeNote i {
        color: #F29A00;
        font-size: 14px;
        line-height: 1.2;
    }

/* Number box: label, fixed +60, number */
#MobileRechargePage .ActionSection #OrderDetailSection .DirectTopUpField {
    align-items: center;
}

#MobileRechargePage .DirectTopUpField .CountryCode {
    flex: none;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: #1A1D24;
    margin-left: 14px;
    padding-right: 10px;
    border-right: 1px solid #E3E5E8;
    line-height: 18px;
}

#MobileRechargePage .DirectTopUpField input::-webkit-outer-spin-button,
#MobileRechargePage .DirectTopUpField input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#MobileRechargePage .DirectTopUpField input[type=number] {
    -moz-appearance: textfield;
}

/* Summary shows only the Total, like the product page */
#MobileRechargePage #SummaryDetail > div:nth-child(-n+5) {
    display: none;
}

@media (max-width: 800px) {
    #MobileRechargePage .MobileRechargeOperatorList {
        grid-template-columns: repeat(auto-fill, minmax(max(96px, calc((100% - 20px) / 3)), 1fr));
        gap: 10px;
    }

    #MobileRechargePage .MobileRechargeOperatorItem {
        height: 80px;
    }

    #MobileRechargePage #ProductContentWrapper .ProductVariantList {
        grid-template-columns: repeat(auto-fill, minmax(max(140px, calc((100% - 10px) / 2)), 1fr));
        gap: 10px;
    }

    #MobileRechargePage .MobileRechargeIcon > i {
        font-size: 46px;
    }

    #MobileRechargePage .MobileRechargeIcon > b {
        width: 24px;
        height: 24px;
        font-size: 11px;
        right: 18%;
        bottom: 16%;
    }
}

/* 2026-10-27 (Jacky): only Buy Now, no cart button; the box needs no "Mobile Number" label, +60 says it already */
#MobileRechargePage #ProductContentWrapper .ActionSection #PurchaseActionSection {
    grid-template-columns: 1fr;
}

    #MobileRechargePage #ProductContentWrapper .ActionSection #PurchaseActionSection #AddToCartBtn {
        display: none;
    }

#MobileRechargePage .ActionSection #OrderDetailSection .DirectTopUpField > span {
    display: none;
}
