/*
 * ailhj-recharge-modal.css - 自定义余额充值弹窗样式
 * 全新布局：两列金额卡片、简化自定义区域、左右布局支付方式
 */

/* ========== 弹窗整体 ========== */
.ailhj-recharge-form {
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
}

/* 弹窗宽度设置为 600px - 仅针对包含充值/积分表单的弹窗 */
.modal:has(.ailhj-recharge-form) .modal-dialog,
.modal:has(.balance-charge-form) .modal-dialog,
.modal.has-recharge-form .modal-dialog {
    max-width: 600px;
    width: 600px;
}

@media (max-width: 640px) {
    .modal:has(.ailhj-recharge-form) .modal-dialog,
    .modal:has(.balance-charge-form) .modal-dialog,
    .modal.has-recharge-form .modal-dialog {
        max-width: 90vw;
        width: 90vw;
    }
}

/* ========== 弹窗头部 ========== */
.ailhj-modal-header {
    position: relative;
    padding: 20px 24px 0;
}

.ailhj-modal-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--main-color);
}

.ailhj-title-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.ailhj-title-icon svg {
    width: 24px;
    height: 24px;
}

.ailhj-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--muted-bg-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.ailhj-modal-close:hover {
    background: var(--ailhj-red-op1);
    transform: rotate(90deg);
}

.ailhj-modal-close svg {
    width: 16px;
    height: 16px;
    color: var(--muted-color);
}

/* ========== 区域标题 ========== */
.ailhj-section-title {
    font-size: 14px;
    color: var(--muted-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.ailhj-section-title.ailhj-mt {
    margin-top: 20px;
}

/* ========== 金额卡片网格 ========== */
.ailhj-amount-section {
    margin-bottom: 20px;
}

.ailhj-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* ========== 金额卡片 ========== */
.ailhj-product-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    border: 1px solid var(--main-border-color);
    border-radius: 10px;
    background: var(--main-bg-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ailhj-product-box:hover {
    border-color: var(--ailhj-blue);
    transform: translateY(-1px);
}

.ailhj-product-box.active {
    border-color: var(--ailhj-blue);
    background: var(--ailhj-blue-op05);
}

/* 产品标签（推荐/特惠） */
.ailhj-product-tag {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 0 9px 0 9px;
    font-weight: 600;
    color: #fff;
}

.ailhj-product-tag.jb-yellow {
    background: linear-gradient(135deg, #f59f00, #f76707);
}

.ailhj-product-tag.jb-cyan {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
}

.ailhj-product-tag.jb-pink {
    background: linear-gradient(135deg, #f472b6, #ec4899);
}

.ailhj-product-tag.jb-blue {
    background: linear-gradient(135deg, #339af0, #228be6);
}

/* 金额显示 */
.ailhj-product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--main-color);
    line-height: 1.2;
}

.ailhj-currency-sm {
    font-size: 12px;
    font-weight: 500;
    margin-right: 2px;
}

/* 实际支付价格 */
.ailhj-pay-price {
    font-size: 13px;
    color: var(--ailhj-red);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ailhj-currency-xs {
    font-size: 11px;
    opacity: 0.9;
}

/* 节省标签 */
.ailhj-save-tag {
    font-size: 10px;
    padding: 1px 4px;
    background: var(--ailhj-yellow-op1);
    border-radius: 3px;
    color: var(--ailhj-orange);
    font-weight: 500;
}

/* ========== 自定义金额区域 ========== */
.ailhj-custom-amount {
    margin-top: 8px;
}

.ailhj-custom-input-wrap {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--main-border-color);
    padding-bottom: 8px;
    transition: border-color 0.3s ease;
}

.ailhj-custom-input-wrap:focus-within {
    border-color: var(--ailhj-blue);
}

.ailhj-currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--muted-color);
    margin-right: 8px;
}

.ailhj-custom-input {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.ailhj-custom-input::placeholder {
    color: var(--muted-2-color);
    font-weight: 400;
}

.ailhj-custom-hint {
    font-size: 12px;
    color: var(--muted-2-color);
    margin-top: 8px;
}

/* ========== 充值说明 ========== */
.ailhj-recharge-desc {
    padding: 16px 20px;
    background: var(--muted-bg-color);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--muted-color);
    line-height: 1.8;
}

/* ========== 支付方式区域 ========== */
.ailhj-payment-section {
    margin-top: 20px;
}

.ailhj-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ailhj-payment-method {
    display: block;
    cursor: pointer;
}

.ailhj-payment-radio {
    display: none;
}

.ailhj-payment-box {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--main-border-color);
    border-radius: 10px;
    background: var(--main-bg-color);
    transition: all 0.2s ease;
    gap: 12px;
}

.ailhj-payment-method:hover .ailhj-payment-box {
    border-color: var(--ailhj-blue-op3);
}

.ailhj-payment-radio:checked + .ailhj-payment-box {
    border-color: var(--ailhj-blue);
    background: var(--ailhj-blue-op05);
}

.ailhj-payment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.ailhj-payment-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ailhj-payment-icon i {
    font-size: 20px;
    color: var(--muted-color);
}

.ailhj-payment-name {
    font-size: 15px;
    color: var(--main-color);
    font-weight: 500;
}

/* ========== 卡密支付区域 ========== */
.ailhj-card-pass-section {
    margin-top: 12px;
    padding: 16px;
    background: var(--muted-bg-color);
    border-radius: 10px;
}

.ailhj-card-pass-desc {
    font-size: 12px;
    color: var(--muted-2-color);
    margin-bottom: 10px;
    line-height: 1.6;
}

.ailhj-card-pass-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--main-bg-color);
    transition: border-color 0.3s ease;
}

.ailhj-card-pass-input:focus {
    border-color: var(--ailhj-blue);
    outline: none;
}

/* ========== 支付按钮 ========== */
.ailhj-recharge-form .initiate-pay {
    margin-top: 24px;
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ailhj-red-light), var(--ailhj-red));
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(240, 62, 62, 0.3);
}

.ailhj-recharge-form .initiate-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 62, 62, 0.4);
}

.ailhj-recharge-form .initiate-pay .pay-price-text {
    margin-left: 8px;
    font-weight: 700;
}

/* ========== 响应式优化 ========== */
@media (max-width: 640px) {
    .ailhj-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ailhj-recharge-form {
        padding: 16px;
    }
    
    .ailhj-modal-header {
        padding: 16px 16px 0;
    }
    
    .ailhj-product-box {
        padding: 14px 10px;
    }
    
    .ailhj-product-price {
        font-size: 18px;
    }
    
    .ailhj-payment-box {
        padding: 12px 14px;
    }
}
