/**
 * Neve Scroll to Top - Styles
 * Version: 1.0.0
 * Description: Modern, responsive scroll to top button styles for Neve theme
 */

/* Main button container */
#nvstt-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007cba, #005a87);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    border: 2px solid transparent;
    background-clip: padding-box;
}

#nvstt-button.nvstt-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#nvstt-button:hover {
    background: linear-gradient(135deg, #005a87, #003d5c);
    box-shadow: 0 8px 30px rgba(0, 124, 186, 0.4);
    transform: translateY(-2px);
}

#nvstt-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
}

#nvstt-button:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Arrow icon styling */
#nvstt-button svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    transition: transform 0.3s ease;
}

#nvstt-button:hover svg {
    transform: translateY(-1px);
}

/* Button positions */
#nvstt-button.nvstt-position-bottom-right {
    bottom: 30px;
    right: 30px;
}

#nvstt-button.nvstt-position-bottom-left {
    bottom: 30px;
    left: 30px;
}

#nvstt-button.nvstt-position-bottom-center {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
}

#nvstt-button.nvstt-position-bottom-center.nvstt-visible {
    transform: translateX(-50%) translateY(0);
}

/* Custom sizes */
#nvstt-button.nvstt-size-small {
    width: 40px;
    height: 40px;
}

#nvstt-button.nvstt-size-small svg {
    width: 16px;
    height: 16px;
}

#nvstt-button.nvstt-size-large {
    width: 60px;
    height: 60px;
}

#nvstt-button.nvstt-size-large svg {
    width: 24px;
    height: 24px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #nvstt-button {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        box-shadow: 0 3px 15px rgba(0, 124, 186, 0.25);
    }
    
    #nvstt-button.nvstt-position-bottom-left {
        left: 20px;
    }
    
    #nvstt-button.nvstt-position-bottom-center {
        bottom: 20px;
    }
    
    #nvstt-button svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    #nvstt-button {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    #nvstt-button.nvstt-position-bottom-left {
        left: 15px;
    }
    
    #nvstt-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Neve theme specific enhancements */
.nv-body-wrap #nvstt-button {
    /* Leverage Neve's color scheme variables if available */
}

.nv-body-wrap #nvstt-button:hover {
    /* Enhanced hover effects for Neve theme */
}

/* RTL support */
.rtl #nvstt-button.nvstt-position-bottom-right {
    left: 30px;
    right: auto;
}

.rtl #nvstt-button.nvstt-position-bottom-left {
    right: 30px;
    left: auto;
}

/* Print styles - hide scroll to top button */
@media print {
    #nvstt-button {
        display: none !important;
    }
}

/* Dark mode support for Neve theme */
@media (prefers-color-scheme: dark) {
    #nvstt-button {
        box-shadow: 0 4px 20px rgba(0, 124, 186, 0.4);
    }
    
    #nvstt-button:hover {
        box-shadow: 0 8px 30px rgba(0, 124, 186, 0.5);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #nvstt-button {
        border: 2px solid #ffffff;
        background: #000000;
    }
    
    #nvstt-button:hover {
        background: #333333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #nvstt-button,
    #nvstt-button:hover,
    #nvstt-button svg {
        transition: none;
    }
    
    #nvstt-button {
        transform: none;
    }
    
    #nvstt-button.nvstt-visible {
        opacity: 1;
        visibility: visible;
    }
}

/* Loading state */
#nvstt-button.nvstt-loading {
    pointer-events: none;
    opacity: 0.7;
}

#nvstt-button.nvstt-loading svg {
    animation: nvstt-spin 1s linear infinite;
}

@keyframes nvstt-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility enhancements */
#nvstt-button[aria-hidden="true"] {
    pointer-events: none;
}

#nvstt-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Custom properties for dynamic styling */
#nvstt-button {
    --nvstt-button-bg: linear-gradient(135deg, #007cba, #005a87);
    --nvstt-button-bg-hover: linear-gradient(135deg, #005a87, #003d5c);
    --nvstt-button-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
    --nvstt-button-shadow-hover: 0 8px 30px rgba(0, 124, 186, 0.4);
}