/**
 * 右侧悬浮栏组件
 */

 * {
    box-sizing: border-box !important;
}

.agaw-floating-bar .floating-bar-container {
    position: fixed;
    right: 30px;
    bottom: 80px;
    z-index: 1000;
}

.agaw-floating-bar .floating-bar {
    display: flex;
    flex-direction: column;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.9);
    
}

.agaw-floating-bar .floating-card {
    width: 50px;
    height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.agaw-floating-bar .floating-card:hover {
    color: #15a3f9; 
}

/* .agaw-floating-bar .floating-card.active {
    color: #15a3f9;
} */

/* 默认显示的图片 */
.agaw-floating-bar .floating-card .default-img {
    width: 48px;
    height: auto;
    display: block;
    transition: opacity 0.4s ease;
}

/* 悬停时显示的图片 */
.agaw-floating-bar .floating-card .hover-img {
    width: 48px;
    height: auto;
    position: absolute;
    top: 8px;
    left: 1px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* 鼠标悬停时的效果 */
.agaw-floating-bar .floating-card:hover .default-img {
    opacity: 0;
}

.agaw-floating-bar .floating-card:hover .hover-img {
    opacity: 1;
}

/* 活动按钮动画效果 - 底部固定上部摇摆 */
.agaw-floating-bar #promo-card .hover-img,
.agaw-floating-bar #promo-card .default-img {
    animation: agaw-floating-bar-treeSway 2s ease-in-out infinite;
    transform-origin: bottom center;
    width: 40px; /* 比客服按钮小 */
    height: auto;
    top: 13px;
    left: 4px;
}

@keyframes agaw-floating-bar-treeSway {
    0% {
        transform: rotate(-7deg);
    }
    15% {
        transform: rotate(-4deg);
    }
    30% {
        transform: rotate(-1deg);
    }
    45% {
        transform: rotate(2deg);
    }
    60% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(3deg);
    }
    85% {
        transform: rotate(0deg);
    }
    92% {
        transform: rotate(-3deg);
    }
    100% {
        transform: rotate(-7deg);
    }
}

.agaw-floating-bar .card-icon {
    font-size: 24px;
}

.agaw-floating-bar .card-text {
    font-size: 14px;
    font-weight: 500;
}

.agaw-floating-bar .floating-panel {
    position: fixed;
    right: -400px;
    bottom: 70px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 999;
    padding: 0;
    opacity: 0;
    display: flex;
    align-items: center;
}

.agaw-floating-bar .floating-panel.active {
    right: 100px;
    opacity: 1;
    bottom: 130px;
}

.agaw-floating-bar .active-panel {
    position: fixed;
    right: -400px;
    bottom: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 999;
    padding: 20px 13px;
    opacity: 0;
    display: flex;
    align-items: center;
}

.agaw-floating-bar .active-panel.active {
    right: 100px;
    opacity: 1;
    bottom: 20px;
    height: 210px;
}

.agaw-floating-bar .active-panel::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid white; /* 白色背景 */
}

/* 修改1: 客服面板右侧箭头设置为小箭头并且背景色为蓝色 */
.agaw-floating-bar .floating-panel::after {
    content: "";
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #0072e7; /* 蓝色背景 */
}

.agaw-floating-bar .panel-content {
    position: relative;
    width: 100%;
}

.agaw-floating-bar .service-panel {
    width: 150px;
    height: 150px;
}

.agaw-floating-bar .promo-panel {
    width: 330px;
    height: 170px;
}

.agaw-floating-bar .panel-header {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 10px 5px;
    position: relative;
    color: #525353;
}

.agaw-floating-bar .panel-header:hover {
    background-color: #f3f8ff;
    border-radius: 8px;
    color: #15a3f9; 
}

/* 修改3: 在左侧图片添加灰色圆圈背景 */
.agaw-floating-bar .panel-header .img-container {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.agaw-floating-bar .panel-header img {
    width: 30px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.agaw-floating-bar .panel-tip {
    font-size: 13px;
    text-align: left;
    margin-bottom: 5px;
    margin-left: 10px;
    margin-top: 10px;
    font-weight: normal;
    line-height: 10px;
}

.agaw-floating-bar .panel-title {
    font-size: 16px;
    font-weight: normal;
    line-height: 30px;
    margin: 0;
}

.agaw-floating-bar .panel-description {
    font-size: 13px;
    line-height: 1.4;
    /* color: #767171; */
}

.agaw-floating-bar .panel-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

/* 修改4: 添加向右的灰色箭头 */
.agaw-floating-bar .panel-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    border-top: 2px solid #6c757d;
    border-right: 2px solid #6c757d;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.agaw-floating-bar .panel-title:hover {
    color: #15a3f9; 
}

.agaw-floating-bar .panel-text-content:hover {
    color: #15a3f9; 
}

.agaw-floating-bar .panel-description:hover {
    color: #15a3f9; 
}

.agaw-floating-bar .panel-arrow:hover {
    color: #15a3f9;
}

.agaw-floating-bar .qrcode-container {
    text-align: center;
}

.agaw-floating-bar .qrcode-img {
    width: 150px;
    height: auto;
}

.agaw-floating-bar .qrcode {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 1px solid #eee;
}

@media (max-width: 768px) {
    .agaw-floating-bar .promo-panel {
        width: 260px;
        height: 170px;
    }
    .agaw-floating-bar .active-panel.active{
        right: 80px;
        opacity: 1;
        height: 230px;
    }

    .agaw-floating-bar .floating-bar-container {
        right: 10px;
    }

    .agaw-floating-bar .floating-panel.active {
        right: 80px;
    }

}