/*
    The floating Home and Back-to-top buttons (Views/Shared/_BackToTop.cshtml), on every layout but _AuthLayout.
    Its own file because the app (site.css) and the public pages (landing.css) do not share a stylesheet.
    Logical properties: in Arabic and Urdu the buttons sit in the bottom-left corner.
*/

.jmBackToTop {
    position: fixed;
    bottom: 20px;
    inset-inline-end: 24px;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jmBackToTopButton {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background-color: #00aeef;
    color: #fff !important;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 174, 239, .35);
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.jmBackToTopButton:hover,
.jmBackToTopButton:focus-visible {
    background-color: #0099d4;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 174, 239, .45);
}

.jmBackToTopButton:focus-visible { outline: 3px solid rgba(0, 174, 239, .35); outline-offset: 2px; }

/* The arrow only once the page has been scrolled. */
#jmBackToTopUp { display: none; }
#jmBackToTopUp.jmShown { display: flex; }

@media (max-width: 575.98px) {
    .jmBackToTop { bottom: 16px; inset-inline-end: 16px; }
    .jmBackToTopButton { width: 44px; height: 44px; font-size: 18px; }
}

@media print {
    .jmBackToTop { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .jmBackToTopButton { transition: none; }
    .jmBackToTopButton:hover, .jmBackToTopButton:focus-visible { transform: none; }
}
