/* ===================== TOAST & LOADING v5.0 ===================== */
/* Toast Notifications, Loading Overlay, Debug Console */

/* ---- TOAST (Centered Top) ---- */
.toast-container {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 500px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-family: var(--font);
    pointer-events: auto;
    animation: toastSlideDown 0.35s cubic-bezier(.4, 0, .2, 1);
    transition: opacity 0.3s, transform 0.3s;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.toast.info {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.toast.success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.toast.warn {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.toast.error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- LOADING OVERLAY ---- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 13px;
    color: var(--text-secondary);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- DEBUG CONSOLE ---- */
.debug-console {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 260px;
    background: #0a0a0f !important;
    color: #e5e7eb !important;
    border-top: 1px solid var(--border);
    z-index: 300;
    display: flex;
    flex-direction: column;
}

.debug-console.hidden {
    display: none;
}

.debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
}

.debug-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.6;
}

.debug-console .debug-log-entry {
    color: #e5e7eb !important;
}

[data-theme="light"] .debug-console {
    background: #0a0a0f !important;
    color: #e5e7eb !important;
    border-color: #333 !important;
}