/* JLog Core — Toasts, Spinner, Empty States
   Supports dark (default) + light mode via .jn-light class on <html> */

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */

.jlog-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
}

.jlog-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  transition: opacity .25s, transform .25s;
}

.jlog-toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.jlog-toast-hide {
  opacity: 0;
  transform: translateY(-8px) scale(.96);
}

.jlog-toast-icon { font-size: 16px; flex-shrink: 0; }
.jlog-toast-msg { flex: 1; }

/* Dark mode (default) */
.jlog-toast-success { background: #0d2818; color: #86efac; border: 1px solid #166534; }
.jlog-toast-error   { background: #2d0a0a; color: #fca5a5; border: 1px solid #991b1b; }
.jlog-toast-warning { background: #2d1f05; color: #fcd34d; border: 1px solid #92400e; }
.jlog-toast-info    { background: #0c1929; color: #93c5fd; border: 1px solid #1e40af; }

/* Light mode */
.jn-light .jlog-toast-success { background: #f0fdf4; color: #166534; border-color: #86efac; }
.jn-light .jlog-toast-error   { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.jn-light .jlog-toast-warning { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.jn-light .jlog-toast-info    { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }

/* ═══════════════════════════════════════════════════════════
   LOADING SPINNER
   ═══════════════════════════════════════════════════════════ */

.jlog-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
}

.jlog-loading p {
  color: #9ca3af;
  font-size: 14px;
  margin: 0;
}

.jn-light .jlog-loading p {
  color: #6b7280;
}

.jlog-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: jlog-spin .7s linear infinite;
}

.jn-light .jlog-spinner {
  border-color: rgba(0,0,0,.08);
  border-top-color: #16a34a;
}

@keyframes jlog-spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════ */

.jlog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  gap: 16px;
  color: #6b7280;
}

.jlog-empty svg {
  opacity: .4;
  color: #9ca3af;
}

.jlog-empty p {
  font-size: 15px;
  margin: 0;
  text-align: center;
}

.jn-light .jlog-empty { color: #6b7280; }
.jn-light .jlog-empty svg { color: #9ca3af; }
