/* ============================================ Components CSS - Reusable UI Components ============================================ This file contains all reusable component styles: - Toast notifications - Loading spinners - Status badges (info, success, warning, danger) - Empty states - Stream items - Alerts ============================================ */ /* === Toast Notification Styles === */ .toast-stack { position: fixed; top: 24px; right: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 2000; } .toast { min-width: 260px; background: #ffffff; border-radius: 12px; border: 1px solid var(--ui-border); padding: 14px 18px; box-shadow: var(--ui-shadow); display: flex; gap: 12px; align-items: center; animation: toast-in 220ms ease; } .toast.success { border-color: rgba(22, 163, 74, 0.4); } .toast.error { border-color: rgba(220, 38, 38, 0.4); } .toast.info { border-color: rgba(37, 99, 235, 0.4); } .toast strong { font-size: 0.95rem; color: var(--ui-text); } .toast small { color: var(--ui-text-muted); display: block; } @keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } /* === Loading Spinner Styles === */ .loading-indicator { display: inline-flex; align-items: center; gap: 10px; color: var(--ui-text-muted); font-size: 0.9rem; } .loading-indicator::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--ui-border); border-top-color: var(--ui-primary); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .fade-in { animation: fade 250ms ease; } @keyframes fade { from { opacity: 0; } to { opacity: 1; } } /* === Badge Styles === */ .badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid transparent; } .badge.info { color: var(--ui-primary); border-color: var(--ui-primary); background: rgba(37, 99, 235, 0.08); } .badge.success { color: var(--ui-success); border-color: rgba(22, 163, 74, 0.3); background: rgba(22, 163, 74, 0.08); } .badge.warning { color: var(--ui-warning); border-color: rgba(217, 119, 6, 0.3); background: rgba(217, 119, 6, 0.08); } .badge.danger { color: var(--ui-danger); border-color: rgba(220, 38, 38, 0.3); background: rgba(220, 38, 38, 0.08); } .badge.source-fallback { border-color: rgba(220, 38, 38, 0.3); color: var(--ui-danger); background: rgba(220, 38, 38, 0.06); } .badge.source-live { border-color: rgba(22, 163, 74, 0.3); color: var(--ui-success); background: rgba(22, 163, 74, 0.08); } /* === Empty State Styles === */ .empty-state { padding: 20px; border-radius: 12px; text-align: center; border: 1px dashed var(--ui-border); color: var(--ui-text-muted); background: #fff; } /* === Stream Item Styles === */ .ws-stream { display: flex; flex-direction: column; gap: 12px; max-height: 300px; overflow-y: auto; } .stream-item { border: 1px solid var(--ui-border); border-radius: 12px; padding: 12px 14px; background: var(--ui-panel-muted); } /* === Alert Styles === */ .alert { border-radius: 12px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; } .alert.info { background: rgba(37, 99, 235, 0.08); color: var(--ui-primary); border: 1px solid rgba(37, 99, 235, 0.2); } .alert.success { background: rgba(22, 163, 74, 0.08); color: var(--ui-success); border: 1px solid rgba(22, 163, 74, 0.2); } .alert.warning { background: rgba(217, 119, 6, 0.08); color: var(--ui-warning); border: 1px solid rgba(217, 119, 6, 0.2); } .alert.danger, .alert.error { background: rgba(220, 38, 38, 0.08); color: var(--ui-danger); border: 1px solid rgba(220, 38, 38, 0.2); }