/**
 * Elementor Pro 主题生成器用户登录/用户界面样式
 */

/* 用户容器样式 */
.elementor-user-container {
    position: relative;
    display: inline-block;
}

/* 用户图标样式 */
.elementor-user-icon {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.elementor-user-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

/* 用户链接样式 */
.elementor-user-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.elementor-user-link:hover {
    text-decoration: none;
    color: inherit;
}

/* 用户名显示样式 */
.user-name {
    margin-left: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
}

/* 登录状态指示器 */
.elementor-user-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
    transition: background-color 0.3s ease;
}

.elementor-user-container.logged-in::after {
    background-color: #4CAF50;
}

/* 用户下拉菜单样式 */
.elementor-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 5px;
}

.elementor-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.elementor-user-dropdown-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.elementor-user-dropdown-item:last-child {
    border-bottom: none;
}

.elementor-user-dropdown-item:hover {
    background-color: #f8f9fa;
}

.elementor-user-dropdown-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .elementor-user-container {
        margin: 0 10px;
    }
    
    .elementor-user-icon {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .user-name {
        display: none; /* 在移动端隐藏用户名 */
    }
    
    .elementor-user-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        min-width: 90%;
        max-width: 300px;
    }
    
    .elementor-user-dropdown.active {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 登录/注册按钮样式 */
.elementor-login-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.elementor-login-btn,
.elementor-register-btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.elementor-login-btn {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.elementor-login-btn:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #fff;
}

.elementor-register-btn {
    background-color: transparent;
    color: #0073aa;
    border-color: #0073aa;
}

.elementor-register-btn:hover {
    background-color: #0073aa;
    color: #fff;
}

/* 用户头像样式 */
.elementor-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 动画效果 */
@keyframes userIconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.elementor-user-icon.new-notification {
    animation: userIconPulse 0.6s ease-in-out;
}

/* 通知徽章 */
.elementor-user-notification {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ff4444;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 加载状态 */
.elementor-user-container.loading .elementor-user-icon {
    opacity: 0.6;
    pointer-events: none;
}

.elementor-user-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 