/* ========================================
   悬浮圆形头像页头模块样式
   ======================================== */

/* 悬浮头像容器 */
.header-avatar-floating {
    position: fixed;
    top: 20px;
    left: 20px;
    right: auto;
    z-index: 9999;
}

/* 头像按钮 */
.header-avatar-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    border: none;
    padding: 0;
    display: block;
}

.header-avatar-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-avatar-button:active {
    transform: scale(0.95);
}

/* 头像图片 */
.header-avatar-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 弹出菜单 */
.header-menu-popup {
    position: absolute;
    top: 40px;
    left: 0;
    right: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    padding: 8px 0;
    animation: slideDown 0.2s ease-out;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 菜单项 */
.header-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.header-menu-item:hover {
    background-color: #f3f4f6;
}

.header-menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.header-menu-item span {
    font-size: 14px;
    color: #1f2937;
}

/* 菜单分割线 */
.header-menu-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 8px 0;
}

/* 用户信息显示在菜单顶部 */
.header-menu-user-info {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

.header-menu-user-info .user-name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

.header-menu-user-info .user-role {
    font-size: 12px;
    color: #6b7280;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-avatar-floating {
        top: 10px;
        left: 10px;
    }

    .header-avatar-button {
        width: 32px;
        height: 32px;
    }

    .header-menu-popup {
        min-width: 140px;
    }
}
