/* Payment dialog, visually aligned with the 375px Figma payment confirmation.
   Use local pixel sizes: the host page changes its rem scale in ui.js. */
#payment {
    width: min(100vw, 375px);
    max-height: calc(100dvh - 16px);
    padding: 14px 0 calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;
    box-sizing: border-box;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff5ea 0%, #f7f7f7 58%, #fafafa 100%);
    color: #333;
    font-family: Arial, "PingFang TC", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    font-weight: 400;
}
#payment .payment-title {
    width: 100%;
    padding: 0 40px;
    font-size: 18px;
    line-height: 25px;
    font-weight: 400;
    color: #222;
}
#payment .pay_close { width: 26px; height: 26px; top: 14px; right: 12px; }
#payment .payment-subtitle {
    width: calc(100% - 32px);
    min-height: 60px;
    margin: 8px 16px 0;
    padding: 9px 8px;
    border: 1px solid #e6e3e0;
    border-radius: 5px;
    background: rgba(255, 255, 255, .6);
    color: #888;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0;
    font-weight: 400;
}
#payment .payment-subtitle .payment-subtitle-vip-text { color: #888; }
#payment .payment-subtitle-circle {
    width: 4px; height: 4px; margin: 8px 5px 0 0; border-radius: 50%;
}
#payment .payment-checkbox {
    width: calc(100% - 32px);
    margin: 10px 16px 0;
    padding: 0;
    gap: 8px;
}
#payment .payment-checkbox-item {
    height: 140px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background: #fff;
}
#payment .payment-checkbox-item.active {
    border-color: #ffd078;
    background: linear-gradient(180deg, #ffe9b8 0%, #fff7df 100%);
}
#payment .payment-card-name {
    margin-top: 20px;
    color: #888;
    font-size: 16px;
    line-height: 22px;
    font-weight: 400;
}
#payment .payment-checkbox-item.active .payment-card-name { color: #823712; }
#payment .vip-original-price {
    display: block;
    margin: 2px 2px 0;
    color: #999;
    font-size: 13px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
}
#payment .vip-original-price[hidden] { display: none; }
#payment .payment-checkbox-item.active .vip-original-price { color: #c69268; }
#payment .post_pay_price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin-top: 6px;
    font-size: 12px;
    line-height: 32px;
    font-weight: 400;
    color: #f28b20;
    white-space: nowrap;
}
#payment .post_pay_price span {
    margin: 0 0 0 3px;
    font-size: 26px;
    line-height: 32px;
    font-weight: 600;
}
#payment .payment-coupon {
    height: 26px;
    border-radius: 0 0 4px 4px;
    background: #ffecd6;
    color: #ba7f61;
    font-size: 12px;
    line-height: 18px;
    font-weight: 400;
}
#payment .payment-checkbox-item.active .payment-coupon { background: #ffd078; color: #9a6528; }
#payment .annual-promotion-strip {
    margin: 12px 16px 0;
    gap: 1px;
    font-size: 15px;
    line-height: 20px;
    font-weight: 400;
    color: #666;
}
#payment .annual-promotion-title { color: #666; }
#payment .annual-promotion-countdown {
    padding: 0;
    background: transparent;
    color: #e9683c;
}
#payment .payment-line { display: none; }
#payment .payment-coupon-selector {
    width: calc(100% - 32px);
    min-height: 48px;
    margin: 14px 16px 0;
    padding: 0 12px;
    border: 1px dotted #e7b5ac;
    border-radius: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, .2);
}
#payment .payment-coupon-selector.has-coupon { background: #fff3ef; border-color: #ee9d91; }
#payment .payment-coupon-selector-left::before {
    width: 18px; height: 18px; margin-right: 5px; font-size: 12px; font-weight: 600;
}
#payment .payment-coupon-selector-left span,
#payment .payment-coupon-selector-right {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}
#payment .payment-coupon-selector-right { gap: 4px; }
#payment .payment-coupon-selector[aria-disabled="true"] {
    background: rgba(238, 238, 238, .35);
    border-color: #dedede;
    color: #aaa;
}
#payment .payment-coupon-selector[aria-disabled="true"] .payment-coupon-selector-left span,
#payment .payment-coupon-selector[aria-disabled="true"] .payment-coupon-selector-right { color: #aaa; }
#payment .payment-coupon-selector[aria-disabled="true"] .payment-coupon-selector-right::after {
    content: "🔒";
    filter: grayscale(1);
    opacity: .65;
    font-size: 12px;
}
#payment .payment-section-title {
    margin: 14px 16px 0;
    color: #111;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
}
#payment .payment-pay-container { margin: 12px 16px 0; }
#payment .payment-pay-item {
    min-height: 48px;
    margin-bottom: 10px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
}
#payment .payment-pay-item:last-child { margin-bottom: 0; }
#payment .payment-pay-item.active { border-color: #f6c674; }
#payment .payment-pay-item > svg { width: 18px; height: 18px; flex-shrink: 0; }
#payment .pay-item-name { margin-left: 8px; color: #555; font-size: 14px; line-height: 20px; font-weight: 400; }
#payment .pay_bingo { width: 20px; height: 20px; border-width: 1px; border-radius: 50%; }
#payment .pay_bingo.active { display: flex; align-items: center; justify-content: center; }
#payment .pay_bingo svg { width: 20px; height: 20px; }
#payment .payment-btn {
    width: calc(100% - 32px);
    height: 48px;
    margin: 18px 16px 0;
    border-radius: 5px;
    background: #ffd078;
    color: #785021;
    font-family: inherit;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}
#payment .payment-server { width: calc(100% - 32px); margin: 12px 16px 0; color: #333; font-size: 13px; }
#payment .payment-server div { height: auto !important; margin-top: 0 !important; line-height: 24px !important; font-size: 13px !important; font-weight: 400; }
#payment .payment-server a { margin: 0 2px; color: #4a91bd !important; text-decoration: underline; }
#payment .payment-agreement { width: calc(100% - 32px); margin: 10px 16px 0; gap: 6px; font-size: 12px; line-height: 20px; }
#payment .payment-agreement-check input { margin: 3px 0 0; }
@media (max-width: 750px) {
    #payment { width: 100vw; max-height: calc(100dvh - 8px); border-radius: 18px 18px 0 0 !important; }
}
@media (max-width: 360px) {
    #payment .annual-promotion-strip { font-size: 12px; }
    #payment .payment-coupon-selector-left span,
    #payment .payment-coupon-selector-right { font-size: 12px; }
}
