/**
 * ai-components.css
 * Estilos para componentes de IA
 * Padronizado com Design Tokens
 */

/* Seção de assistente IA */
#ai-assistant-section,
#aprovacao-ai-section {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Campos sugeridos pela IA */
.ai-suggested {
  animation: aiGlow 1s ease-in-out;
  border-color: var(--primary) !important;
  box-shadow: 0 0 8px rgba(0, 57, 186, 0.3) !important;
}

@keyframes aiGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 57, 186, 0.3); }
  50% { box-shadow: 0 0 15px rgba(0, 57, 186, 0.6); }
}

/* Sugestões inline */
.ai-inline-suggestion {
  margin-top: 0.25rem;
  padding: 0.5rem;
  background: rgba(0, 57, 186, 0.08); /* Primary com baixa opacidade */
  border-left: 3px solid var(--primary);
  border-radius: var(--border-radius-sm);
  animation: fadeIn 0.3s ease-out;
  color: var(--text-primary);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ai-inline-suggestion button {
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.ai-inline-suggestion button:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* Status de processamento */
#ai-status {
  animation: fadeIn 0.3s ease-out;
}

#ai-status .spinner-border {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

/* Container de sugestões */
#ai-suggestions-container {
  animation: slideDown 0.4s ease-out;
}

/* Badge de IA */
.badge.bg-light.text-primary {
  font-weight: var(--font-weight-semibold);
  padding: 0.35em 0.65em;
  background-color: var(--gray-100) !important;
  color: var(--primary) !important;
}

/* Ícones de IA */
.bi-robot, .bi-magic, .bi-stars, .bi-lightning-charge {
  animation: pulse 2s ease-in-out infinite;
}

/* Botões de IA */
.btn-primary .bi-magic,
.btn-outline-primary .bi-lightning-charge {
  margin-right: 0.25rem;
}

/* Estatísticas de IA na configuração */
#ai-stats-container {
  animation: fadeIn 0.5s ease-out;
}

#ai-stats-container .bg-light {
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface) !important;
}

/* Loading state para botões de IA */
.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Responsividade */
@media (max-width: 768px) {
  #ai-assistant-section .row > div {
    margin-bottom: 1rem;
  }
  
  .ai-inline-suggestion {
    font-size: var(--font-size-sm);
  }
}

/* Animação de sucesso */
.alert-success {
  animation: bounceIn 0.5s ease-out;
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.9); }
  50% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
