/* PECC2 Chatbot launcher - refined 2x size + subtle 3D float */
@keyframes pecc2-bot-float {
    0%, 50%, 58%, 100% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale3d(1, 1, 1);
    }
    7% {
        transform: translate3d(0, 2px, 0) rotateX(4deg) rotateY(0deg) rotateZ(0deg) scale3d(1.02, .98, 1);
    }
    16% {
        transform: translate3d(0, -13px, 18px) rotateX(-7deg) rotateY(6deg) rotateZ(-1.5deg) scale3d(.99, 1.01, 1);
    }
    24% {
        transform: translate3d(0, -17px, 24px) rotateX(-9deg) rotateY(-5deg) rotateZ(1.5deg) scale3d(1, 1, 1);
    }
    33% {
        transform: translate3d(0, 0, 0) rotateX(4deg) rotateY(0deg) rotateZ(0deg) scale3d(1.02, .98, 1);
    }
    42% {
        transform: translate3d(0, -4px, 6px) rotateX(-2deg) rotateY(3deg) rotateZ(0deg) scale3d(1, 1, 1);
    }
    66% {
        transform: translate3d(0, -3px, 5px) rotateX(-2deg) rotateY(-4deg) rotateZ(1deg) scale3d(1.01, 1, 1);
    }
    76% {
        transform: translate3d(0, 0, 0) rotateX(2deg) rotateY(4deg) rotateZ(-1deg) scale3d(1, 1, 1);
    }
    86% {
        transform: translate3d(0, -1px, 2px) rotateX(-1deg) rotateY(-2deg) rotateZ(.5deg) scale3d(1.005, 1, 1);
    }
}

@keyframes pecc2-bot-halo {
    0%, 100% {
        transform: scale(1);
        opacity: .42;
    }
    50% {
        transform: scale(1.07);
        opacity: .12;
    }
}

#pecc2-chatbot-btn {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 10600 !important;
    width: 152px !important;
    height: 152px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .9) !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, #ffffff 0%, #fffaf7 52%, #ffeadf 100%) !important;
    box-shadow: 0 18px 34px rgba(170, 92, 62, .24), 0 6px 14px rgba(40, 20, 10, .12), inset 0 2px 2px rgba(255, 255, 255, .95), inset 0 -6px 12px rgba(210, 124, 92, .08) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    perspective: 650px !important;
    transform-style: preserve-3d !important;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease !important;
}

#pecc2-chatbot-btn::before {
    content: "" !important;
    position: absolute !important;
    inset: 5px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .35) 16%, rgba(255, 255, 255, 0) 48%) !important;
    opacity: .75 !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

#pecc2-chatbot-btn::after {
    content: "" !important;
    position: absolute !important;
    inset: -5px !important;
    border: 1.5px solid rgba(210, 124, 92, .28) !important;
    border-radius: 50% !important;
    opacity: .42 !important;
    pointer-events: none !important;
    animation: pecc2-bot-halo 4.5s ease-out infinite !important;
}

#pecc2-chatbot-btn:hover {
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 26px 48px rgba(170, 92, 62, .30), 0 10px 20px rgba(40, 20, 10, .14), inset 0 2px 2px rgba(255, 255, 255, .95), inset 0 -6px 12px rgba(210, 124, 92, .08) !important;
}

#pecc2-chatbot-btn:active {
    transform: translateY(-1px) scale(.98) !important;
}

#pecc2-chatbot-btn img {
    position: relative !important;
    z-index: 1 !important;
    width: 80% !important;
    height: 80% !important;
    object-fit: contain !important;
    transform-origin: 50% 85% !important;
    transform-style: preserve-3d !important;
    will-change: transform !important;
    filter: drop-shadow(0 8px 7px rgba(80, 40, 20, .20)) !important;
    animation: pecc2-bot-float 7.5s cubic-bezier(.4, 0, .2, 1) infinite !important;
}

#pecc2-chatbot-panel {
    position: fixed !important;
    right: 20px !important;
    bottom: 190px !important;
    z-index: 10600 !important;
    width: 720px !important;
    height: 1120px !important;
    max-width: calc(100vw - 40px) !important;
    max-height: calc(100vh - 220px) !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(210, 124, 92, .15) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(40, 20, 10, .26), 0 8px 24px rgba(40, 20, 10, .12) !important;
    display: none !important;
}

#pecc2-chatbot-panel.open {
    display: block !important;
}

#pecc2-chatbot-panel iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    display: block !important;
    background: #fff !important;
}

body.notloggedin #pecc2-chatbot-btn,
body.notloggedin #pecc2-chatbot-panel {
    display: none !important;
}

@media (max-width: 480px) {
    #pecc2-chatbot-panel {
        left: 10px !important;
        right: 10px !important;
        bottom: 126px !important;
        width: auto !important;
        height: 78vh !important;
        max-height: calc(100vh - 150px) !important;
        border-radius: 16px !important;
    }
    #pecc2-chatbot-btn {
        right: 14px !important;
        bottom: 14px !important;
        width: 96px !important;
        height: 96px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #pecc2-chatbot-btn img,
    #pecc2-chatbot-btn::after {
        animation: none !important;
    }
}
