/* [oe_quiz_orix_botao] — robô Orix animado + balão + CTA
   Portado do protótipo "Animated Quiz Button" (React/Framer Motion). */

.oqb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 88px 16px 8px; /* espaço para o balão acima do robô */
  font-family: 'Nunito', 'Poppins', sans-serif;
}

/* ---------- robô ---------- */

.oqb-robot-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.oqb-robot {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  border: 0;
  background: none;
  animation: oqb-float 2.4s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.oqb-robot:hover {
  transform: scale(1.08);
}

.oqb-robot:active {
  transform: scale(0.94);
}

.oqb-robot-svg {
  position: relative;
  z-index: 1;
  display: block;
}

@keyframes oqb-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* brilho pulsante atrás do robô */
.oqb-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #00b8a9 0%, transparent 70%);
  animation: oqb-glow 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes oqb-glow {
  0%, 100% { opacity: 0.4; scale: 1; }
  50% { opacity: 0.15; scale: 1.18; }
}

/* braços acenando (origem no ombro) */
.oqb-arm {
  transform-box: fill-box;
  transform-origin: 50% 15%;
}

.oqb-arm--left {
  animation: oqb-wave-left 2.7s ease-in-out infinite;
}

.oqb-arm--right {
  animation: oqb-wave-right 2.7s ease-in-out 0.1s infinite;
}

@keyframes oqb-wave-left {
  0%, 44%, 100% { rotate: 0deg; }
  9% { rotate: -25deg; }
  18% { rotate: 10deg; }
  27% { rotate: -25deg; }
  36% { rotate: 5deg; }
}

@keyframes oqb-wave-right {
  0%, 44%, 100% { rotate: 0deg; }
  9% { rotate: 20deg; }
  18% { rotate: -8deg; }
  27% { rotate: 20deg; }
  36% { rotate: -4deg; }
}

/* ---------- balões de fala ---------- */

.oqb-bubble {
  position: absolute;
  bottom: calc(100% + 4px); /* ancora acima da cabeça do robô; top: auto necessário para não conflitar */
  top: auto;
  left: 50%;
  translate: -50% 0;
  z-index: 2;
  min-width: 180px;
  max-width: 260px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 2px solid rgba(0, 184, 169, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  text-align: center;
  opacity: 1;
  scale: 1;
  transition: opacity 0.35s ease, scale 0.35s ease;
}

.oqb-bubble p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #1a2e2e;
}

.oqb-bubble::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  translate: -50% 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 12px solid #ffffff;
}

.oqb-bubble.oqb-bubble-out {
  opacity: 0;
  scale: 0.7;
}

/* balão de hover (substitui o normal quando o mouse está no robô) */
.oqb-bubble--hover {
  opacity: 0;
  scale: 0.8;
  pointer-events: none;
  background: #00b8a9;
  border-color: #00b8a9;
}

.oqb-bubble--hover p {
  color: #ffffff;
  font-weight: 800;
}

.oqb-bubble--hover::after {
  border-top-color: #00b8a9;
}

.oqb-robot:hover .oqb-bubble--idle {
  opacity: 0;
  scale: 0.7;
}

.oqb-robot:hover .oqb-bubble--hover {
  opacity: 1;
  scale: 1;
}

/* ---------- CTA ---------- */

.oqb-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00d4c2 0%, #00857a 100%);
  color: #ffffff !important;
  font-family: 'Poppins', 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0, 184, 169, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.oqb-cta:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 40px rgba(0, 184, 169, 0.45);
  background: linear-gradient(135deg, #00e8d5 0%, #00a090 100%);
  color: #ffffff;
}

.oqb-cta:active {
  transform: scale(0.97);
}

.oqb-arrow {
  display: inline-block;
  animation: oqb-arrow 1s ease-in-out infinite;
}

@keyframes oqb-arrow {
  0%, 100% { translate: 0 0; }
  50% { translate: 4px 0; }
}

.oqb-note {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #6b7c7c;
}

/* ---------- acessibilidade ---------- */

@media (prefers-reduced-motion: reduce) {
  .oqb-robot,
  .oqb-glow,
  .oqb-arm--left,
  .oqb-arm--right,
  .oqb-arrow {
    animation: none;
  }
}
