/* Back-to-top — public site (#scrollUp from jquery.scrollUp plugin) */

/* home-animations.js may leave this on non-home pages if mis-invoked — hide outside home */
body:not(:has(.home-page)) .scroll-to-top {
    display: none !important;
}

#scrollUp {
    display: none;
    position: fixed !important;
    left: auto !important;
    right: 1rem !important;
    bottom: 1.75rem !important;
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    z-index: 1035;
    border-radius: 50%;
    background: linear-gradient(145deg, #1eb53a 0%, #159c32 100%);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(30, 181, 58, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#scrollUp:hover {
    background: linear-gradient(145deg, #22c55e 0%, #1eb53a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(30, 181, 58, 0.5);
    color: #fff !important;
}

#scrollUp i {
    line-height: 44px;
    font-size: 1.15rem;
    font-weight: 700;
}

/* Sit above fixed social / WhatsApp bar (public-site-social.css) */
body:has(.floating-social-bar) #scrollUp {
    bottom: calc(5.5rem + 3rem + 0.75rem);
}

body:has(.floating-social-bar .floating-social-btn:nth-child(2)) #scrollUp {
    bottom: calc(5.5rem + 6.5rem + 0.75rem);
}

body:has(.floating-social-bar .floating-social-btn:nth-child(3)) #scrollUp {
    bottom: calc(5.5rem + 10rem + 0.75rem);
}

body:has(.floating-social-bar .floating-social-btn:nth-child(4)) #scrollUp {
    bottom: calc(5.5rem + 13.5rem + 0.75rem);
}

html.umoja-celeb-offset #scrollUp {
    bottom: calc(1.75rem + var(--umoja-celebration-bar-height, 56px));
}

html.umoja-celeb-offset body:has(.floating-social-bar) #scrollUp {
    bottom: calc(5.5rem + 3rem + 0.75rem + var(--umoja-celebration-bar-height, 56px));
}

@media (max-width: 767px) {
    #scrollUp {
        left: auto !important;
        right: 0.65rem !important;
        width: 44px;
        height: 44px;
        line-height: 44px;
    }

    #scrollUp i {
        line-height: 40px;
    }

    body:has(.floating-social-bar) #scrollUp {
        bottom: calc(4.75rem + 2.75rem + 0.65rem);
    }

    body:has(.floating-social-bar .floating-social-btn:nth-child(2)) #scrollUp {
        bottom: calc(4.75rem + 5.5rem + 0.65rem);
    }

    body:has(.floating-social-bar .floating-social-btn:nth-child(3)) #scrollUp {
        bottom: calc(4.75rem + 8.25rem + 0.65rem);
    }

    body:has(.floating-social-bar .floating-social-btn:nth-child(4)) #scrollUp {
        bottom: calc(4.75rem + 11rem + 0.65rem);
    }
}
