/* Scroll-to-top button tailored to the frontend theme */
.scroll-top-button {
    position: fixed;
    inset-inline-end: 1.5rem;
    inset-block-end: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(var(--bs-primary-rgb, 105, 108, 255), 0.25);
    background-color: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.92);
    color: var(--bs-body-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 1050;
}

.scroll-top-button i {
    font-size: 1.2rem;
    line-height: 1;
}

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

.scroll-top-button:hover {
    background-color: var(--bs-primary);
    color: var(--bs-body-bg);
    box-shadow: 0 1.75rem 3rem rgba(15, 23, 42, 0.22);
}

.scroll-top-button:focus-visible {
    outline: 3px solid rgba(var(--bs-primary-rgb, 105, 108, 255), 0.35);
    outline-offset: 4px;
}

@media (max-width: 575.98px) {
    .scroll-top-button {
        inset-inline-end: 1rem;
        inset-block-end: 1.5rem;
    }
}

[data-bs-theme='dark'] .scroll-top-button {
    background-color: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.15);
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.35);
    box-shadow: 0 1.25rem 2.5rem rgba(2, 6, 23, 0.45);
}

[data-bs-theme='dark'] .scroll-top-button:hover {
    background-color: rgba(var(--bs-primary-rgb, 105, 108, 255), 0.35);
    color: var(--bs-body-color);
}

[data-bs-theme='dark'] .scroll-top-button:focus-visible {
    outline: 3px solid rgba(var(--bs-primary-rgb, 105, 108, 255), 0.5);
}
