/* === FILTER ACTIVE BADGE === */
.filter-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    margin: 12px;
    animation: badge-slide-in 0.3s ease-out;
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 9999;
    overflow: hidden;
}

.filter-active-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: badge-shine 2s infinite;
}

@keyframes badge-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes badge-shine {
    to {
        left: 100%;
    }
}

.filter-active-badge .badge-icon {
    font-size: 1.1rem;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.filter-active-badge .badge-text {
    flex: 1;
    white-space: nowrap;
}

.filter-active-badge .badge-clear {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
    font-weight: bold;
}

.filter-active-badge .badge-clear:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.filter-active-badge .badge-clear:active {
    transform: scale(0.95);
}

/* Variante per alert filter */
.filter-active-badge.alert-filter {
    background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Animazione quando il filtro viene rimosso */
@keyframes badge-slide-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
}

.filter-active-badge.removing {
    animation: badge-slide-out 0.3s ease-out forwards;
}
