/* Toast Notification System */

.toast-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.toast {
  width: 192px;
  min-height: 192px;
  height: auto;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  font-size: var(--fs-15);
  font-weight: var(--fw-semibold);
  text-align: center;
  line-height: 1.4;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
  pointer-events: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.toast--show {
  opacity: 1;
  transform: scale(1);
}

/* Sucesso (verde) */
.toast--success {
  background: #22c55e;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Receita (verde) */
.toast--income {
  background: #22c55e;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Despesa (laranja) */
.toast--expense {
  background: #f97316;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Erro (vermelho) */
.toast--error {
  background: #ef4444;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Carregando (azul) */
.toast--loading {
  background: #3b82f6;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Erro de Conexão (laranja) */
.toast--connection-error {
  background: #f97316;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .toast {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }

  .toast--error {
    background: #dc2626;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .toast--expense {
    background: #c2410c;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .toast--income {
    background: #16a34a;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .toast--loading {
    background: #1e40af;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .toast--connection-error {
    background: #c2410c;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
  }
}

.toast__icon-wrapper {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  border-radius: 99px;
}

.toast__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.toast__message {
  display: block;
  font-weight: var(--fw-semibold);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  padding: 0 4px;
}
