.buyer-back-to-top {
    --buyer-back-to-top-lift: 0px;
    --buyer-back-to-top-inline-lift: 0px;
    position: fixed;
    z-index: 10001;
    inset-inline-end: calc(24px + var(--buyer-back-to-top-inline-lift));
    inset-block-end: calc(28px + var(--buyer-back-to-top-lift));
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 0;
    color: #fff;
    background: #132943;
    border: 1px solid #132943;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(11, 26, 48, .22);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease, color .18s ease,
        background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.buyer-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.buyer-back-to-top.is-obstructed {
    visibility: hidden;
    pointer-events: none;
}

.buyer-back-to-top:hover {
    color: #0b1a30;
    background: #ff9f0a;
    border-color: #ff9f0a;
    box-shadow: 0 10px 26px rgba(11, 26, 48, .26);
}

.buyer-back-to-top:focus-visible {
    outline: 3px solid rgba(255, 159, 10, .4);
    outline-offset: 3px;
}

.buyer-back-to-top svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.buyer-back-to-top__tooltip {
    position: absolute;
    inset-inline-end: 58px;
    top: 50%;
    width: max-content;
    max-width: min(220px, calc(100vw - 90px));
    padding: 7px 10px;
    color: #fff;
    background: #0b1a30;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(11, 26, 48, .16);
    font: 600 12px/1.2 Arial, Helvetica, sans-serif;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity .15s ease;
}

.buyer-back-to-top:hover .buyer-back-to-top__tooltip,
.buyer-back-to-top:focus-visible .buyer-back-to-top__tooltip {
    opacity: 1;
}

@media screen and (max-width: 768px) {
    .buyer-back-to-top {
        inset-inline-end: calc(16px + var(--buyer-back-to-top-inline-lift));
        inset-block-end: calc(max(20px, env(safe-area-inset-bottom)) + var(--buyer-back-to-top-lift));
        width: 44px;
        height: 44px;
    }

    .buyer-back-to-top__tooltip {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .buyer-back-to-top {
        transition: none;
    }
}
