@charset "utf-8";

/*浮动客服*/
.toolbar {
    position: fixed;
    top: 50%;
    right: 1%;
    /* 原高度约 328px (4个*80px + 3个*2px margin)，现增加1个变为 5个按钮 */
    /* 新总高度约 410px (5*80 + 4*2)，一半是 205px */
    margin-top: -205px; 
    z-index: 100;
    width: 80px;
}

.toolbar dd {
    position: relative;
    float: left;
    width: 80px;
    height: 80px;
    background: #017045;
    margin: 2px 0 0 0;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    line-height: 21px;
    text-align: center;
    cursor: pointer;
    transition: all .5s;
}

.toolbar dd:first-child {
    margin-top: 0;
}

.toolbar dd i {
    width: 100%;
    height: 30px;
    display: block;
    margin-top: 13px;
    /* 确保这里指向你的雪碧图路径 */
    background: url(../images/toolbar.png) no-repeat center 0;
}

/* 原有图标位置保持不变 */
.toolbar dd.qq i { background-position-y: 0; }
.toolbar dd.tel i { background-position-y: -30px; }
.toolbar dd.code i { background-position-y: -60px; }
.toolbar dd.top i { background-position-y: -90px; }

/* 【新增】邮箱图标位置：假设你在雪碧图中新增了邮箱图标，排在第5位 */
/* 如果雪碧图没改，建议单独给 email i 设置 background-image */
.toolbar dd.email i {
    background: url(../images/email.png) no-repeat center center;
    background-size: 40px 40px; /* 根据实际图标大小调整 */
}
.toolbar dd span {
    display: block;
    color: #fff;
    text-align: center;
}

/* 电话弹出框样式 (保持原样) */
.toolbar dd.tel .box {
    position: absolute;
    top: 0;
    width: 190px;
    right: -200px;
    height: 100%;
    margin-right: 10px;
    border-radius: 5px;
    background: #017045;
    opacity: 0;
    transition: all .5s;
    text-align: center;
}

.toolbar dd.tel .box p {
    font-size: 14px;
    margin: 15px auto 7px;
    text-align: center;
}

.toolbar dd.tel .box h3 {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.toolbar dd.tel .box:after {
    display: block;
    content: " ";
    border-style: solid dashed dashed dashed;
    border-color: transparent transparent transparent #017045;
    border-width: 9px;
    width: 0;
    height: 0;
    position: absolute;
    top: 50%;
    margin-top: -9px;
    right: -18px;
    margin-left: -12px;
}

/* 微信/二维码弹出框样式 (保持原样) */
.toolbar dd.code .box {
    position: absolute;
    top: 0;
    width: 162px;
    right: -172px;
    height: 162px;
    margin-right: 10px;
    border-radius: 5px;
    background: #017045;
    opacity: 0;
    transition: all .5s;
}

.toolbar dd.code .box img {
    width: 140px;
    height: 140px;
    padding: 11px;
}

.toolbar dd.code .box:after {
    display: block;
    content: " ";
    border-style: solid dashed dashed dashed;
    border-color: transparent transparent transparent #017045;
    border-width: 9px;
    width: 0;
    height: 0;
    position: absolute;
    top: 30px;
    right: -18px;
    margin-left: -12px;
}

/* 【新增】邮箱弹出框样式 */
.toolbar dd.email .box {
    position: absolute;
    top: 0;
    width: 220px; /* 邮箱地址较长，宽度设大一点 */
    right: -230px;
    height: 60px; /* 高度不需要像二维码那么大 */
    margin-right: 10px;
    border-radius: 5px;
    background: #017045;
    opacity: 0;
    transition: all .5s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.toolbar dd.email .box span {
    color: #fff;
    font-size: 14px;
    word-break: break-all;
    line-height: 1.4;
}

/* 邮箱弹出框的小箭头 */
.toolbar dd.email .box:after {
    display: block;
    content: " ";
    border-style: solid dashed dashed dashed;
    border-color: transparent transparent transparent #017045;
    border-width: 9px;
    width: 0;
    height: 0;
    position: absolute;
    top: 50%; /* 垂直居中 */
    margin-top: -9px;
    right: -18px;
}

/* 悬停效果 */
.toolbar dd:hover {
    background: #333;
}

.toolbar dd.tel:hover .box {
    opacity: 1;
    right: 80px;
}

.toolbar dd.code:hover .box {
    opacity: 1;
    right: 80px;
}

/* 【新增】邮箱悬停效果 */
.toolbar dd.email:hover .box {
    opacity: 1;
    right: 80px;
}
