﻿/* ================= AVATAR DO ASSISTENTE ================= */
.ai-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(var(--warning-rgb), 0.6));
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === AURA PULSANTE === */
.ai-aura {
  animation: ai-aura-pulse 3s ease-in-out infinite;
}

@keyframes ai-aura-pulse {
  0%,
  100% {
    r: 15;
    opacity: 0.2;
  }

  50% {
    r: 17;
    opacity: 0.4;
  }
}

/* === CORPO (RESPIRAÇÃO SUAVE) === */
.ai-body {
  animation: ai-breathe 4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes ai-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

/* === BRILHO SUPERIOR === */
.ai-shine {
  animation: ai-shine-shimmer 3s ease-in-out infinite;
}

@keyframes ai-shine-shimmer {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.8;
  }
}

/* === PARTÍCULAS FLUTUANTES === */
.ai-particles {
  animation: ai-float 6s ease-in-out infinite;
}

@keyframes ai-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.ai-particle {
  animation: ai-particle-twinkle 2s ease-in-out infinite;
}

.ai-particle:nth-child(1) {
  animation-delay: 0s;
}

.ai-particle:nth-child(2) {
  animation-delay: 0.5s;
}

.ai-particle:nth-child(3) {
  animation-delay: 1s;
}

.ai-particle:nth-child(4) {
  animation-delay: 1.5s;
}

@keyframes ai-particle-twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

/* === PISCAR NATURAL COM PÁLPEBRAS === */
.ai-eyelid-left,
.ai-eyelid-right {
  animation: ai-blink-eyelid 5s ease-in-out infinite;
}

@keyframes ai-blink-eyelid {
  0%,
  94%,
  100% {
    ry: 0;
    opacity: 0;
  }

  95%,
  99% {
    ry: 2.5;
    opacity: 1;
  }
}

/* === PUPILAS (OLHAR SUTIL) === */
.ai-pupil-left,
.ai-pupil-right {
  animation: ai-look-subtle 8s ease-in-out infinite;
}

@keyframes ai-look-subtle {
  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(0.3px, -0.2px);
  }

  50% {
    transform: translate(-0.3px, 0.1px);
  }

  75% {
    transform: translate(0.2px, 0.2px);
  }
}

/* === BOCA (SORRISO SUTIL) === */
.ai-mouth {
  animation: ai-smile-subtle 6s ease-in-out infinite;
}

@keyframes ai-smile-subtle {
  0%,
  100% {
    d: path("M 13 21 Q 18 24, 23 21");
  }

  50% {
    d: path("M 13 21 Q 18 24.5, 23 21");
  }
}

/* === BOCHECHAS === */
.ai-blush-left,
.ai-blush-right {
  animation: ai-blush-pulse 3s ease-in-out infinite;
}

@keyframes ai-blush-pulse {
  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.35;
  }
}

/* === ANTENA (INDICADOR DE IA) === */
.ai-antenna-tip {
  animation: ai-antenna-blink 2s ease-in-out infinite;
}

@keyframes ai-antenna-blink {
  0%,
  100% {
    opacity: 0.6;
    r: 1.5;
  }

  50% {
    opacity: 1;
    r: 2;
  }
}

.ai-antenna-glow {
  animation: ai-antenna-glow-pulse 2s ease-in-out infinite;
}

@keyframes ai-antenna-glow-pulse {
  0%,
  100% {
    opacity: 0.2;
    r: 2.5;
  }

  50% {
    opacity: 0.5;
    r: 3.5;
  }
}

/* === ONDAS DE COMUNICAÇÃO === */
.ai-waves path {
  animation: ai-wave-pulse 2s ease-in-out infinite;
}

.ai-wave-1 {
  animation-delay: 0s;
}

.ai-wave-2 {
  animation-delay: 0.3s;
}

@keyframes ai-wave-pulse {
  0%,
  100% {
    opacity: 0.2;
    stroke-width: 0.8;
  }

  50% {
    opacity: 0.6;
    stroke-width: 1.5;
  }
}

/* === HOVER (ASSISTENTE FICA FELIZ!) === */
@media (hover: hover) {
  .ai-fab:hover .ai-icon {
  filter: drop-shadow(0 0 25px rgba(var(--warning-rgb), 1));
  transform: scale(1.1);
}
}

@media (hover: hover) {
  .ai-fab:hover .ai-body {
  animation: ai-excited-bounce 0.6s ease-in-out infinite;
}
}

@keyframes ai-excited-bounce {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@media (hover: hover) {
  .ai-fab:hover .ai-eyelid-left,
  .ai-fab:hover .ai-eyelid-right {
  animation: ai-excited-blink 1.2s ease-in-out infinite;
}
}

@keyframes ai-excited-blink {
  0%,
  85%,
  100% {
    ry: 0;
    opacity: 0;
  }

  90%,
  95% {
    ry: 2.5;
    opacity: 1;
  }
}

@media (hover: hover) {
  .ai-fab:hover .ai-mouth {
  d: path("M 13 21 Q 18 25, 23 21");
}
}

@media (hover: hover) {
  .ai-fab:hover .ai-blush-left,
  .ai-fab:hover .ai-blush-right {
  opacity: 0.5 !important;
}
}

@media (hover: hover) {
  .ai-fab:hover .ai-antenna-tip {
  animation-duration: 0.8s;
  opacity: 1 !important;
}
}

@media (hover: hover) {
  .ai-fab:hover .ai-waves path {
  animation-duration: 1s;
  opacity: 0.8 !important;
  stroke-width: 2 !important;
}
}

/* === SINAL DE PULSO (RESSONÂNCIA) === */
.ai-pulse-signal {
  animation: ai-signal-pulse 1.5s ease-out infinite;
  z-index: 1001;
  /* Garante prioridade visual */
}

/* Ocultar a aura interna durante o pulso para limpar o rosto */
.ai-pulse-signal .ai-aura {
  opacity: 0 !important;
}

/* Brilho focado apenas nos traços do mascote, não no fundo */
.ai-pulse-signal .ai-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 10px var(--primary-light));
}

@keyframes ai-signal-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--primary-light-80);
  }

  50% {
    box-shadow: 0 0 0 25px transparent;
    /* Onda expande para fora */
  }

  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@media (hover: hover) {
  .ai-fab:hover .ai-particles {
  animation-duration: 3s;
}
}

@media (hover: hover) {
  .ai-fab:hover .ai-aura {
  opacity: 0.6 !important;
  animation-duration: 1.5s;
}
}
