/* 弹窗遮罩层 */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 弹窗容器 */
.payment-dialog {
    background: white;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #909399;
    cursor: pointer;
    z-index: 10;
}

.close-btn:hover {
    color: #606266;
}

/* 内容区域 */
.dialog-content {
    padding: 32px;
}

/* 支付信息 */
.payment-info {
    text-align: center;
    margin-bottom: 32px;
}

.purchase-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.prompt-name {
    color: #333;
    font-weight: 500;
    margin: 0 4px;
}

.price {
    color: #FF9318;
    font-weight: bold;
    font-size: 18px;
    margin: 0 4px;
}

/* 二维码区域 */
.qr-code-section {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.qr-code-container {
    width: 200px;
    height: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.qr-code {
    border-radius: 4px;
}

.qr-loading {
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.loading-text {
    color: #999;
    font-size: 14px;
}

/* 支付详情 */
.payment-details {
    margin-bottom: 32px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.label {
    color: #666;
}

.value {
    color: #333;
    font-weight: 500;
}

/* 底部按钮 */
.dialog-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.modal-btn {
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.cancel-btn {
    background: white;
    border: 1px solid #d9d9d9;
    color: #666;
    min-width: 80px;
}

.cancel-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.complete-btn {
    background-color: #1890ff;
    border: 1px solid #1890ff;
    color: white;
    min-width: 120px;
}

.complete-btn:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* --- 限时免费特有样式 --- */
.original-price {
    color: #999;
    text-decoration: line-through;
    font-weight: normal;
    margin: 0 4px;
}

.free-promotion-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.free-badge {
    margin-bottom: 16px;
}

.badge-text {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.promotion-text {
    text-align: center;
}

.promotion-text p {
    margin: 4px 0;
    font-size: 14px;
    color: #856404;
    line-height: 1.4;
}

.discount-amount {
    color: #059669;
    font-weight: 600;
}

.total-row {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 12px;
    font-weight: 600;
}

.final-price {
    color: #059669;
    font-size: 16px;
    font-weight: 700;
}

.confirm-btn {
    background-color: #059669;
    border: 1px solid #059669;
    color: white;
    min-width: 120px;
}

.confirm-btn:hover {
    background-color: #047857;
    border-color: #047857;
}

.confirm-btn:disabled {
    background-color: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
}

/* 确认弹窗特定样式 */
.payment-dialog-confirm {
    width: 420px;
}

.confirm-icon-area {
    text-align: center;
    margin-bottom: 20px;
}

.confirm-icon-area i {
    font-size: 48px;
    color: #52C41A;
    /* 成功绿 */
}

.confirm-icon-area i.info {
    color: #1890FF;
    /* 提示蓝 */
}

.confirm-title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.confirm-message {
    text-align: center;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .payment-dialog {
        width: 90%;
    }

    .dialog-content {
        padding: 20px;
    }

    .qr-code-container {
        width: 160px;
        height: 160px;
    }
}