/* =========================================================
   STICKY CTA + GO TO TOP
   MOBILE FIRST
   ========================================================= */

.sticky-account-cta,
.sticky-account-cta *,
.go-to-top,
.go-to-top * {
    box-sizing: border-box;
}


/* =========================================================
   STICKY ACCOUNT CTA
   ========================================================= */

.sticky-account-cta {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 9990;

    width: 100%;

    min-height: 58px;

    display: flex;

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

    padding:
        8px 58px 8px 16px;

    background:
        #128c62;

    border-top:
        1px solid rgba(255, 255, 255, 0.18);

    box-shadow:
        0 -5px 18px rgba(0, 0, 0, 0.15);

    transform: translateY(0);

    transition:
        transform 220ms ease;
}


/* =========================================================
   CTA LINK
   ========================================================= */

.sticky-account-link {
    display: flex;

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

    width: 100%;

    min-height: 42px;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.2;

    text-align: center;

    text-decoration: none;

    letter-spacing: 0.1px;
}


.sticky-account-link:hover,
.sticky-account-link:focus-visible {
    color: #ffffff;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.sticky-account-close {
    position: absolute;

    top: 50%;
    right: 10px;

    width: 38px;
    height: 38px;

    display: inline-flex;

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

    padding: 0;

    border:
        1px solid rgba(255, 255, 255, 0.45);

    border-radius: 50%;

    background:
        rgba(0, 0, 0, 0.12);

    color: #ffffff;

    font-family: "Montserrat", system-ui, sans-serif;

    cursor: pointer;

    transform:
        translateY(-50%);

    transition:
        background 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}


.sticky-account-close span {
    display: block;

    font-size: 23px;
    font-weight: 300;

    line-height: 1;

    transform:
        translateY(-1px);
}


.sticky-account-close:hover,
.sticky-account-close:focus-visible {
    background:
        rgba(0, 0, 0, 0.25);

    border-color:
        rgba(255, 255, 255, 0.70);
}


.sticky-account-close:focus-visible {
    outline:
        2px solid #ffffff;

    outline-offset: 2px;
}


/* =========================================================
   GO TO TOP
   ========================================================= */

.go-to-top {
    position: fixed;

    right: 14px;

    bottom: calc(
        58px + 12px + env(safe-area-inset-bottom)
    );

    z-index: 9980;

    width: 44px;
    height: 44px;

    display: inline-flex;

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

    padding: 0;

    border:
        1px solid rgba(255, 255, 255, 0.18);

    border-radius: 50%;

    background:
        #1b1f54;

    color: #ffffff;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.20);

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(10px);

    pointer-events: none;

    transition:
        opacity 180ms ease,
        visibility 180ms ease,
        transform 180ms ease,
        background 180ms ease;
}


.go-to-top.is-visible {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);

    pointer-events: auto;
}


.go-to-top:hover,
.go-to-top:focus-visible {
    background:
        #252b6b;
}


.go-to-top:focus-visible {
    outline:
        2px solid #ffffff;

    outline-offset: 3px;
}


.go-to-top svg {
    display: block;
}


/* =========================================================
   BODY SPACE
   Prevent sticky CTA from covering content
   ========================================================= */

body.has-sticky-account-cta {
    padding-bottom:
        calc(
            58px + env(safe-area-inset-bottom)
        );
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 600px) {

    .sticky-account-cta {
        min-height: 60px;

        padding:
            8px 70px;
    }


    .sticky-account-link {
        font-size: 15px;
    }


    .sticky-account-close {
        right: 18px;
    }


    .go-to-top {
        right: 20px;

        bottom: calc(
            60px + 16px + env(safe-area-inset-bottom)
        );

        width: 46px;
        height: 46px;
    }


    body.has-sticky-account-cta {
        padding-bottom:
            calc(
                60px + env(safe-area-inset-bottom)
            );
    }

}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 900px) {

    .sticky-account-cta {
        min-height: 56px;

        padding:
            6px 80px;
    }


    .sticky-account-link {
        font-size: 15px;
    }


    .sticky-account-close {
        right: 22px;

        width: 38px;
        height: 38px;
    }


    .go-to-top {
        right: 24px;

        bottom: calc(
            56px + 18px + env(safe-area-inset-bottom)
        );

        width: 46px;
        height: 46px;
    }


    body.has-sticky-account-cta {
        padding-bottom:
            calc(
                56px + env(safe-area-inset-bottom)
            );
    }

}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1200px) {

    .sticky-account-cta {
        min-height: 58px;
    }


    body.has-sticky-account-cta {
        padding-bottom:
            calc(
                58px + env(safe-area-inset-bottom)
            );
    }


    .go-to-top {
        right: 28px;

        bottom: calc(
            58px + 20px + env(safe-area-inset-bottom)
        );
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sticky-account-cta,
    .go-to-top,
    .sticky-account-close {
        transition: none !important;
    }

}