/* ============================================
   COMPONENTS: Toast Notifications — Obsidian Aurora
   ============================================
   Top-right stack, slide-in from right, progress bar.
   ============================================ */

/* =================== Stack Container =================== */

.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 366px;
  pointer-events: none;
}

/* =================== Toast Item =================== */

.toast-n {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--elevation-3, var(--shadow));
  padding: 14px 16px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  transform: translateX(130%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-n.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-n.hide {
  transform: translateX(130%);
  opacity: 0;
}

/* =================== Icon Circle =================== */

.toast-n-ic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
}

.toast-n.success .toast-n-ic { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.toast-n.error   .toast-n-ic { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.toast-n.warning .toast-n-ic { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.toast-n.info    .toast-n-ic { background: rgba(110, 168, 255, 0.15); color: #6EA8FF; }

/* =================== Body =================== */

.toast-n-body { flex: 1; min-width: 0; }

.toast-n-title {
  font: 600 13px/1 var(--font-sans, 'Inter', sans-serif);
  color: var(--text);
  margin-bottom: 3px;
}

.toast-n-msg {
  font: 400 12px/1.4 var(--font-sans, 'Inter', sans-serif);
  color: var(--text-dim);
  word-break: break-word;
}

/* =================== Close Button =================== */

.toast-n-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 4px;
  transition: color 150ms ease;
}
.toast-n-close:hover { color: var(--text); }

/* =================== Progress Bar =================== */

.toast-n-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 0 0 var(--radius) var(--radius);
  animation: toastProgress linear forwards;
}

.toast-n.success .toast-n-bar { background: #22c55e; }
.toast-n.error   .toast-n-bar { background: #ef4444; }
.toast-n.warning .toast-n-bar { background: #f59e0b; }
.toast-n.info    .toast-n-bar { background: #6EA8FF; }

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* =================== Responsive =================== */

@media (max-width: 768px) {
  .toast-stack {
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
