/* 左侧悬浮伸缩报价按钮 */
.quote-fab {
    position: fixed;
    left: 0;
    top: 50%;
    z-index: 40;
    display: block;
    width: 56px;
    height: 158px;
    padding: 0;
    border: 0;
    border-radius: 0 18px 18px 0;
    overflow: hidden;
    color: #fff;
    font: inherit;
    cursor: pointer;
    background: linear-gradient(180deg, #e61414 0%, #d00002 55%, #b30002 100%);
    box-shadow: 6px 0 20px rgba(208, 0, 2, .25), inset 0 1px 0 rgba(255, 255, 255, .25);
    transform: translateY(-50%);
    transition: width .42s cubic-bezier(.22, .7, .3, 1),
                height .42s cubic-bezier(.22, .7, .3, 1),
                border-radius .42s cubic-bezier(.22, .7, .3, 1),
                opacity .25s ease,
                transform .25s ease,
                box-shadow .3s ease,
                filter .2s ease;
    -webkit-tap-highlight-color: transparent;
}

.quote-fab__side {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    opacity: 1;
    transition: opacity .16s ease;
}

.quote-fab__icon {
    flex: none;
    width: 20px;
    height: 20px;
}

.quote-fab__side-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.quote-fab__main {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 0 34px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity .2s ease;
}

.quote-fab__text {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .2px;
}

.quote-fab__arrow {
    flex: none;
    width: 32px;
    height: 16px;
    margin-top: 1px;
}

/* 展开态 */
.quote-fab.is-open,
.quote-fab:focus-visible {
    width: 400px;
    height: 64px;
    border-radius: 0 999px 999px 0;
}

.quote-fab.is-open .quote-fab__side,
.quote-fab:focus-visible .quote-fab__side {
    opacity: 0;
}

.quote-fab.is-open .quote-fab__main,
.quote-fab:focus-visible .quote-fab__main {
    opacity: 1;
    transition-delay: .12s;
}

/* 桌面端悬停自动伸出 */
@media (hover: hover) and (pointer: fine) {
    .quote-fab:hover {
        width: 400px;
        height: 64px;
        border-radius: 0 999px 999px 0;
    }

    .quote-fab:hover .quote-fab__side {
        opacity: 0;
    }

    .quote-fab:hover .quote-fab__main {
        opacity: 1;
        transition-delay: .12s;
    }
}

.quote-fab:active {
    filter: brightness(.97);
}

.quote-fab:focus-visible {
    outline: 3px solid rgba(208, 0, 2, .35);
    outline-offset: 3px;
}

/* 表单弹窗打开时收起 */
body.formmodel-open .quote-fab {
    opacity: 0;
    pointer-events: none;
    transform: translate(-40px, -50%);
}

@media (max-width: 991px) {
    .quote-fab {
        width: 50px;
        height: 140px;
        border-radius: 0 16px 16px 0;
    }

    .quote-fab.is-open,
    .quote-fab:focus-visible {
        width: min(88vw, 340px);
        height: 56px;
        border-radius: 0 999px 999px 0;
    }

    .quote-fab__side {
        gap: 12px;
    }

    .quote-fab__icon {
        width: 18px;
        height: 18px;
    }

    .quote-fab__side-text {
        font-size: 12px;
        letter-spacing: 1.2px;
    }

    .quote-fab__main {
        gap: 16px;
        padding: 0 20px;
    }

    .quote-fab__text {
        font-size: 17px;
    }

    .quote-fab__arrow {
        width: 24px;
        height: 12px;
    }
}

@media (max-width: 360px) {
    .quote-fab.is-open {
        width: calc(100vw - 20px);
    }

    .quote-fab__text {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .quote-fab,
    .quote-fab__side,
    .quote-fab__main {
        transition: none;
    }
}
