/* =====================================================
   BOTOES-FLUTUANTES.CSS
   Botões modernos com efeito neon pulsante
   ===================================================== */

:root {
  --bt-flutuante-laranja: #ff954e;
  --bt-flutuante-laranja-escuro: #ff5757;
  --bt-flutuante-verde: #25d366;
  --bt-flutuante-verde-escuro: #128c7e;
  --bt-flutuante-sombra: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --bt-flutuante-sombra-hover: 0 15px 35px -5px rgba(0, 0, 0, 0.4);
  --bt-flutuante-transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Container dos botões */
.floating-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  pointer-events: none;
}

/* Estilo base dos botões */
.floating-btn {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: var(--bt-flutuante-sombra);
  transition: var(--bt-flutuante-transition);
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  text-decoration: none; /* Remove underline do link */
}

/* Efeito de brilho interno */
.floating-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.floating-btn:hover::before {
  opacity: 1;
}

.floating-btn:hover {
  transform: scale(1.15) translateY(-5px);
  box-shadow: var(--bt-flutuante-sombra-hover);
  border-color: rgba(255, 255, 255, 0.5);
}

.floating-btn:active {
  transform: scale(0.95) translateY(0);
}

/* Botão Voltar ao Topo */
#btn-topo {
  background: linear-gradient(
    135deg,
    var(--bt-flutuante-laranja),
    var(--bt-flutuante-laranja-escuro)
  );
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin-bottom: 5px; /* Espaço entre os botões */
}

#btn-topo.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#btn-topo i {
  animation: bounce 2s infinite;
}

/* Botão WhatsApp - MAIS PRA BAIXO e com EFEITO NEON PULSANTE */
#btn-whatsapp {
  background: linear-gradient(
    135deg,
    var(--bt-flutuante-verde),
    var(--bt-flutuante-verde-escuro)
  );
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.6);
  animation: neonPulse 2s ease-in-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

/* Efeito neon pulsante */
@keyframes neonPulse {
  0%,
  100% {
    box-shadow:
      0 0 20px rgba(37, 211, 102, 0.6),
      0 0 40px rgba(37, 211, 102, 0.3),
      0 0 60px rgba(37, 211, 102, 0.1);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 30px rgba(37, 211, 102, 0.9),
      0 0 60px rgba(37, 211, 102, 0.5),
      0 0 90px rgba(37, 211, 102, 0.2);
    transform: scale(1.05);
  }
}

/* Segundo anel de brilho para o WhatsApp */
#btn-whatsapp::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(37, 211, 102, 0.4) 0%,
    transparent 70%
  );
  z-index: -1;
  animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

#btn-whatsapp i {
  animation: whatsappPulse 1.5s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes whatsappPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Tooltip mais elegante */
.floating-btn .tooltip {
  position: absolute;
  right: 80px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(15px);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 149, 78, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  letter-spacing: 0.5px;
}

.floating-btn .tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid rgba(0, 0, 0, 0.85);
}

.floating-btn:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Tooltip específico do WhatsApp */
#btn-whatsapp .tooltip {
  background: rgba(37, 211, 102, 0.95);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#btn-whatsapp .tooltip::after {
  border-left-color: rgba(37, 211, 102, 0.95);
}

/* Tooltip específico do Topo */
#btn-topo .tooltip {
  background: rgba(255, 149, 78, 0.95);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#btn-topo .tooltip::after {
  border-left-color: rgba(255, 149, 78, 0.95);
}

/* Animações */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Responsividade para tablets */
@media (max-width: 768px) {
  .floating-buttons {
    bottom: 20px;
    right: 20px;
    gap: 12px;
  }

  .floating-btn {
    width: 58px;
    height: 58px;
    font-size: 1.8rem;
  }

  .floating-btn .tooltip {
    right: 70px;
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  #btn-whatsapp {
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
  }
}

/* Responsividade para mobile */
@media (max-width: 480px) {
  .floating-buttons {
    bottom: 15px;
    right: 15px;
    gap: 10px;
  }

  .floating-btn {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }

  .floating-btn .tooltip {
    display: none; /* Esconde tooltip no mobile */
  }

  #btn-whatsapp {
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.6);
    animation: neonPulseMobile 1.8s ease-in-out infinite;
  }

  @keyframes neonPulseMobile {
    0%,
    100% {
      box-shadow: 0 0 12px rgba(37, 211, 102, 0.6);
    }
    50% {
      box-shadow: 0 0 20px rgba(37, 211, 102, 0.9);
    }
  }
}

/* Ajuste para telas muito pequenas */
@media (max-width: 360px) {
  .floating-buttons {
    bottom: 10px;
    right: 10px;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}

/* Efeito de onda ao carregar */
@keyframes wave {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

#btn-whatsapp {
  animation:
    neonPulse 2s ease-in-out infinite,
    wave 2s ease-out infinite;
}

/* Modo escuro (se o site tiver) */
@media (prefers-color-scheme: dark) {
  .floating-btn {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }

  #btn-whatsapp {
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.7);
  }
}
