/* ETL Toast v1 — global notification system (Sonner-style) */
.etl-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 36px);
}
.etl-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 280px;
  max-width: 380px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 12px 32px -8px rgba(0, 0, 0, 0.18);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  color: #1D1D1B;
  animation: etl-toast-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  overflow: hidden;
}
.etl-toast.is-leaving { animation: etl-toast-out 0.24s cubic-bezier(0.4, 0, 1, 1) forwards; }

@keyframes etl-toast-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes etl-toast-out {
  to { transform: translateX(110%); opacity: 0; }
}

.etl-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #6b6b69;
}
.etl-toast--success::before { background: #16a34a; }
.etl-toast--error::before   { background: #E52629; }
.etl-toast--info::before    { background: #2563eb; }
.etl-toast--warning::before { background: #f59e0b; }

.etl-toast__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.etl-toast--success .etl-toast__icon { color: #16a34a; }
.etl-toast--error   .etl-toast__icon { color: #E52629; }
.etl-toast--info    .etl-toast__icon { color: #2563eb; }
.etl-toast--warning .etl-toast__icon { color: #f59e0b; }

.etl-toast__body { flex: 1 1 auto; min-width: 0; }
.etl-toast__title {
  font-weight: 600;
  margin: 0 0 2px;
  color: #1D1D1B;
}
.etl-toast__msg {
  margin: 0;
  color: #4a4a48;
  font-size: 13px;
}

.etl-toast__close {
  flex-shrink: 0;
  background: transparent;
  border: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  color: #6b6b69;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.etl-toast__close:hover { background: rgba(0,0,0,0.06); color: #1D1D1B; }
.etl-toast__close:focus-visible { outline: 2px solid #E52629; outline-offset: 1px; }

@media (max-width: 640px) {
  .etl-toast-stack { top: 12px; right: 12px; left: 12px; }
  .etl-toast { min-width: 0; width: 100%; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .etl-toast { animation: none !important; }
  .etl-toast.is-leaving { animation: none !important; opacity: 0; }
}

html[data-theme="dark"] .etl-toast {
  background: rgba(28, 28, 32, 0.92);
  color: rgba(255,255,255,0.94);
  border-color: rgba(255,255,255,0.08);
}
html[data-theme="dark"] .etl-toast__title { color: #fff; }
html[data-theme="dark"] .etl-toast__msg { color: rgba(255,255,255,0.72); }
html[data-theme="dark"] .etl-toast__close { color: rgba(255,255,255,0.55); }
html[data-theme="dark"] .etl-toast__close:hover { background: rgba(255,255,255,0.1); color: #fff; }
