/* Base Scroll to Top Button Styles */
.mnl-scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mnl-scroll-to-top:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.mnl-scroll-to-top:active {
    transform: scale(0.95);
}

.mnl-scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* Ripple Effect Animation */
.mnl-scroll-to-top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.6s ease;
}

.mnl-scroll-to-top:hover::before {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0.3;
}

/* Arrow Icon Animation */
.mnl-scroll-to-top i {
    transition: transform 0.3s ease;
}

.mnl-scroll-to-top:hover i {
    transform: translateY(-3px);
}

/* ===================================== */
/* WHITE VERSION */
/* ===================================== */
.mnl-scroll-white {
    background: #ffffff;
    color: #000000;
}

.mnl-scroll-white::before {
    background: #000000;
}

.mnl-scroll-white:hover {
    background: #f5f5f7;
}

/* ===================================== */
/* BLACK VERSION */
/* ===================================== */
.mnl-scroll-black {
    background: #000000;
    color: #ffffff;
}

.mnl-scroll-black::before {
    background: #ffffff;
}

.mnl-scroll-black:hover {
    background: #1d1d1f;
}

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

/* Tablet */
@media (max-width: 991px) {
    .mnl-scroll-to-top {
        width: 52px;
        height: 52px;
        bottom: 25px;
        right: 25px;
        font-size: 18px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .mnl-scroll-to-top {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
}

/* Extra Small Mobile */
@media (max-width: 576px) {
    .mnl-scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 15px;
        right: 15px;
        font-size: 15px;
    }
}

/* Animation Keyframes */
@keyframes mnlPulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
}

/* Optional: Add pulse animation when button appears */
.mnl-scroll-to-top.show {
    animation: mnlPulse 2s ease-in-out infinite;
}


/*
<!-- ===================================== -->
<!-- USAGE INSTRUCTIONS -->
<!-- ===================================== -->
<!--
HOW TO USE:

1. WHITE VERSION (Default):
   - Already active in the HTML
   - White background, black icon
   - Best for light-colored pages

2. BLACK VERSION:
   - Uncomment the black version button in HTML
   - Comment out or remove the white version
   - Black background, white icon
   - Best for dark-colored pages

3. CUSTOMIZATION:
   - Scroll threshold: Change scrollThreshold value in JS (default: 300px)
   - Animation speed: Change scrollDuration in JS (default: 800ms)
   - Button size: Adjust width/height in CSS
   - Position: Change bottom/right values in CSS
   - Colors: Modify .mnl-scroll-white or .mnl-scroll-black classes

4. MULTIPLE BUTTONS:
   - You can have both versions on different pages
   - Just use the appropriate class (mnl-scroll-white or mnl-scroll-black)
   - The script handles multiple buttons automatically
-->
*/