/**
 * 个人信息管理样式
 * @author ningning.cheng
 */

/* 个人信息模态框 */
.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.profile-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-tab:hover {
    color: var(--primary-color);
}

.profile-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.profile-tab-content {
    padding-top: 8px;
}

/* 头像上传区域 */
.avatar-upload-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--primary-color);
    color: white;
}

.avatar-placeholder.male {
    background: #3b82f6;
}

.avatar-placeholder.female {
    background: #ec4899;
}

.avatar-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 性别选择器 */
.gender-selector {
    display: flex;
    gap: 16px;
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.gender-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.gender-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.gender-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: var(--font-semibold);
}

/* 导航栏头像图片 */
.user-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-info:hover {
    background: var(--bg-secondary);
}

/* ========== 微信绑定样式 ========== */

.wechat-bind-section {
    padding: 16px 0;
}

/* 已绑定微信状态 */
.wechat-bound-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
}

.wechat-status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
}

.wechat-status-icon.bound {
    background: #f0fdf4;
}

.wechat-bound-text h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.wechat-bound-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.wechat-actions {
    margin-top: 16px;
}

/* 未绑定微信状态 */
.wechat-unbind-info {
    text-align: center;
}

.wechat-qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
}

.wechat-bind-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.wechat-bind-tip svg {
    flex-shrink: 0;
}

.wechat-qrcode-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 8px;
    margin-bottom: 16px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-bind-frame {
    border: none;
    width: 300px;
    height: 400px;
}

.wechat-loading {
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}

.wechat-qrcode-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    color: var(--text-secondary);
}

.wechat-refresh-btn {
    margin-top: 8px;
}

/* 危险按钮样式 */
.btn-danger {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .wechat-bind-frame {
        width: 260px;
        height: 350px;
    }
    
    .wechat-qrcode-wrapper {
        min-height: 280px;
    }
}
