/* Call Widget Styles */

#callwidget-button {
    position: fixed;
    /* By default place it above the AI chat widget which is at bottom: 20px */
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 999998;
    /* Slightly below the chat widget if they overlap */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline: none;
}

.callwidget-icon {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--callwidget-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Subtle wiggle animation for the phone icon itself */
    animation: wiggle 2s infinite ease-in-out;
}

.callwidget-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--callwidget-icon);
    display: block;
}

/* Pulsating rings behind the button */
.callwidget-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--callwidget-primary);
    z-index: 1;
    animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Stop wiggle on hover but keep pulse */
#callwidget-button:hover .callwidget-icon {
    animation: none;
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Keyframes */
@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

@keyframes wiggle {

    0%,
    10%,
    100% {
        transform: rotate(0deg);
    }

    2%,
    6% {
        transform: rotate(-15deg);
    }

    4%,
    8% {
        transform: rotate(15deg);
    }
}

/* Mobile responsive - keep on the right side stacked above chat widget like desktop */
@media (max-width: 480px) {
    #callwidget-button {
        bottom: 100px;
        right: 20px;
        left: auto;
    }
}