.cs-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
}

.cs-contact-trigger {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background-color: #4a6bff;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 14px;
}

.cs-contact-trigger .cs-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.cs-contact-trigger .cs-label {
    margin-top: 5px;
    font-size: 12px;
}

/* 弹窗基础样式（通过 active 类控制显隐） */
.cs-contact-popup {
    position: absolute;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 16px 20px;
    border-radius: 8px;
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* 激活状态（由 JS 添加/移除） */
.cs-contact-popup.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 弹窗内部内容样式 */
.cs-phone-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-phone-icon {
    color: #2563eb;
    font-size: 1.6em;
    flex-shrink: 0;
}

.cs-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-title {
    font-weight: 600;
    color: #333;
}

.cs-phone-number {
    font-size: 1.2em;
    font-weight: 700;
    color: #1e3a8a;
}

.cs-qr-wrapper {
    text-align: center;
    margin-top: 8px;
}

.cs-popup-item img {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.cs-qr-text {
    font-size: 0.7em;
    color: #64748b;
    margin-top: 8px;
}

.cs-popup-item {
    margin-bottom: 16px;
}

.cs-popup-item:last-child {
    margin-bottom: 0;
}

/* PC端定位 */
@media (min-width: 768px) {
    .cs-contact-popup {
        right: calc(100% + 8px); /* 按钮左侧+8px间距 */
        top: -80px; /* 垂直偏移（根据按钮位置调整） */
    }

    .cs-contact-trigger:hover {
        background-color: #3a58e6; /* 悬停变色反馈 */
    }
}

/* 移动端定位 */
@media (max-width: 768px) {
    .cs-contact-popup {
        top: 0;
        right: calc(100% + 10px); /* 按钮左侧+10px间距 */
        transform: none;
    }

    .cs-contact-popup {
        min-width: 280px;
        padding: 18px 24px;
    }

    /* 极小屏居中显示 */
    @media (max-width: 360px) {
        .cs-contact-popup {
            left: 50%;
            transform: translateX(-50%);
            min-width: 90%;
        }
    }
}
