/**
 * Back to Top Button Styles
 */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color, #0d6efd);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Show button when scrolled */
.back-to-top.show {
    opacity: 0.7;
    visibility: visible;
    transform: translateY(0);
}

/* Hover effect on desktop */
@media (min-width: 768px) {
    .back-to-top.show:hover {
        opacity: 1;
        transform: translateY(-5px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }
}

/* Mobile: not transparent */
@media (max-width: 767px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .back-to-top.show {
        opacity: 1;
    }
}

/* Active state */
.back-to-top:active {
    transform: scale(0.95);
}

/* Dark mode support */
[data-theme="dark"] .back-to-top {
    background-color: var(--primary-color, #0d6efd);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Ensure button doesn't cover content */
.back-to-top {
    pointer-events: auto;
}

/* Animation for icon */
.back-to-top i {
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-3px);
}
