/* Gateway SSE Real-Time Notifications - Styles */

/* Gateway Status Badge - Nuovo stile */
.gateway-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(80, 90, 100, 0.85);
    backdrop-filter: blur(4px);
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #6c757d;
    transition: all 0.3s ease;
}

.status-dot.connected {
    background-color: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
}

.status-dot.disconnected {
    background-color: #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
}

.gateway-status-badge .status-text {
    color: #e0e0e0;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

/* Contatore notifiche - Badge giallo */
.notification-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 28px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    border-radius: 14px;
    background-color: #ffc107;
    color: #000;
}

/* Toast container per notifiche */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animazioni nuove righe tabella */
.new-row {
    animation: slideInFade 0.6s ease-out;
    background-color: #d4edda !important;
    transition: background-color 3s ease;
}

@keyframes slideInFade {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Highlight temporaneo per elementi aggiornati */
.highlight-update {
    animation: highlightFlash 1.5s ease-out;
}

@keyframes highlightFlash {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: #fff3cd;
    }
}

/* Badge stato device con transizione */
.device-status-badge {
    transition: all 0.3s ease;
}

/* Indicatore "loading" per refresh in corso */
.refreshing::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Responsive: nascondi testo su mobile */
@media (max-width: 576px) {
    .sse-status-container span:not(.status-dot) {
        display: none;
    }
    
    .notification-badge {
        margin-left: 4px;
    }
}
