/*
 * Styles for the Scroll To Top button.
 *
 * This stylesheet uses modern CSS features like CSS variables and the
 * `clamp()` function to ensure the button scales appropriately across
 * devices. Transitions are used to animate the appearance and
 * disappearance of the button without impacting Core Web Vitals. The
 * design matches the provided example: a circular button with a subtle
 * shadow and an upward arrow icon.
 */

:root {
    /* Base size of the button. The clamp function ensures it remains
     * within reasonable bounds from small mobile screens up to large
     * desktops. */
    --edt-scroll-size: clamp(44px, 6vw, 64px);
    /* Background colour mimics the light grey circle seen in the
     * example image, with slight transparency to blend into any theme. */
    --edt-scroll-bg: rgba(230, 230, 230, 0.95);
    /* Colour of the arrow. A dark tone provides sufficient contrast
     * against the light background. */
    --edt-scroll-color: #444;
    /* Button shadow for depth on light and dark themes. */
    --edt-scroll-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.edt-scroll-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 70px;
    height: 70px;
    background: var(--edt-scroll-bg);
    color: var(--edt-scroll-color);
    border: none;
    border-radius: 50%;
    box-shadow: var(--edt-scroll-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(20%);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.edt-scroll-to-top .edt-scroll-to-top-icon {
    width: 60%;
    height: 60%;
    fill: currentColor;
}

.edt-scroll-to-top:hover,
.edt-scroll-to-top:focus {
    background: black;
}
.edt-scroll-to-top:hover{
color:white;}
@media (prefers-reduced-motion: reduce) {
    .edt-scroll-to-top {
        transition: none;
    }
}