// ==========================================================================
// Toast - Notifications flottantes (erreurs de sauvegarde, etc.)
// ==========================================================================

@use '../base/variables' as *;

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: $radius-sm;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;

  &--visible {
    opacity: 1;
    transform: translateY(0);
  }

  &--success {
    background: #d4edda;
    color: #155724;
  }

  &--warning {
    background: #fff3cd;
    color: #856404;
  }

  &--info {
    background: #d1ecf1;
    color: #0c5460;
  }

  &--error {
    background: #f8d7da;
    color: #721c24;
  }
}

.toast__message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.toast__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  padding: 0;
  opacity: 0.6;

  &:hover {
    opacity: 1;
  }
}
