/* WP Go Home Button Frontend Styles */

.wp-go-home-button {
    position: fixed;
    z-index: 9999;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.wp-go-home-button a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
}

.wp-go-home-button a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.wp-go-home-button svg {
    transition: all 0.3s ease;
    pointer-events: none;
}

.wp-go-home-button:hover {
    animation: wpGoHomePulse 0.6s ease-in-out;
}

/* Pulse animation on hover */
@keyframes wpGoHomePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Smooth entrance animation */
.wp-go-home-button {
    animation: wpGoHomeSlideIn 0.5s ease-out;
}

@keyframes wpGoHomeSlideIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wp-go-home-button {
        /* Mobile optimizations can be added here if needed */
        max-width: 45px;
        max-height: 45px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wp-go-home-button a {
        border: 2px solid currentColor !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wp-go-home-button,
    .wp-go-home-button a,
    .wp-go-home-button svg {
        transition: none;
        animation: none;
    }
    
    .wp-go-home-button:hover {
        animation: none;
        transform: none;
    }
}

/* Print styles - hide the button when printing */
@media print {
    .wp-go-home-button {
        display: none !important;
    }
}

/* Additional interaction states */
.wp-go-home-button.clicked {
    transform: scale(0.95);
}

.wp-go-home-button.touch-active {
    transform: scale(1.05);
}

.wp-go-home-button.loaded {
    opacity: 1;
}

.wp-go-home-button.visible {
    opacity: 1;
}

.wp-go-home-button.hidden-on-scroll {
    opacity: 0.5;
    transform: translateY(10px);
}

/* Loading state */
.wp-go-home-button {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Focus states for better accessibility */
.wp-go-home-button a:focus-visible {
    outline: 3px solid #007cba;
    outline-offset: 3px;
    border-radius: 50%;
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .wp-go-home-button a {
        border-width: 2px !important;
        border-style: solid !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wp-go-home-button a:focus {
        outline-color: #4ea5d9;
    }
}
