/* ==========================================================================
   Aff Wing - Site Enhancements (Scroll to Top & Utilities)
   ========================================================================== */

/* Back to Top Floating Button */
.aff-scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4), 0 2px 6px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.85);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
    outline: none;
    padding: 0;
    margin: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.aff-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.aff-scroll-top:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 8px 26px rgba(79, 70, 229, 0.55), 0 4px 10px rgba(15, 23, 42, 0.18);
    transform: translateY(-4px) scale(1.08);
}

.aff-scroll-top:active {
    transform: translateY(-1px) scale(0.96);
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.4);
}

.aff-scroll-top svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
    display: block;
    margin: auto;
}

.aff-scroll-top:hover svg {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .aff-scroll-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    .aff-scroll-top svg {
        width: 20px;
        height: 20px;
    }
}
