/* ===================================================
   🍞 Toast Notifications — Premium
   =================================================== */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 450px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-exit {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  font-size: 1.375rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.toast-icon-success {
  background: rgba(16, 185, 129, 0.15);
}

.toast-icon-error {
  background: rgba(239, 68, 68, 0.15);
}

.toast-icon-warning {
  background: rgba(245, 158, 11, 0.15);
}

.toast-icon-info {
  background: rgba(59, 130, 246, 0.15);
}

.toast-message {
  flex: 1;
  color: var(--text-primary);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* === Borda lateral por tipo === */
.toast-success {
  border-left: 4px solid var(--status-maduro);
}

.toast-error {
  border-left: 4px solid var(--status-fragil);
}

.toast-warning {
  border-left: 4px solid var(--status-sem-medicao);
}

.toast-info {
  border-left: 4px solid var(--accent-tr);
}

/* === Toast no topo para mobile === */
@media (max-width: 640px) {
  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    bottom: auto;
    max-width: none;
  }

  .toast {
    transform: translateY(-120%);
  }

  .toast.show {
    transform: translateY(0);
  }
}
