/**
 * 微信登录前端样式
 *
 * 微信品牌色：#07C160
 * 用于登录按钮、扫码弹窗等场景
 */

/* ============================================
   微信登录按钮
   ============================================ */

.wx-login-wrap {
    text-align: center;
    margin: 20px 0;
}

.wx-login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    color: #999;
    font-size: 13px;
}

.wx-login-divider::before,
.wx-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.wx-login-divider span {
    padding: 0 15px;
    white-space: nowrap;
}

.wx-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    padding: 12px 24px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
    line-height: 1.5;
}

.wx-login-btn:hover {
    background: #06ad56;
    box-shadow: 0 4px 16px rgba(7, 193, 96, 0.4);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.wx-login-btn:active {
    background: #059a4c;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(7, 193, 96, 0.3);
}

/* 微信图标 SVG */
.wx-login-btn .wx-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.wx-login-btn .wx-icon svg {
    fill: #fff;
    width: 100%;
    height: 100%;
}

/* ============================================
   WordPress 登录页面中的微信登录
   ============================================ */

.login .wx-login-wrap {
    margin-top: 16px;
}

.login .wx-login-btn {
    max-width: 100%;
}

/* ============================================
   扫码弹窗样式
   ============================================ */

.wx-qrcode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: wxFadeIn 0.2s ease;
}

.wx-qrcode-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wx-qrcode-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: wxSlideUp 0.3s ease;
    max-width: 400px;
    width: 90%;
}

.wx-qrcode-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #333;
}

.wx-qrcode-content p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #999;
}

.wx-qrcode-content iframe {
    border: none;
    width: 300px;
    height: 400px;
}

.wx-qrcode-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.wx-qrcode-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   微信用户信息展示（用户资料页）
   ============================================ */

.wx-user-avatar {
    border-radius: 50%;
    border: 2px solid #07C160;
}

/* ============================================
   动画
   ============================================ */

@keyframes wxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================
   报名表单
   ============================================ */

.wx-register-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 16px;
}

.wx-reg-header {
    text-align: center;
    margin-bottom: 24px;
}

.wx-reg-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

/* 步骤引导 */
.wx-reg-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 24px 0;
    padding: 0 20px;
}

.wx-reg-step {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.wx-reg-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e5e5;
    color: #999;
    font-size: 14px;
    font-weight: 600;
}

.wx-reg-step.active .step-num {
    background: #07C160;
    color: #fff;
}

.wx-reg-step .step-text {
    font-size: 14px;
    color: #666;
}

.wx-reg-step-line {
    flex: 1;
    height: 2px;
    background: #e5e5e5;
    margin: 0 12px;
    min-width: 20px;
}

/* 付款区域 */
.wx-reg-payment-section {
    background: #f8faf8;
    border: 1px solid #e8f5e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.wx-reg-payment-section h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #333;
}

.wx-reg-amount {
    margin-bottom: 16px;
}

.wx-reg-amount-label {
    font-size: 14px;
    color: #666;
}

.wx-reg-amount-value {
    font-size: 32px;
    font-weight: 700;
    color: #fa5151;
}

.wx-reg-qrcode img {
    max-width: 240px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.wx-reg-qrcode-tip {
    margin-top: 12px;
    font-size: 13px;
    color: #999;
}

.wx-reg-qrcode-placeholder {
    padding: 30px;
    color: #999;
}

/* 表单 */
.wx-reg-form h3 {
    font-size: 18px;
    color: #333;
    margin: 24px 0 16px;
}

.wx-reg-field {
    margin-bottom: 16px;
}

.wx-reg-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.wx-reg-field label .required {
    color: #fa5151;
}

.wx-reg-field input[type="text"],
.wx-reg-field input[type="tel"],
.wx-reg-field input[type="email"],
.wx-reg-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wx-reg-field input:focus,
.wx-reg-field textarea:focus {
    border-color: #07C160;
    outline: none;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

/* 上传区域 */
.wx-reg-upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
    cursor: pointer;
}

.wx-reg-upload-area:hover,
.wx-reg-upload-area.dragover {
    border-color: #07C160;
    background: #f8faf8;
}

.wx-reg-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.wx-reg-upload-placeholder {
    padding: 40px 20px;
    text-align: center;
}

.wx-reg-upload-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.wx-reg-upload-placeholder p {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

.wx-reg-upload-hint {
    font-size: 12px !important;
    color: #999 !important;
}

.wx-reg-upload-preview {
    padding: 20px;
    text-align: center;
    position: relative;
}

.wx-reg-upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.wx-reg-upload-remove {
    display: block;
    margin: 12px auto 0;
    padding: 6px 16px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.wx-reg-upload-remove:hover {
    border-color: #fa5151;
    color: #fa5151;
}

/* 提交按钮 */
.wx-reg-submit {
    margin-top: 24px;
    text-align: center;
}

.wx-reg-submit-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 40px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
}

.wx-reg-submit-btn:hover {
    background: #06ad56;
    box-shadow: 0 4px 16px rgba(7, 193, 96, 0.4);
    transform: translateY(-1px);
}

/* 成功/错误提示 */
.wx-reg-success {
    text-align: center;
    padding: 40px 20px;
    background: #f0faf0;
    border-radius: 12px;
    border: 1px solid #d4efd4;
}

.wx-reg-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.wx-reg-success h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #07C160;
}

.wx-reg-success p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.wx-reg-error {
    padding: 12px 16px;
    background: #fff3f3;
    border: 1px solid #fde0e0;
    border-radius: 8px;
    color: #d93025;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ============================================
   响应式适配
   ============================================ */

@media (max-width: 480px) {
    .wx-login-btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .wx-qrcode-content {
        padding: 24px;
    }

    .wx-qrcode-content iframe {
        width: 260px;
        height: 360px;
    }
}
