/* ========================================
   Woolements - Back to Top Widget Styles
   ======================================== */


/* Base Styles */

.woolements-back-to-top {
    position: relative;
    display: inline-block;
}

.woolements-back-to-top.mode-floating {
    position: fixed;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.woolements-back-to-top.mode-floating.is-visible {
    opacity: 1;
    visibility: visible;
}


/* Position Classes for Floating Mode */

.woolements-back-to-top.mode-floating.position-bottom-right {
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
}

.woolements-back-to-top.mode-floating.position-bottom-left {
    bottom: 20px;
    left: 20px;
    top: auto;
    right: auto;
}

.woolements-back-to-top.mode-floating.position-top-right {
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
}

.woolements-back-to-top.mode-floating.position-top-left {
    top: 20px;
    left: 20px;
    bottom: auto;
    right: auto;
}


/* Button Styles */

.woolements-back-to-top .bt-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: visible;
    padding: 0;
    outline: none;
}

.woolements-back-to-top .bt-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.woolements-back-to-top .bt-button:active {
    transform: translateY(-1px);
}

.woolements-back-to-top .bt-button:focus {
    outline: 2px solid rgba(0, 115, 170, 0.5);
    outline-offset: 2px;
}


/* Inner Content */

.woolements-back-to-top .bt-inner {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
}

.woolements-back-to-top .bt-inner i,
.woolements-back-to-top .bt-inner svg {
    line-height: 1;
    display: inline-block;
    color: inherit;
}


/* Make sure icons are visible */

.woolements-back-to-top .bt-inner i {
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* Support for all icon types */

.woolements-back-to-top .bt-inner * {
    pointer-events: none;
}


/* Support for Elementor icons */

.woolements-back-to-top .bt-inner .elementor-icon,
.woolements-back-to-top .bt-inner .back-to-top-icon {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.woolements-back-to-top .bt-inner .elementor-icon svg,
.woolements-back-to-top .bt-inner .back-to-top-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: block;
}

.woolements-back-to-top .bt-icon {
    line-height: 1;
    display: inline-block;
    color: inherit;
}


/* Progress Ring (SVG) */

.woolements-back-to-top .bt-progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    z-index: 1;
    pointer-events: none;
}

.woolements-back-to-top .bt-ring-bg,
.woolements-back-to-top .bt-ring {
    stroke-linecap: round;
    transform-origin: center;
}

.woolements-back-to-top .bt-ring-bg {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 3;
}

.woolements-back-to-top .bt-ring {
    stroke: #00d4ff;
    stroke-width: 3;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transform: rotate(-90deg);
    transition: stroke-dashoffset 0.1s linear;
}


/* Entrance Animations for Floating Mode */

.woolements-back-to-top.mode-floating.entrance-fade.is-visible {
    animation: woo-bt-fadeIn 0.4s ease;
}

.woolements-back-to-top.mode-floating.entrance-slide.is-visible {
    animation: woo-bt-slideIn 0.4s ease;
}

.woolements-back-to-top.mode-floating.entrance-scale.is-visible {
    animation: woo-bt-scaleIn 0.4s ease;
}

.woolements-back-to-top.mode-floating.entrance-bounce.is-visible {
    animation: woo-bt-bounceIn 0.6s ease;
}


/* Keyframes */

@keyframes woo-bt-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes woo-bt-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes woo-bt-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes woo-bt-bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}


/* Responsive Styles */

@media (max-width: 768px) {
    .woolements-back-to-top.mode-floating.position-bottom-right {
        right: 15px;
        left: auto;
    }
    .woolements-back-to-top.mode-floating.position-top-right {
        right: 15px;
        left: auto;
    }
    .woolements-back-to-top.mode-floating.position-bottom-left {
        left: 15px;
        right: auto;
    }
    .woolements-back-to-top.mode-floating.position-top-left {
        left: 15px;
        right: auto;
    }
    .woolements-back-to-top.mode-floating.position-bottom-right,
    .woolements-back-to-top.mode-floating.position-bottom-left {
        bottom: 15px;
        top: auto;
    }
    .woolements-back-to-top.mode-floating.position-top-right,
    .woolements-back-to-top.mode-floating.position-top-left {
        top: 15px;
        bottom: auto;
    }
}


/* Fixed Mode - Always Visible */

.woolements-back-to-top.mode-fixed {
    opacity: 1;
    visibility: visible;
}


/* Loading State */

.woolements-back-to-top.is-scrolling .bt-button {
    pointer-events: none;
}