/* 全站客服悬浮 */
.cs-float {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9990;
    display: flex;
    align-items: stretch;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.cs-float-panel {
    display: none;
    align-items: stretch;
    gap: 10px;
    margin-right: 8px;
}

.cs-float.is-open .cs-float-panel {
    display: flex;
}

.cs-float-qr,
.cs-float-list {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
}

.cs-float-qr {
    width: 168px;
    padding: 18px 16px 14px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cs-float.has-qr .cs-float-qr {
    display: flex;
}

.cs-float-qr-box {
    width: 128px;
    height: 128px;
    border: 2px solid #93c5fd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

.cs-float-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cs-float-qr-name {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.cs-float-qr-link {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: background 0.15s, transform 0.15s;
}

.cs-float-qr-link:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-1px);
}

.cs-float-qr-link[hidden] {
    display: none !important;
}

.cs-float-list {
    width: 220px;
    padding: 14px 12px 12px;
    position: relative;
}

.cs-float-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.cs-float-close:hover {
    color: #475569;
}

.cs-float-items {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.cs-float-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    color: #334155;
    transition: background .15s, color .15s;
}

.cs-float-item:hover,
.cs-float-item.is-active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
}

.cs-float-item-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.cs-float-item-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cs-float-item-text {
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
}

.cs-float-item-name {
    font-weight: 600;
}

.cs-float-item-hours {
    color: inherit;
    opacity: 0.75;
    font-weight: 400;
}

.cs-float-toggle {
    box-sizing: border-box;
    width: 52px;
    min-height: 156px;
    border: 0;
    border-radius: 22px 0 0 22px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* 右侧贴边留足内边距，避免文字挤在屏幕边缘 */
    padding: 20px 14px 20px 10px;
    box-shadow: -2px 4px 16px rgba(37, 99, 235, 0.35);
}

.cs-float-toggle:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.cs-float-toggle-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.cs-float-toggle-text {
    writing-mode: vertical-rl;
    letter-spacing: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 0;
}

@media (max-width: 768px) {
    .cs-float {
        top: auto;
        bottom: 80px;
        transform: none;
    }

    .cs-float-panel {
        flex-direction: column-reverse;
        margin-right: 6px;
        max-width: calc(100vw - 60px);
    }

    .cs-float-list {
        width: 200px;
    }

    .cs-float-qr {
        width: 200px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 14px 12px 12px;
    }

    .cs-float-qr-box {
        width: 112px;
        height: 112px;
    }

    .cs-float-qr-name {
        margin-top: 10px;
        text-align: center;
    }

    .cs-float-qr-link {
        margin-top: 10px;
    }

    .cs-float-toggle {
        min-height: 136px;
        width: 48px;
        padding: 18px 13px 18px 9px;
        gap: 8px;
    }

    .cs-float-toggle-text {
        letter-spacing: 3px;
        padding: 2px 0;
    }
}
