/* =========================================
   GEA DEBUG PANEL & VOICE ASSISTANT
   ========================================= */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-height: 400px;
    background: rgba(15, 23, 42, 0.95); /* Sfondo scuro moderno */
    backdrop-filter: blur(10px);        /* Effetto vetro sfocato */
    color: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Stato Minimizzato (chiuso) */
.debug-panel.minimized {
    height: 50px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

/* Area dei Log (Messaggi) */
.debug-logs {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    font-size: 0.85rem;
    padding-right: 5px;
    max-height: 250px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}

/* Scrollbar personalizzata per i log */
.debug-logs::-webkit-scrollbar { width: 5px; }
.debug-logs::-webkit-scrollbar-thumb { background: #4e73df; border-radius: 4px; }
.debug-logs::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }

/* Colori dei messaggi */
.log-user { color: #36b9cc; margin-bottom: 8px; text-align: right; }
.log-bot { color: #1cc88a; margin-bottom: 8px; text-align: left; }

/* Animazione pulsante microfono quando ascolta */
.pulse-animation {
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Adattamento Mobile per il Pannello Debug */
@media (max-width: 768px) {
    .debug-panel {
        width: 100%;
        left: 0;
        bottom: 0;
        right: 0;
        border-radius: 15px 15px 0 0; /* Arrotonda solo sopra */
        max-height: 50vh; /* Massimo metà schermo su mobile */
    }
}

/* =========================================
   NOTIFICHE (Badge animato)
   ========================================= */
.animate-pulse {
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(1) translate(-50%, -50%); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { transform: scale(1.2) translate(-50%, -50%); box-shadow: 0 0 0 5px rgba(220, 53, 69, 0); }
    100% { transform: scale(1) translate(-50%, -50%); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}
