/* ========================================================================
   Sistema de Toast de Notificações
   Estilos para notificações modernas que substituem alerts
   ======================================================================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(30, 30, 30, 0.98);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-left: 4px solid;
  min-width: 300px;
  max-width: 100%;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  word-wrap: break-word;
}

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

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.toast-message {
  flex: 1;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* Tipos de Toast */
.toast-success {
  border-left-color: #00d4ff;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.15) 0%,
    rgba(30, 30, 30, 0.98) 50%
  );
}

.toast-error {
  border-left-color: #ff4757;
  background: linear-gradient(
    135deg,
    rgba(255, 71, 87, 0.15) 0%,
    rgba(30, 30, 30, 0.98) 50%
  );
}

.toast-warning {
  border-left-color: #ffa502;
  background: linear-gradient(
    135deg,
    rgba(255, 165, 2, 0.15) 0%,
    rgba(30, 30, 30, 0.98) 50%
  );
}

.toast-info {
  border-left-color: #5352ed;
  background: linear-gradient(
    135deg,
    rgba(83, 82, 237, 0.15) 0%,
    rgba(30, 30, 30, 0.98) 50%
  );
}

/* Animação de pulso para novos toasts */
@keyframes toast-pulse {
  0% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 20px rgba(0, 212, 255, 0.3);
  }
  100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

.toast-show {
  animation: toast-pulse 0.5s ease-in-out;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    width: 100%;
    padding: 14px 16px;
  }

  .toast-message {
    font-size: 13px;
  }

  .toast-icon {
    font-size: 20px;
  }

  .toast-close {
    width: 20px;
    height: 20px;
    font-size: 20px;
  }
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
  .toast {
    background: #000000;
    border: 2px solid;
  }

  .toast-success {
    border-color: #00d4ff;
  }

  .toast-error {
    border-color: #ff4757;
  }

  .toast-warning {
    border-color: #ffa502;
  }

  .toast-info {
    border-color: #5352ed;
  }
}

/* Suporte para modo escuro do sistema */
@media (prefers-color-scheme: dark) {
  .toast {
    background: rgba(20, 20, 20, 0.98);
  }
}

/* Animação de saída */
.toast.toast-hiding {
  opacity: 0;
  transform: translateX(400px);
}
