/* 悬浮侧边栏样式 */
.floating-sidebar {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    transition: right 0.3s ease;
}

/* 收起状态 - 只显示人工客服和展开按钮 */
.floating-sidebar.collapsed {
    right: 10px;
}

.floating-sidebar.collapsed .floating-sidebar-item:not(.customer-service) {
    display: none;
}

.floating-sidebar.collapsed .floating-sidebar-toggle {
    display: flex; /* 收起状态下显示展开按钮 */
}

.floating-sidebar.collapsed .floating-sidebar-expand {
    display: none; /* 收起状态下隐藏左侧展开按钮 */
}

/* 悬浮侧边栏容器 */
.floating-sidebar-container {
    background: #fff;
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 0 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 按钮列表 */
.floating-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 单个按钮项 */
.floating-sidebar-item {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    background: #fff;
}

/* 人工客服按钮特殊样式 */
.floating-sidebar-item.customer-service {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}

.floating-sidebar-item.customer-service .item-icon {
    color: #fff;
}

.floating-sidebar-item.customer-service .item-text {
    color: #fff;
}

/* 回到顶部按钮特殊样式 */
.floating-sidebar-item.back-to-top {
    background: #f6f7f9;
}

.floating-sidebar-item:last-child {
    border-bottom: none;
}

/* 悬停效果 - 统一所有按钮 */
.floating-sidebar-item:hover {
    background: linear-gradient(135deg, #d74339 0%, #d74339 100%) !important;
    transform: translateX(-5px);
}

.floating-sidebar-item:hover .item-icon {
    color: #fff !important;
    transform: scale(1.1);
}

.floating-sidebar-item:hover .item-text {
    color: #fff !important;
}

.floating-sidebar-item:hover .item-icon svg {
    stroke: #fff !important;
}

/* 图标样式 */
.item-icon {
    font-size: 24px;
    color: #d74339;
    /* margin-bottom: 2px; */
    transition: all 0.3s ease;
}

/* 文字样式 */
.item-text {
    font-size: 12px;
    color: #333;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}

/* 收起按钮 */
.floating-sidebar-toggle {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f6f7f9;
    border-top: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.floating-sidebar-toggle:hover {
    background: #d74339;
}

.floating-sidebar-toggle:hover .toggle-icon {
    color: #fff;
}

.toggle-icon {
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* 展开状态显示"收起" */
.floating-sidebar:not(.collapsed) .toggle-icon::before {
    content: '收起';
}

/* 收起状态显示"展开" */
.floating-sidebar.collapsed .toggle-icon::before {
    content: '展开';
}

/* 呼吸灯动画 - 应用到整个侧边栏 */
@keyframes breathing {
    0%, 100% {
        box-shadow: -2px 0 16px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: -2px 0 20px rgba(215, 67, 57, 0.3),
                    0 0 30px rgba(215, 67, 57, 0.2);
    }
}

.floating-sidebar-container {
    animation: breathing 3s ease-in-out infinite;
}

/* 展开按钮（收起状态下显示） */
.floating-sidebar-expand {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d74339 0%, #d74339 100%);
    border-radius: 8px 0 0 8px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.floating-sidebar.collapsed .floating-sidebar-expand {
    display: flex;
}

.floating-sidebar-expand:hover {
    background: linear-gradient(135deg, #c23a30 0%, #c23a30 100%);
    transform: translateY(-50%) translateX(-3px);
}

.expand-icon {
    font-size: 14px;
    color: #fff;
    writing-mode: vertical-rl;
    letter-spacing: 2px;
    font-weight: 500;
}

/* 响应式：小于1200px时隐藏（虽然只考虑PC端，但防止意外） */
@media (max-width: 1200px) {
    .floating-sidebar {
        display: none;
    }
}

/* SVG 图标样式 */
.item-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.floating-sidebar-item.customer-service .item-icon svg {
    stroke: #fff;
}

.floating-sidebar-item:not(.customer-service) .item-icon svg {
    stroke: #d74339;
}

.floating-sidebar-item.back-to-top .item-icon svg {
    stroke: #666;
}
