/* ==========================================
   ACTUS GESTÃO - ALERT SYSTEM
   Sistema de Alertas Transitórios
   ========================================== */

/* Container de alertas fixo */
.actus-alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 500px;
  width: 100%;
  pointer-events: none;
}

/* Alerta individual */
.actus-alert {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease-out;
  transition: all 0.3s ease;
}

/* Animação de entrada */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animação de saída */
@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.actus-alert.alert-dismissing {
  animation: slideOutRight 0.3s ease-out forwards;
}

/* Ícone do alerta */
.actus-alert-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

/* Conteúdo do alerta */
.actus-alert-content {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Botão de fechar */
.actus-alert .btn-close {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.actus-alert .btn-close:hover {
  opacity: 1;
}

/* Variantes de alerta - Light Mode */
.actus-alert.alert-success {
  background-color: var(--actus-success-50, #f0fdf4);
  border-left: 4px solid var(--actus-success-600, #16a34a);
  color: var(--actus-success-700, #15803d);
}

.actus-alert.alert-info {
  background-color: var(--actus-primary-50, #f0fdfa);
  border-left: 4px solid var(--actus-primary-600, #0d9488);
  color: var(--actus-primary-700, #0f766e);
}

.actus-alert.alert-warning {
  background-color: var(--actus-warning-50, #fffbeb);
  border-left: 4px solid var(--actus-warning-600, #ca8a04);
  color: var(--actus-warning-700, #a16207);
}

.actus-alert.alert-danger,
.actus-alert.alert-error {
  background-color: var(--actus-danger-50, #fef2f2);
  border-left: 4px solid var(--actus-error-600, #dc2626);
  color: var(--actus-danger-700, #b91c1c);
}

/* Variantes de alerta - Dark Mode */
[data-bs-theme="dark"] .actus-alert.alert-success {
  background-color: rgba(22, 163, 74, 0.15);
  border-left-color: var(--actus-success-500, #22c55e);
  color: var(--actus-success-400, #4ade80);
}

[data-bs-theme="dark"] .actus-alert.alert-info {
  background-color: rgba(13, 148, 136, 0.15);
  border-left-color: var(--actus-primary-500, #14b8a6);
  color: var(--actus-primary-400, #2dd4bf);
}

[data-bs-theme="dark"] .actus-alert.alert-warning {
  background-color: rgba(202, 138, 4, 0.15);
  border-left-color: var(--actus-warning-500, #eab308);
  color: var(--actus-warning-400, #facc15);
}

[data-bs-theme="dark"] .actus-alert.alert-danger,
[data-bs-theme="dark"] .actus-alert.alert-error {
  background-color: rgba(220, 38, 38, 0.15);
  border-left-color: var(--actus-danger-500, #ef4444);
  color: var(--actus-danger-400, #f87171);
}

/* Responsividade */
@media (max-width: 768px) {
  .actus-alert-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .actus-alert {
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
  }
}

/* Barra de progresso (opcional para auto-dismiss) */
.actus-alert-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: currentColor;
  opacity: 0.3;
  animation: alertProgress 5s linear forwards;
}

@keyframes alertProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Contador de alertas */
.actus-alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background-color: currentColor;
  opacity: 0.2;
}
