/* SWP Framework — Smooth Scroll, Anchors, and Back to Top */

:root {
    --swp-scroll-offset: 12px;
}

html.swp-smooth-scroll {
    scroll-behavior: smooth;
    scroll-padding-top: var(--swp-scroll-offset);
}

html.swp-smooth-scroll [id] {
    scroll-margin-top: var(--swp-scroll-offset);
}

.swp-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

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

.swp-back-to-top a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    background: var(--swp-color-primary);
    color: var(--swp-color-white);
    text-decoration: none;
}

.swp-back-to-top--circle a {
    border-radius: 50%;
}

.swp-back-to-top--square a {
    border-radius: 0;
}

.swp-back-to-top svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.swp-back-to-top a:hover,
.swp-back-to-top a:focus {
    background: var(--swp-color-primary);
    color: var(--swp-color-white);
}

.swp-back-to-top a:focus-visible {
    outline: 2px solid var(--swp-color-primary-dark);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .swp-back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.swp-smooth-scroll {
        scroll-behavior: auto;
    }

    .swp-back-to-top {
        transition: none;
    }
}
