@keyframes webenable-telephony-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.25);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

.webenable-telephony-call-pulse {
    display: inline-flex;
    align-items: center;
    animation: webenable-telephony-pulse 1.5s infinite ease-in-out;
    transform-origin: center;
    margin-left: 8px;
}

.webenable-telephony-call-notifications {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 392px;
    max-width: 100vw;
    max-height: 80vh;
    box-sizing: border-box;
    /* Leave room for shadows inside the scroll container. Cards remain 16px from the viewport edges. */
    padding: 16px;
    overflow-y: auto;
    z-index: 1500;
    pointer-events: none;
}

/* Only the content receives clicks; empty padding leaves the application accessible. */
.webenable-telephony-call-notifications > * {
    pointer-events: auto;
}

.webenable-telephony-call-notifications .webenable-telephony-call-notification {
    border: 1px solid var(--mud-palette-divider);
    border-left: 4px solid var(--mud-palette-primary);
    animation: webenable-telephony-notification-enter var(--webenable-telephony-notification-duration, 500ms) ease-out;
}

.webenable-telephony-call-notifications .webenable-telephony-call-notification-exiting {
    pointer-events: none;
    animation: webenable-telephony-notification-exit var(--webenable-telephony-notification-duration, 500ms) ease-in forwards;
}

@keyframes webenable-telephony-notification-enter {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes webenable-telephony-notification-exit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(40px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .webenable-telephony-call-notifications .webenable-telephony-call-notification {
        animation: none;
    }
    .webenable-telephony-call-notifications .webenable-telephony-call-notification-exiting {
        display: none;
    }
}
