.xw-back-to-top {
    --xw-btt-progress: 0%;
    --xw-btt-radius: 50%;
}

/*
 * El ID y el reinicio completo aíslan el componente de los estilos globales
 * del tema, constructores y otros plugins, incluidos sus estados interactivos.
 */
#xw-back-to-top,
#xw-back-to-top:hover,
#xw-back-to-top:focus,
#xw-back-to-top:active {
    all: unset !important;
    position: fixed !important;
    right: auto !important;
    bottom: var(--xw-btt-vertical-margin) !important;
    left: auto !important;
    z-index: 9998 !important;
    display: grid !important;
    width: var(--xw-btt-size) !important;
    height: var(--xw-btt-size) !important;
    min-width: var(--xw-btt-size) !important;
    min-height: var(--xw-btt-size) !important;
    max-width: var(--xw-btt-size) !important;
    max-height: var(--xw-btt-size) !important;
    box-sizing: border-box !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--xw-btt-radius) !important;
    background: conic-gradient(
        var(--xw-btt-progress-color) var(--xw-btt-progress),
        var(--xw-btt-border) 0
    ) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .16) !important;
    color: var(--xw-btt-icon) !important;
    place-items: center !important;
    overflow: visible !important;
    cursor: pointer !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(12px) scale(.94) !important;
    visibility: hidden !important;
    isolation: isolate !important;
    transition: opacity .2s ease, transform .2s ease, visibility .2s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    line-height: 1 !important;
    text-decoration: none !important;
    flex: 0 0 var(--xw-btt-size) !important;
}

#xw-back-to-top::before,
#xw-back-to-top:hover::before,
#xw-back-to-top:focus::before,
#xw-back-to-top:active::before {
    all: initial !important;
    position: absolute !important;
    inset: var(--xw-btt-progress-size) !important;
    z-index: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    border: var(--xw-btt-border-size) solid var(--xw-btt-border) !important;
    border-radius: var(--xw-btt-radius) !important;
    background: var(--xw-btt-background) !important;
    box-shadow: none !important;
    content: '' !important;
    opacity: 1 !important;
    pointer-events: none !important;
    transform: none !important;
}

#xw-back-to-top:focus-visible {
    outline: 3px solid rgba(34, 113, 177, .38) !important;
    outline-offset: 3px !important;
}

#xw-back-to-top.is-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible !important;
}

#xw-back-to-top.xw-back-to-top--bottom-right {
    right: var(--xw-btt-horizontal-margin) !important;
    left: auto !important;
}

#xw-back-to-top.xw-back-to-top--bottom-left {
    right: auto !important;
    left: var(--xw-btt-horizontal-margin) !important;
}

/* El círculo usa un trazo SVG centrado para evitar diferencias de subpíxel. */
#xw-back-to-top.xw-back-to-top--circle,
#xw-back-to-top.xw-back-to-top--circle:hover,
#xw-back-to-top.xw-back-to-top--circle:focus,
#xw-back-to-top.xw-back-to-top--circle:active {
    background: var(--xw-btt-background) !important;
}

.xw-back-to-top--rounded {
    --xw-btt-radius: 12px;
}

.xw-back-to-top--square {
    --xw-btt-radius: 0px;
}

#xw-back-to-top .xw-back-to-top__icon {
    all: unset !important;
    position: relative !important;
    z-index: 3 !important;
    display: block !important;
    width: var(--xw-btt-icon-size) !important;
    height: var(--xw-btt-icon-size) !important;
    overflow: visible !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}

#xw-back-to-top .xw-back-to-top__icon * {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    vector-effect: non-scaling-stroke !important;
}

#xw-back-to-top .xw-back-to-top__progress {
    all: unset !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    pointer-events: none !important;
}

#xw-back-to-top.xw-back-to-top--circle .xw-back-to-top__progress {
    display: block !important;
}

#xw-back-to-top .xw-back-to-top__progress-track,
#xw-back-to-top .xw-back-to-top__progress-value {
    fill: none !important;
    stroke-width: var(--xw-btt-progress-size) !important;
    vector-effect: non-scaling-stroke !important;
}

#xw-back-to-top .xw-back-to-top__progress-track {
    stroke: var(--xw-btt-border) !important;
}

#xw-back-to-top .xw-back-to-top__progress-value {
    stroke: var(--xw-btt-progress-color) !important;
    stroke-dasharray: var(--xw-btt-progress-value) 100 !important;
    stroke-linecap: butt !important;
    transform: rotate(-90deg) !important;
    transform-origin: 50% 50% !important;
}

@media (max-width: 767px) {
    #xw-back-to-top.xw-back-to-top--hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #xw-back-to-top.xw-back-to-top--hide-tablet {
        display: none !important;
    }
}

@media (min-width: 992px) {
    #xw-back-to-top.xw-back-to-top--hide-desktop {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #xw-back-to-top,
    #xw-back-to-top::before {
        transition-duration: .01ms !important;
    }
}
