/*
 * Wilson : flèche architecturale de retour en haut.
 * Aucun style existant n'est remplacé.
 */

button.awb-to-top {
    box-sizing: border-box;
    position: fixed;
    z-index: 970;

    right: clamp(12px, 2.4vw, 34px);
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 66px;
    min-width: 48px;
    min-height: 66px;
    padding: 0;

    color: #947554;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);

    transition:
        opacity .25s ease,
        visibility .25s ease,
        transform .25s ease;
}

/* Le bouton RDV existant reste à sa place. */
button.awb-to-top.awb-to-top--with-booking {
    bottom: calc(
        24px + 49px + 16px +
        env(safe-area-inset-bottom, 0px)
    );
}

button.awb-to-top:hover,
button.awb-to-top:focus,
button.awb-to-top:active {
    color: #947554;
    background: transparent;
    border: 0;
    box-shadow: none;
}

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

button.awb-to-top.is-visible:hover {
    transform: translateY(-4px);
}

button.awb-to-top:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

button.awb-to-top svg {
    display: block;
    width: 48px;
    height: 66px;
    flex: none;
}

/* La réservation ouverte reste prioritaire. */
html.awb-fb--locked button.awb-to-top {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 760px) {
    button.awb-to-top {
        right: 14px;
        bottom: calc(
            15px + env(safe-area-inset-bottom, 0px)
        );
    }

    button.awb-to-top.awb-to-top--with-booking {
        bottom: calc(
            15px + 44px + 16px +
            env(safe-area-inset-bottom, 0px)
        );
    }
}

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

    button.awb-to-top.is-visible:hover {
        transform: none;
    }
}
