/**
 * Modern toast notifications
 */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0;
  pointer-events: none;
}
.toast-container > * { pointer-events: auto; }

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
  background: #fff;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.4;
  min-width: 280px;
  max-width: 100%;
}
.toast-success {
  border-left: 4px solid #059669;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}
.toast-success .toast-icon { color: #059669; }
.toast-error {
  border-left: 4px solid #dc2626;
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
}
.toast-error .toast-icon { color: #dc2626; }
.toast-info {
  border-left: 4px solid #0284c7;
  background: linear-gradient(135deg, #f0f9ff 0%, #fff 100%);
}
.toast-info .toast-icon { color: #0284c7; }

.toast-icon {
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}
.toast-text { flex: 1; min-width: 0; }
.toast-text a { color: inherit; text-decoration: underline; font-weight: 500; }
.toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0,0,0,0.06);
  color: #64748b;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.toast-close:hover {
  background: rgba(0,0,0,0.1);
  color: #1e293b;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(120%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(120%);
  }
}

@media (max-width: 576px) {
  .toast-container {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
    left: max(1rem, env(safe-area-inset-left));
    max-width: none;
  }
  .toast { min-width: 0; }
}
