﻿/* 修复原网站ul li布局冲突 */
.floating-cs-container ul,
.floating-cs-container li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.floating-cs-container * {
    box-sizing: border-box !important;
}

/* 主容器样式 - 修复定位问题 */
.floating-cs-container {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1050;
    display: flex;
    align-items: center;
}

/* 控制面板样式 - 始终可见 */
.control-panel {
    background: white;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1051;
    position: relative;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .control-btn:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }

    .control-btn.active {
        background: var(--primary-color);
        color: white;
    }

/* 内容面板样式 - 修复隐藏问题 */
.content-panel {
    width: 260px;
    background: white;
    border-radius: 15px 0 15px 15px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    z-index: 1050;
    position: absolute;
    right: 40px;
    top: 0;
    opacity: 0;
    visibility: hidden;
}

    .content-panel.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

/* 面板头部样式 */
.panel-header {
    background: var(--primary-color);
    color: white;
    padding: 10px;
    position: relative;
}

    .panel-header h5 {
        margin: 0;
        font-weight: 600;
        color:#FFF;
    }

    .panel-header p {
        margin: 5px 0 0 0;
        opacity: 0.9;
        font-size: 14px;
    }

.close-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/* 面板内容区域 */

.panel-content {
    padding: 5px;
    max-height: 200px;
    overflow-y: hidden;
}
.img-erwei {
    width:190px;
    height:190px;
    margin-left:30px;
}
.content-section {
    display: none;
}

    .content-section.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

/* 联系信息样式 */
.contact-info {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #555;
}

    .contact-item i {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        background: #f8f9fa;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
        color: var(--primary-color);
    }

/* 快速操作按钮网格 */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-btn {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    text-align: center;
}

    .quick-btn:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

/* 联系表单样式 */
.cs-form {
    display:flex;
    visibility:hidden;
}
.cs-form .form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

    .cs-form .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(65, 58, 164, 0.25);
    }

.btn-send {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    width: 100%;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-send:hover {
        background: var(--secondary-color);
        transform: translateY(-2px);
    }

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
        visibility:hidden;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        visibility:hidden;
    }
}

/* 响应式设计 */
@media (max-width: 576px) {
    .floating-cs-container {
        position: fixed;
        top: 15%;
        right: 0; /* 距离右侧 20px，不贴边 */
        transform: translateY(-50%); /* 垂直居中 */
        bottom: auto; /* 取消 bottom */
        left: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* 按钮组靠右对齐 */
    }

    .control-panel {
        flex-direction: column;
        gap: 10px;
        bottom:10px;
        top:15%;
    }

    .content-panel {
        flex-direction: column;
        right: 50px; /* 从主容器右侧偏移 */
        height: 200px;
        width:280px;
    }
}