/* Toast notifications */

/* Entry: desliza do topo para baixo */
@keyframes slideInDown {
  from {
    transform: translateY(-0.75rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Exit: desliza para cima e some */
@keyframes slideOutUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-0.75rem);
    opacity: 0;
  }
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  animation: slideInDown 0.25s ease-out;
  min-width: 250px;
  max-width: 400px;
}

/* Cores usando variáveis do projeto — funcionam em light e dark mode automaticamente */
.toast.toast-success {
  background-color: hsl(var(--status-success));
  color: hsl(var(--primary-foreground));
}

.toast.toast-error {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.toast.toast-info {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.toast.toast-warning {
  background-color: hsl(var(--warning));
  color: hsl(var(--warning-foreground));
}

.toast.hiding {
  animation: slideOutUp 0.2s ease-in forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Details chevron rotation */
section[name="easy-form-new"] details summary {
  cursor: pointer;
  user-select: none;
}

section[name="easy-form-new"] details[open] summary [data-lucide="chevron-down"] {
  transform: rotate(180deg);
}

/* Responsive — mobile: full width no topo */
@media (max-width: 640px) {
  .toast-container {
    top: 1rem;
    left: 1rem;
    right: 1rem;
  }

  .toast {
    width: 100%;
    max-width: none;
  }
}
