/**
 * 子比主题注册收费插件 - 前端样式
 */

/* 弹窗基础样式 */
.zib-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.zib-modal.zib-modal-open {
    display: flex;
}

.zib-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zib-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zib-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.zib-modal-header i {
    margin-right: 8px;
    color: #667eea;
}

.zib-modal-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.zib-modal-close:hover {
    color: #333;
}

.zib-modal-body {
    padding: 24px;
}

.zib-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.zib-modal-footer .button {
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 6px;
}

.zib-modal-footer .button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

/* body打开弹窗时的样式 */
body.zib-modal-open {
    overflow: hidden;
}

/* 注册页面付费信息框 */
.zib-registration-fee-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #fff;
}

.zib-reg-fee-description {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.zib-reg-fee-description i {
    margin-right: 8px;
    font-size: 16px;
}

.zib-reg-fee-stock {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zib-reg-fee-stock i {
    margin-right: 8px;
}

.stock-used {
    color: #ffd700;
    font-weight: bold;
}

.stock-total {
    font-weight: bold;
}

.stock-remaining {
    background: #28a745;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.zib-reg-fee-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
}

.zib-reg-fee-amount i {
    margin-right: 8px;
}

.fee-price {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

.fee-free-tag {
    background: #28a745;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 付费弹窗 */
.zib-reg-fee-modal .zib-modal-content {
    max-width: 500px;
}

.zib-reg-fee-info {
    padding: 10px 0;
}

.fee-amount-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    color: #fff;
}

.fee-label {
    display: block;
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.fee-value {
    display: block;
    font-size: 48px;
    font-weight: bold;
}

.free-option {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #a5d6a7;
}

.free-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    color: #2e7d32;
}

.free-option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.free-option i {
    margin-right: 8px;
    color: #4caf50;
}

.payment-methods {
    margin-top: 20px;
}

.payment-title {
    text-align: center;
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.payment-buttons {
    display: flex;
    gap: 15px;
}

.payment-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.payment-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.payment-btn.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.payment-alipay {
    color: #1677ff;
}

.payment-alipay:hover,
.payment-alipay.active {
    border-color: #1677ff;
    background: #e6f4ff;
}

.payment-wechat {
    color: #07c160;
}

.payment-wechat:hover,
.payment-wechat.active {
    border-color: #07c160;
    background: #e6f9f0;
}

.payment-btn i {
    margin-right: 8px;
    font-size: 20px;
}

/* 登录页面样式优化 */
.login .zib-registration-fee-box {
    margin: 20px 0;
}

.login #zib-reg-fee-modal .button {
    padding: 8px 24px;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 767px) {
    .payment-buttons {
        flex-direction: column;
    }
    
    .zib-reg-fee-stock {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .zib-reg-fee-amount {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
