/* Back to Top Button Styles */
.vt-backtotop {
    position: fixed;
    bottom: 100px; /* WhatsApp widget'ın üstünde durması için */
    right: 30px;
    z-index: 99999; /* WhatsApp widget'tan yüksek z-index */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.vt-backtotop.show {
    opacity: 1;
    visibility: visible;
}

.vt-scroll-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.vt-scroll-top:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: #fff;
}

.vt-scroll-top i {
    font-size: 18px;
    color: #fff;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .vt-backtotop {
        bottom: 90px; /* WhatsApp widget için mobilde de üstte */
        right: 20px;
    }
    
    .vt-scroll-top {
        width: 45px;
        height: 45px;
    }
    
    .vt-scroll-top i {
        font-size: 16px;
    }
}

/* WhatsApp Widget Compatibility */
.vtc-whatsapp-widget {
    z-index: 99998 !important; /* Back to top'tan bir alt seviye */
}

/* Eğer WhatsApp widget varsa pozisyon ayarı */
body:has(.vtc-whatsapp-widget) .vt-backtotop {
    bottom: 120px; /* WhatsApp varsa daha yukarı */
}

@media (max-width: 768px) {
    body:has(.vtc-whatsapp-widget) .vt-backtotop {
        bottom: 110px;
    }
}

/* Admin Bar Fix */
body.admin-bar .vt-backtotop {
    bottom: 100px; /* Default pozisyonu koru */
}

/* WhatsApp widget ile admin bar varsa */
body.admin-bar:has(.vtc-whatsapp-widget) .vt-backtotop {
    bottom: 120px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .vt-scroll-top {
        background: linear-gradient(135deg, #4c5fd5 0%, #c132d5 100%);
    }
    
    .vt-scroll-top:hover {
        background: linear-gradient(135deg, #c132d5 0%, #4c5fd5 100%);
    }
}