/* AEM Labs → Landing → Scroll Progress CSS
   ======================================== */

.scroll-progress {
    /* Tunables */
    --scroll-progress-size: 36px;
    --scroll-progress-icon-size: 12px;
    --scroll-ring-len: 125.664;
    --scroll-progress: 0;

    position: fixed;
    right: 50%;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 45;
    width: var(--scroll-progress-size);
    height: var(--scroll-progress-size);
    padding: 0;
    border: 1px solid rgba(var(--accent-color-1-rgb), 0.28);
    border-radius: 50%;
    background: rgba(var(--bg-color-2-rgb), 0.4);
    backdrop-filter: blur(2px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.88);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.scroll-progress:hover {
    border-color: rgba(var(--accent-color-1-rgb), 0.55);
    color: var(--accent-color-1);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
}

.scroll-progress:focus-visible {
    outline: 2px solid var(--accent-color-1);
    outline-offset: 3px;
}

.scroll-progress:active {
    transform: translateY(0);
}

/* Fills the button; no fixed px — scales with --scroll-progress-size */
.scroll-progress__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scroll-progress__value {
    stroke: var(--accent-color-1);
    stroke-dasharray: var(--scroll-ring-len);
    stroke-dashoffset: calc(var(--scroll-ring-len) * (1 - var(--scroll-progress)));
    transition: stroke-dashoffset 0.12s linear;
}

.scroll-progress__icon {
    position: relative;
    z-index: 1;
    font-size: var(--scroll-progress-icon-size);
    line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-progress__value {
        transition: none;
    }

    .scroll-progress:hover {
        transform: none;
    }
}
