/* ===============================
   TOAST NOTIFICATIONS
   Sistema de notificações clean e profissional
   =============================== */

/* Container de toasts */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
  width: 100%;
}

/* Toast individual */
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

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

.toast.hide {
  opacity: 0;
  transform: translateX(400px);
  margin-bottom: -100px;
}

/* Ícone do toast */
.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 2px;
}

.toast-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Conteúdo do toast */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text);
}

.toast-message {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Botão de fechar */
.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
  margin-top: -4px;
  margin-right: -8px;
}

.toast-close:hover {
  opacity: 1;
  background: var(--surface-2);
}

.toast-close svg {
  width: 16px;
  height: 16px;
}

/* Tipos de toast */
.toast-success {
  border-left: 3px solid #10b981;
}

.toast-success .toast-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

[data-theme="dark"] .toast-success .toast-icon {
  background: rgba(16, 185, 129, 0.2);
}

.toast-error {
  border-left: 3px solid #ef4444;
}

.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

[data-theme="dark"] .toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
}

.toast-warning {
  border-left: 3px solid #f59e0b;
}

.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

[data-theme="dark"] .toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.2);
}

.toast-info {
  border-left: 3px solid var(--primary);
}

.toast-info .toast-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Barra de progresso (opcional, para toasts com auto-dismiss) */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0.3;
  transition: width linear;
}

.toast-success .toast-progress {
  background: #10b981;
}

.toast-error .toast-progress {
  background: #ef4444;
}

.toast-warning .toast-progress {
  background: #f59e0b;
}

/* Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 70px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  
  .toast {
    padding: 14px 16px;
  }
  
  .toast-title {
    font-size: 13px;
  }
  
  .toast-message {
    font-size: 12px;
  }
}
