/* public/ui/toast/toast.css */

.toast-container {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  pointer-events: none;
  padding: 18px;
}

.toast {
  pointer-events: auto;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: flex-start;
  transform: scale(0.96);
  opacity: 0;
  animation: toast-in 0.22s ease forwards;
}

.toast.hide {
  animation: toast-out 0.18s ease forwards;
}

.toast-icon {
  font-size: 1.2rem;
  line-height: 1;
  margin-top: 1px;
}

.toast-content strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.toast-content span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.toast-close {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  font-size: 1rem;
  padding: 0;
}

.toast-close:hover {
  color: var(--text);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(20, 83, 45, 0.96);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(127, 29, 29, 0.96);
}

.toast.warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(120, 53, 15, 0.96);
}

.toast.info {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 35%, var(--panel));
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

@media (max-width: 700px) {
  .toast-container {
    padding: 16px;
  }

  .toast {
    width: 100%;
  }
}