.presto-header{
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    position: fixed;
    background: #fff;
    line-height: 3.5em;
    box-shadow: 0 0 2em rgba(0, 0, 0, .1);
}

.presto-header .wrap{
    display: flex;
    flex-wrap: wrap;
}

/* 手机版菜单按钮 */
.presto-header .head-toggle, .presto-header .user-login{
    display: none;
    cursor: pointer;
}

.presto-header .head-toggle .fa{
    font-size: 1.2em;
    vertical-align: middle;
}

.presto-header .head-logo{
    flex: 0 1 auto;
    color: var(--red);
}
.presto-header .head-logo img{
    height: 2em;
    cursor: pointer;
}

.presto-header .head-menu{
    display: flex;
    flex: 1 1 auto;
    margin: 0 3em;
    justify-content: end;
}

/* 只有 WP 这里的菜单带 a 链接 */
.presto-header .user-login a{
    color: inherit;
}

/* 暂时隐藏二级页面 */
.head-menu .children{ display: none }

.presto-header .head-menu a{
    color: inherit;
    display: block;
    font-weight: bold;
    /* margin-right: 2em; */
    position: relative;
}
.presto-header .head-menu li.active a:before{
    content: "";
    top: 0;
    left: 0;
    right: 0;
    display: block;
    position: absolute;
    border-top: 2px solid red;
}

/* WordPress 独有结构优化 */
.presto-header .head-menu{
    list-style: none;
}
.presto-header .head-menu li{
    font-size: .875em;
    margin-right: 2em;
}
.presto-header .head-menu li:last-child{
    margin-right: 0;
}

/*@media screen and (max-width: 970px){
    .presto-header .head-toggle, .presto-header .user-login{
        display: block;
    }
    .presto-header .head-logo{
        flex: 1 1 auto;
        text-align: center;
    }
    .presto-header .head-menu{
        order: 1;
        margin: 0;
        display: none;
        flex: 0 0 100%;
        flex-direction: column;
    }

    .presto-header.active .head-menu{
        display: flex;
    }

    .presto-header .head-menu li.active a:before{
        display: inline;
        position: static;
        border-top: none;
        margin-right: .5em;
        border-left: 2px solid red;
    }
}*/

.presto-header .head-action{
    flex: 0 1 auto;
    font-size: .875em;
}

/* 二级菜单与图标 */
.presto-header .user-menu, .presto-header .user-icon{
    cursor: pointer;
    position: relative;
    display: inline-block;
}

/* 登录 */
.presto-header .user-icon .btn{
    line-height: 1.5;
    padding: .5em 1.5em;
}

@media screen and (max-width: 970px){
    .presto-header .user-icon{
        display: none;
    }
    .presto-header .user-login{
        display: block;
    }
    .presto-header .head-logo img{
        height: 24px;
    }
}

/* 用户菜单的头像名称 */
.presto-header .user-menu .avatar{
    height: 2em;
    border-radius: 4em;
}
.presto-header .user-menu .username{
    margin-left: .75em;
}

/* 二级菜单 */
.presto-header .user-menu .menu-item{
    top: 3.5em;
    right: 0;
    position: absolute;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    padding: .5em 0;
    overflow: hidden;
    line-height: 1.5;
    white-space: nowrap;

    background: #fff;
    border-radius: .5em;
    box-shadow: 0 0 1em rgba(0, 0, 0, .2);
    transition: opacity .2s, visibility .2s;
}

.presto-header .user-menu:hover .menu-item{
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* 二级菜单项 */
.presto-header .user-menu .menu-item a{
    color: inherit;
    display: block;
    padding: .5em 2em;
}
.presto-header .user-menu .menu-item .active{
    color: var(--red);
    background: cornsilk;
}

.presto-header .user-menu .menu-item a:hover{
    color: var(--red);
    background: #eee;
}

.presto-header .user-menu .menu-item .fa{
    margin-right: .5em;
}

@media screen and (max-width: 1080px){
    .presto-header .user-menu .username{
        display: none;
    }
}
