/* ==========================================================================
   float-widget.css — 右侧悬浮联系模块（首页 + 服务页共用）
   ─ 独立加载：首页只引 home-tech.css，服务页引 glass-ui.css，故本文件自带设计令牌
   ─ 交互：鼠标移入即展开、移出自动收起；触屏设备点击展开
   ========================================================================== */

:root {
    --fw-ink: #0b2545;
    --fw-ink-3: #7c8ba1;
    --fw-blue: #2563eb;
    --fw-blue-deep: #1d4ed8;
    --fw-line: rgba(19, 49, 92, .10);
    --fw-glass: linear-gradient(165deg, rgba(255, 255, 255, .97), rgba(247, 250, 255, .93));
    --fw-blur: blur(16px) saturate(120%);
    --fw-hi: inset 0 1px 0 rgba(255, 255, 255, .95);
    --fw-r: 16px;
    --fw-r-sm: 10px;
    --fw-sh-lg: 0 30px 80px rgba(19, 49, 92, .16);
    --fw-blue-50: #f2f7ff;
    --fw-ease: cubic-bezier(.22, .61, .36, 1);
}

.gl-float {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 900;
    transform: translateY(-50%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.gl-float * { box-sizing: border-box; }

.gl-float-inner {
    display: flex;
    flex-direction: column;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(180deg, #3f86f8 0%, #2563eb 52%, #1d4ed8 100%);
    box-shadow: 0 18px 44px rgba(19, 49, 92, .28), inset 0 1px 0 rgba(255, 255, 255, .30);
    transition: box-shadow .4s var(--fw-ease);
}
.gl-float:hover .gl-float-inner {
    box-shadow: 0 24px 56px rgba(19, 49, 92, .34), inset 0 1px 0 rgba(255, 255, 255, .36);
}

.gl-float-item { position: relative; }
.gl-float-item + .gl-float-item { border-top: 1px solid rgba(255, 255, 255, .20); }

/* 按钮与面板之间的“桥”：鼠标穿过空隙时不会闪断 */
.gl-float-item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    width: 14px;
}

.gl-float-btn {
    width: 76px;
    padding: 14px 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .3s var(--fw-ease);
}
.gl-float-item:first-child .gl-float-btn { border-radius: 14px 0 0 0; }
.gl-float-item:last-child .gl-float-btn { border-radius: 0 0 0 14px; }
.gl-float-btn:hover,
.gl-float-item.is-open .gl-float-btn { background: rgba(255, 255, 255, .17); }

.gl-float-ico {
    display: inline-flex;
    width: 26px;
    height: 26px;
    transition: transform .32s var(--fw-ease);
}
.gl-float-ico svg { width: 100%; height: 100%; }
.gl-float-item.is-open .gl-float-ico { transform: translateY(-1px) scale(1.07); }
.gl-float-label { white-space: nowrap; }

/* 面板：淡入 + 右滑 + 轻微缩放；展开略慢、收起略快，手感更顺 */
.gl-float-panel {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    width: 300px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 20px 18px;
    border-radius: var(--fw-r);
    background: var(--fw-glass);
    border: 1px solid var(--fw-line);
    box-shadow: var(--fw-hi), var(--fw-sh-lg);
    -webkit-backdrop-filter: var(--fw-blur);
    backdrop-filter: var(--fw-blur);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(16px, -50%) scale(.97);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    will-change: transform, opacity;
    scrollbar-width: thin;
    scrollbar-color: rgba(19, 49, 92, .2) transparent;
}
.gl-float-panel::-webkit-scrollbar { width: 6px; }
.gl-float-panel::-webkit-scrollbar-track { background: transparent; }
.gl-float-panel::-webkit-scrollbar-thumb { background: rgba(19, 49, 92, .18); border-radius: 3px; }

.gl-float-item.is-open .gl-float-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, -50%) scale(1);
    transition: opacity .3s var(--fw-ease), transform .34s var(--fw-ease), visibility 0s;
}

.gl-float-panel h4 {
    margin: 0;
    color: var(--fw-ink);
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.4;
}
.gl-float-panel p { margin: 6px 0 0; color: var(--fw-ink-3); font-size: 12.5px; line-height: 1.75; }

.gl-float-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
    padding: 11px 13px;
    border-radius: var(--fw-r-sm);
    background: var(--fw-blue-50);
    border: 1px solid rgba(37, 99, 235, .16);
}
.gl-float-row b {
    min-width: 0;
    color: var(--fw-blue-deep);
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.gl-float-copy {
    flex: 0 0 auto;
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(37, 99, 235, .28);
    border-radius: 8px;
    background: #fff;
    color: var(--fw-blue);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.gl-float-copy:hover { background: #f4f8ff; border-color: rgba(37, 99, 235, .5); }
.gl-float-copy.is-done { color: #0f766e; border-color: rgba(16, 185, 129, .34); background: #eefaf5; }

.gl-float-panel .gl-btn { margin-top: 14px; }
.gl-float-panel .gl-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .25s var(--fw-ease), box-shadow .3s var(--fw-ease), background .3s ease;
}
.gl-float-panel .gl-btn--block { width: 100%; }
.gl-float-panel .gl-btn--primary {
    color: #fff;
    background: linear-gradient(180deg, #5b93f7 0%, #2563eb 46%, #1d4ed8 100%);
    border-color: rgba(255, 255, 255, .22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .32),
        inset 0 -2px 0 rgba(0, 0, 0, .14),
        0 1px 0 #1e40af,
        0 10px 24px rgba(37, 99, 235, .26);
}
.gl-float-panel .gl-btn--primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -2px 0 rgba(0,0,0,.12), 0 1px 0 #1e40af, 0 16px 32px rgba(37, 99, 235, .32); }
.gl-float-panel .gl-btn--soft {
    color: var(--fw-blue-deep);
    background: #e3edfe;
    border-color: rgba(37, 99, 235, .16);
}
.gl-float-panel .gl-btn--soft:hover { transform: translateY(-2px); background: #d8e7fe; }

.gl-float-qr {
    display: block;
    margin-top: 13px;
    padding: 8px;
    border-radius: var(--fw-r-sm);
    background: #fff;
    border: 1px solid var(--fw-line);
}
.gl-float-qr img {
    display: block;
    width: 100%;
    max-height: 236px;
    object-fit: contain;
    border-radius: 9px;
}

/* ---------- 窄桌面：只留图标轨道，避免遮挡正文 ---------- */
@media (min-width: 768px) and (max-width: 1360px) {
    .gl-float-btn { width: 48px; padding: 12px 6px; }
    .gl-float-label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
        clip: rect(0 0 0 0);
    }
    .gl-float-panel { width: 292px; }
}

/* ---------- 手机端：收成一颗圆形按钮，进入「联系我们」查看全部通道 ---------- */
.gl-float-fab {
    position: fixed;
    right: 16px;
    bottom: 88px;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(180deg, #3f86f8, #1d4ed8);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .34), inset 0 1px 0 rgba(255, 255, 255, .30);
    -webkit-tap-highlight-color: transparent;
    transition: transform .28s var(--fw-ease), box-shadow .3s var(--fw-ease);
}
.gl-float-fab svg { width: 24px; height: 24px; }
.gl-float-fab:active { transform: scale(.94); }

@media (max-width: 767px) {
    .gl-float { display: none; }
    .gl-float-fab { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    .gl-float-panel,
    .gl-float-ico,
    .gl-float-inner,
    .gl-float-fab { transition: none !important; }
    .gl-float-item.is-open .gl-float-panel { transform: translate(0, -50%); }
}
