/* ==========================================================================
   Polpress Back to Top Button - 100% Reference Matching Styles
   ========================================================================== */

/* Ultra-high specificity with HTML Body prefix to completely override Hello Elementor & Theme styles */
html body button.pta-scroll-top,
html body .pta-scroll-top,
button.pta-scroll-top,
.pta-scroll-top {
    width: var(--pta-btt-size, 55px) !important;
    height: var(--pta-btt-size, 55px) !important;
    min-width: var(--pta-btt-size, 55px) !important;
    min-height: var(--pta-btt-size, 55px) !important;
    max-width: var(--pta-btt-size, 55px) !important;
    max-height: var(--pta-btt-size, 55px) !important;
    line-height: var(--pta-btt-size, 55px) !important;
    position: fixed !important;
    bottom: 105% !important; /* Starts hidden above viewport (Reference Polpress animation) */
    background-color: var(--pta-btt-bg, #efa286) !important; /* Reference Polpress Color */
    background: var(--pta-btt-bg, #efa286) !important;
    color: var(--pta-btt-color, #ffffff) !important;
    z-index: 99999 !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    -moz-border-radius: 50% !important;
    text-align: center !important;
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: bottom 1s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease !important;
    -webkit-tap-highlight-color: transparent;
    overflow: visible !important;
}

/* Position: Right */
html body button.pta-scroll-top.pta-pos-right,
.pta-scroll-top.pta-pos-right {
    right: var(--pta-btt-side-offset, 30px) !important;
    left: auto !important;
}

/* Position: Left */
html body button.pta-scroll-top.pta-pos-left,
.pta-scroll-top.pta-pos-left {
    left: var(--pta-btt-side-offset, 30px) !important;
    right: auto !important;
}

/* Open State (When scrolled >= 270px) */
html body button.pta-scroll-top.open,
.pta-scroll-top.open {
    bottom: var(--pta-btt-bottom, 50px) !important;
}

/* Hover state */
html body button.pta-scroll-top:hover,
.pta-scroll-top:hover {
    background-color: var(--pta-btt-hover-bg, #e38a6a) !important;
    background: var(--pta-btt-hover-bg, #e38a6a) !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Icon inside button */
html body button.pta-scroll-top svg,
.pta-scroll-top svg {
    width: 26px !important;
    height: 26px !important;
    stroke: var(--pta-btt-color, #ffffff) !important;
    fill: none !important;
    stroke-width: 2.6 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: block !important;
    margin: auto !important;
    transition: transform 0.3s ease !important;
    pointer-events: none !important;
}

html body button.pta-scroll-top:hover svg,
.pta-scroll-top:hover svg {
    transform: translateY(-2px) !important;
}

/* Reference Signature Ripple Animation */
html body button.pta-scroll-top.has-ripple:before,
html body button.pta-scroll-top.has-ripple:after,
.pta-scroll-top.has-ripple:before,
.pta-scroll-top.has-ripple:after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    background: transparent !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: 0 0 0 0 var(--pta-btt-ripple, rgba(239, 162, 134, 0.8)) !important;
    animation: ptaRipple 3s infinite !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
}

.pta-scroll-top.has-ripple:after {
    animation-delay: 0.6s !important;
}

.pta-scroll-top.has-ripple:before {
    animation-delay: 0.9s !important;
}

@keyframes ptaRipple {
    70% {
        box-shadow: 0 0 0 35px transparent !important;
    }
    100% {
        box-shadow: 0 0 0 0 transparent !important;
    }
}

/* Mobile & Tablet Responsive */
@media screen and (max-width: 768px) {
    html body button.pta-scroll-top,
    .pta-scroll-top {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        max-width: 46px !important;
        max-height: 46px !important;
        line-height: 46px !important;
        border-radius: 50% !important;
    }
    html body button.pta-scroll-top.pta-pos-right,
    .pta-scroll-top.pta-pos-right {
        right: 18px !important;
    }
    html body button.pta-scroll-top.pta-pos-left,
    .pta-scroll-top.pta-pos-left {
        left: 18px !important;
    }
    html body button.pta-scroll-top.open,
    .pta-scroll-top.open {
        bottom: 22px !important;
    }
    html body button.pta-scroll-top svg,
    .pta-scroll-top svg {
        width: 20px !important;
        height: 20px !important;
    }
}
