/* 购物车客服悬浮按钮 - 移植自官网主题 */
.cdn-service-float {
    position: fixed;
    right: 32px;
    bottom: 36px;
    z-index: 9999;
    font-family: inherit;
}

.cdn-service-toggle {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8cff 0%, #2268ef 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28), 0 5px 12px rgba(31, 41, 55, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.cdn-service-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.34), 0 8px 18px rgba(31, 41, 55, 0.14);
}

.cdn-service-toggle:focus-visible,
.cdn-service-action:focus-visible {
    outline: 3px solid rgba(73, 138, 255, 0.28);
    outline-offset: 3px;
}

.cdn-service-toggle svg {
    width: 29px;
    height: 29px;
    fill: currentColor;
}

.cdn-service-toggle .cdn-service-toggle-icon {
    width: 31px;
    height: 31px;
    fill: currentColor;
    overflow: visible;
}

.cdn-service-bubble-back,
.cdn-service-bubble-front {
    fill: currentColor;
}

.cdn-service-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 256px;
    padding: 18px 16px 15px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16), 0 8px 18px rgba(15, 23, 42, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 12px, 0) scale(0.98);
    transform-origin: right bottom;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.cdn-service-float.is-open .cdn-service-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    animation: cdnServicePanelIn 0.22s ease both;
}

.cdn-service-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.cdn-service-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8cff 0%, #2268ef 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.24);
}

.cdn-service-avatar svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.cdn-service-head h3 {
    margin: 0 0 3px;
    color: #1f2a44;
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
}

.cdn-service-head p {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 18px;
}

.cdn-service-account {
    min-height: 36px;
    border-radius: 5px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 10px;
    margin-bottom: 12px;
    color: #475569;
    font-size: 12px;
    line-height: 18px;
}

.cdn-service-account strong {
    color: #1d63ef;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.cdn-service-action {
    height: 46px;
    border-radius: 7px;
    background: linear-gradient(135deg, #3478f6 0%, #2563eb 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    line-height: 20px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 11px 20px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cdn-service-action:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3f83ff 0%, #1d58df 100%);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.cdn-service-action svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

@keyframes cdnServicePanelIn {
    0% {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.97);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .cdn-service-float {
        right: 18px;
        bottom: 24px;
    }

    .cdn-service-toggle {
        width: 54px;
        height: 54px;
    }

    .cdn-service-panel {
        right: 0;
        bottom: 70px;
        width: min(256px, calc(100vw - 36px));
    }
}

@media (max-width: 480px) {
    .cdn-service-float {
        right: 16px;
        bottom: 20px;
    }

    .cdn-service-panel {
        width: calc(100vw - 32px);
    }
}
