/* Adapted from vinodjangid07's afraid-falcon-17 on Uiverse.io (MIT).
   Copyright 2026 vinodjangid07; Copyright 2023 Uiverse.io.
   Full notice: ../vendor/uiverse/afraid-falcon-17-LICENSE.txt */
.storefront .fc-back-to-top {
    --back-top-edge: 18px;
    --back-top-floor: 18px;
    --back-top-launcher-space: 0px;
    position: fixed;
    z-index: 83;
    inset: auto max(var(--back-top-edge), env(safe-area-inset-right)) calc(var(--product-compare-dock-height, 0px) + max(var(--back-top-floor), env(safe-area-inset-bottom)) + var(--back-top-launcher-space)) auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    min-width: 50px;
    height: 50px;
    min-height: 50px;
    max-width: calc(100vw - 36px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #b99559;
    border-radius: 50px;
    background: #352319;
    color: #f4dcae;
    box-shadow: 0 0 0 3px #c4a06412, 0 8px 24px #28180f24;
    font: 600 12px/1.2 var(--sans, sans-serif);
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: width 240ms var(--ease, ease), background-color 200ms ease, color 200ms ease;
}
.storefront .fc-back-to-top[hidden] { display: none !important; }
.fc-back-to-top-icon { width: 13px; height: 18px; flex: none; fill: currentColor; pointer-events: none; transition: transform 240ms ease, opacity 180ms ease; }
.fc-back-to-top-label { position: absolute; inset-inline: 12px; opacity: 0; white-space: nowrap; transform: translateY(24px); pointer-events: none; transition: transform 240ms ease, opacity 180ms ease; }
.storefront .fc-back-to-top:focus-visible { width: 152px; background: #dec48e; color: #352319; outline: 3px solid #a47a3b; outline-offset: 4px; }
.fc-back-to-top:focus-visible .fc-back-to-top-icon { transform: translateY(-240%); opacity: 0; }
.fc-back-to-top:focus-visible .fc-back-to-top-label { transform: translateY(0); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
    .storefront .fc-back-to-top:hover { width: 152px; background: #dec48e; color: #352319; }
    .fc-back-to-top:hover .fc-back-to-top-icon { transform: translateY(-240%); opacity: 0; }
    .fc-back-to-top:hover .fc-back-to-top-label { transform: translateY(0); opacity: 1; }
}
@media (max-width: 480px) { .storefront .fc-back-to-top { --back-top-edge: 12px; --back-top-floor: 12px; } }
body.storefront[data-compare-docked="true"] .fc-back-to-top { --back-top-floor: 18px; }
/* Keep the helper out of active reading and editing overlays, even before JS's
   next observer callback updates its hidden state. */
body:has(dialog[open], #fc-assistant-panel:not([hidden]), .site-nav[data-open="true"]) .fc-back-to-top { visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .storefront .fc-back-to-top, .fc-back-to-top-icon, .fc-back-to-top-label { transition: none; } }
