/**
 * Back to Top Button Styles
 * Modern scroll to top button with smooth animations
 * 
 * 🇹🇷 TR: Yukarı çık butonu stilleri
 * 🇬🇧 EN: Scroll to top button styles
 * 🎯 PURPOSE: Floating back-to-top button for better UX
 * 
 * @package GRPCMedia
 * @version 1.0.0
 */

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.grpcmedia-back-to-top,
.scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--grpc-primary, #2F2483) 0%, var(--grpc-secondary, #1e1850) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(47, 36, 131, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.grpcmedia-back-to-top.show,
.scrollToTop.show {
    opacity: 0.7;
    visibility: visible;
    transform: translateY(0);
}

.grpcmedia-back-to-top:hover,
.scrollToTop:hover {
    opacity: 1;
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(47, 36, 131, 0.6);
    background: linear-gradient(135deg, var(--grpc-secondary, #1e1850) 0%, var(--grpc-primary, #2F2483) 100%);
    text-decoration: none;
}

.grpcmedia-back-to-top:active,
.scrollToTop:active {
    transform: translateY(-3px) scale(0.95);
}

.grpcmedia-back-to-top i,
.scrollToTop i {
    font-size: 24px;
    color: white;
    line-height: 1;
}

.grpcmedia-back-to-top svg,
.scrollToTop svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Show state */
.grpcmedia-back-to-top.show,
.scrollToTop.show {
    display: flex;
}

/* ============================================
   PULSE ANIMATION
   ============================================ */

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

.grpcmedia-back-to-top::before,
.scrollToTop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--grpc-primary, #2F2483);
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ============================================
   SLIDE IN ANIMATION
   ============================================ */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}

.grpcmedia-back-to-top.animate-in,
.scrollToTop.animate-in {
    animation: slideInUp 0.3s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .grpcmedia-back-to-top,
    .scrollToTop {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .grpcmedia-back-to-top i,
    .scrollToTop i {
        font-size: 20px;
    }

    .grpcmedia-back-to-top svg,
    .scrollToTop svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .grpcmedia-back-to-top,
    .scrollToTop {
        bottom: 70px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .grpcmedia-back-to-top i,
    .scrollToTop i {
        font-size: 18px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.grpcmedia-back-to-top:focus,
.scrollToTop:focus {
    outline: 2px solid var(--grpc-primary, #2F2483);
    outline-offset: 2px;
}

.grpcmedia-back-to-top:focus-visible,
.scrollToTop:focus-visible {
    outline: 3px solid var(--grpc-primary, #2F2483);
    outline-offset: 3px;
}

/* Hide prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .grpcmedia-back-to-top,
    .scrollToTop {
        animation: none;
        transition: none;
    }

    .grpcmedia-back-to-top::before,
    .scrollToTop::before {
        animation: none;
    }
}

