/* =====================================================
   VoiSpeed: badge notifica chiamate in arrivo
   ===================================================== */
#vs-notify {
    position: fixed;
    bottom: 14px;
    left: 14px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse; /* nuove chiamate sopra le vecchie quando crescono verso l'alto */
    gap: 8px;
    max-width: 340px;
    pointer-events: none; /* il box e' click-through, le card si */
}
#vs-notify .vs-call {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1976D2, #0d47a1);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 0 4px rgba(25, 118, 210, 0.12);
    animation: vs-pulse 1.6s ease-in-out infinite;
    min-width: 260px;
}
/* Chiamata gia' presa in carico (handled): stile verde calmo, niente pulsazione */
#vs-notify .vs-call.vs-handled {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3), 0 0 0 4px rgba(22, 163, 74, 0.14);
    animation: none;
}
#vs-notify .vs-call.vs-handled .vs-call-icon {
    animation: none;
}
#vs-notify .vs-call.vs-handled .vs-btn-open {
    color: #166534;
}
@keyframes vs-pulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 0 0   rgba(25, 118, 210, 0.45); }
    50%      { box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 0 12px rgba(25, 118, 210, 0.00); }
}
#vs-notify .vs-call-icon {
    font-size: 22px;
    line-height: 1;
    animation: vs-shake 1s ease-in-out infinite;
}
@keyframes vs-shake {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-12deg); }
    75%      { transform: rotate(12deg); }
}
#vs-notify .vs-call-main {
    flex: 1;
    min-width: 0;
}
#vs-notify .vs-call-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#vs-notify .vs-call-num {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
    line-height: 1.2;
}
#vs-notify .vs-call-ago {
    font-size: 10.5px;
    opacity: 0.75;
    margin-top: 1px;
}
#vs-notify .vs-call-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}
#vs-notify .vs-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #0d47a1;
    border: none;
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.08s ease, background 0.15s ease;
}
#vs-notify .vs-btn:hover  { background: #fff; }
#vs-notify .vs-btn:active { transform: scale(0.96); }
#vs-notify .vs-btn-close {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 5px 9px;
    font-size: 16px;
    line-height: 1;
}
#vs-notify .vs-btn-close:hover { background: rgba(255, 255, 255, 0.28); }

/* mobile / portrait */
@media (max-width: 600px) {
    #vs-notify {
        bottom: 8px;
        left: 8px;
        right: 8px;
        max-width: none;
    }
    #vs-notify .vs-call { min-width: 0; }
}
