/* ============================================================
   Notifications toast — Smart WP Design System (§18)
   ============================================================ */

.toast-stack {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: var(--z-toast);
  width: 360px;
  max-width: calc(100vw - var(--space-8));
  pointer-events: none;
}

@media (max-width: 640px) {
  .toast-stack {
    top: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
    width: auto;
  }
}

.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-2xl);
  background: var(--surface-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
  min-height: 64px;
  pointer-events: all;
  animation: slideInRight 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform var(--t-base);
  overflow: hidden;
}

@media (max-width: 640px) {
  .toast { animation: slideInDown 300ms cubic-bezier(0.34, 1.56, 0.64, 1); }
}

.toast:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-lg);
}

.toast.is-leaving { animation: fadeOutScale 200ms ease-in forwards; }

.toast__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast--success .toast__icon { background: var(--color-success-soft); color: var(--color-success); }
.toast--info    .toast__icon { background: var(--color-info-soft);    color: var(--color-info); }
.toast--warning .toast__icon { background: var(--color-warning-soft); color: var(--color-warning); }
.toast--danger  .toast__icon { background: var(--color-danger-soft);  color: var(--color-danger); }
.toast--default .toast__icon { background: var(--color-brand-soft);   color: var(--color-brand-primary); }

.toast__body { flex: 1; min-width: 0; }

.toast__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.toast__desc {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toast__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--t-base);
  flex-shrink: 0;
}

.toast__close:hover {
  background: var(--border-secondary);
  color: var(--text-primary);
}

.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--color-brand-primary);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  animation: shrink 5s linear forwards;
}

.toast--success .toast__progress { background: var(--color-success); }
.toast--info    .toast__progress { background: var(--color-info); }
.toast--warning .toast__progress { background: var(--color-warning); }
.toast--danger  .toast__progress { display: none; }
