/* =========================================
   FEATURE 05: SYSTEM FEEDBACK LOG & TOASTS
   ========================================= */

:root {
    --log-bg: #1e293b;         /* Slate 800 */
    --log-border: rgba(255, 255, 255, 0.08);
    --log-text: #f1f5f9;       /* Slate 100 */
    --log-time: #94a3b8;       /* Slate 400 */
    
    /* Scrollbar Variables */
    --scroll-track: rgba(0,0,0,0.2);
    --scroll-thumb: #475569;   /* Slate 600 */
    --scroll-thumb-hover: #64748b; /* Slate 500 */
}

/* --- PART 1: LOG PANEL --- */

.feedback-log-panel {
    height: 150px; /* Fixed height for dashboard */
    background-color: var(--log-bg);
    border: 1px solid var(--log-border);
    border-radius: 8px;
    padding: 10px 15px;
    overflow-y: auto;
    font-family: 'Segoe UI', monospace; /* Monospace helps align timestamps */
    font-size: 13px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
    scroll-behavior: smooth;
}

/* Custom Scrollbar (WebKit) */
.feedback-log-panel::-webkit-scrollbar { width: 8px; }
.feedback-log-panel::-webkit-scrollbar-track { background: var(--scroll-track); border-radius: 4px; margin: 4px 0; }
.feedback-log-panel::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
.feedback-log-panel::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

/* Log Entry Styling */
.log-entry {
    display: flex;
    align-items: flex-start;
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--log-border);
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}
.log-entry:last-child { border-bottom: none; }

.log-entry .timestamp { 
    color: var(--log-time); 
    margin-right: 12px; 
    white-space: nowrap; 
    opacity: 0.7; 
    font-size: 0.85em;
}

.log-entry .content { 
    color: var(--log-text); 
    word-break: break-word; 
}

.log-icon { margin-right: 8px; }

/* Status Colors */
.log-entry.success .log-icon { color: #4ade80; } /* Green */
.log-entry.warning .log-icon { color: #f59e0b; } /* Orange */
.log-entry.error .log-icon { color: #ef4444; }   /* Red */
.log-entry.info .log-icon { color: #38bdf8; }    /* Blue */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PART 2: TOAST NOTIFICATIONS --- */

#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000; /* High z-index to sit above modals */
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none; /* Allows clicking through the container area */
}

.toast {
    pointer-events: auto; /* Re-enable clicks on the toast itself */
    background-color: #1e293b; /* Slate 800 */
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #94a3b8; /* Default Border */
    padding: 16px 20px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-start;
    min-width: 300px;
    max-width: 400px;
    
    /* Animation Control */
    opacity: 0;
    animation: slideIn 0.3s forwards, fadeOut 0.5s 4.5s forwards;
}

.toast-icon { font-size: 1.2rem; margin-right: 15px; margin-top: 2px; }
.toast-content { font-size: 0.9rem; line-height: 1.4; }
.toast-title { font-weight: 700; display: block; margin-bottom: 4px; font-size: 0.95rem;}

/* Toast Variants */
.toast.success { border-left-color: #4ade80; }
.toast.success .toast-icon { color: #4ade80; }

.toast.warning { border-left-color: #f59e0b; }
.toast.warning .toast-icon { color: #f59e0b; }

.toast.error { border-left-color: #ef4444; }
.toast.error .toast-icon { color: #ef4444; }

.toast.info { border-left-color: #38bdf8; }
.toast.info .toast-icon { color: #38bdf8; }

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}