/* Animações adicionais para o Simulador de Impostos */

/* Efeitos de entrada */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-30px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(30px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromTop {
  0% {
    transform: translateY(-30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInFromBottom {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Classes de animação */
.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-slide-left {
  animation: slideInFromLeft 0.8s ease forwards;
}

.animate-slide-right {
  animation: slideInFromRight 0.8s ease forwards;
}

.animate-slide-up {
  animation: slideInFromBottom 0.8s ease forwards;
}

.animate-slide-down {
  animation: slideInFromTop 0.8s ease forwards;
}

.animate-zoom {
  animation: zoomIn 0.8s ease forwards;
}

.animate-pulse {
  animation: pulse 1.5s ease infinite;
}

.animate-shake {
  animation: shake 0.5s ease;
}

.animate-bounce {
  animation: bounce 1s ease;
}

/* Atrasos de animação */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

/* Aplicação de animações em elementos específicos */
header .logo {
  animation: slideInFromTop 0.8s ease;
}

header .subtitle {
  animation: fadeIn 0.8s ease 0.2s forwards;
  opacity: 0;
}

header .description {
  animation: fadeIn 0.8s ease 0.4s forwards;
  opacity: 0;
}

.progress-container {
  animation: fadeIn 0.8s ease 0.6s forwards;
  opacity: 0;
}

.card {
  animation: zoomIn 0.8s ease 0.8s forwards;
  opacity: 0;
}

.form-group {
  animation: slideInFromRight 0.5s ease;
}

.button-group {
  animation: slideInFromBottom 0.5s ease;
}

/* Animações para os resultados */
.regime-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.regime-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.regime-card.recomendado {
  animation: pulse 2s infinite;
}

.valor-imposto {
  animation: fadeIn 0.8s ease;
}

.economia {
  animation: slideInFromBottom 0.8s ease;
}

/* Animações para feedback de validação */
.invalid {
  animation: shake 0.5s ease;
  border-color: var(--danger-color) !important;
}

.error-message {
  color: var(--danger-color);
  font-size: 0.8rem;
  margin-top: 5px;
  animation: fadeIn 0.3s ease;
}

.success-message {
  color: var(--success-color);
  font-size: 0.8rem;
  margin-top: 5px;
  animation: fadeIn 0.3s ease;
}

/* Animações para tooltips */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--dark-color);
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark-color) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

/* Animações para o modal */
.modal {
  animation: fadeIn 0.3s ease;
}

.modal-content {
  animation: zoomIn 0.3s ease;
}

/* Animações para botões */
.btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(1px);
}

/* Animações para ícones */
.input-icon i {
  transition: color 0.3s ease;
}

.input-icon:focus-within i {
  color: var(--primary-color);
}

/* Animações para etapas do progresso */
.step {
  transition: all 0.3s ease;
}

.step.active .step-number {
  animation: pulse 1.5s infinite;
}

.step.completed .step-number {
  animation: fadeIn 0.5s ease;
}
