/**
 * OSFRJ - Botão Flutuante do WhatsApp
 * Plugin: OSFRJ Intervenções Fabrica de Plugins
 */

.osfrj-floating-whatsapp {
  position: fixed;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: transform 0.25s ease, bottom 0.25s ease;
}

/* Posição Inferior Direito */
.osfrj-floating-whatsapp.osfrj-wa-bottom-right {
  bottom: 28px;
  right: 28px;
  flex-direction: row;
}

/* Posição Inferior Esquerdo */
.osfrj-floating-whatsapp.osfrj-wa-bottom-left {
  bottom: 28px;
  left: 28px;
  flex-direction: row-reverse;
}

.osfrj-wa-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  outline: none;
}

/* Tooltip / Balão de Atendimento */
.osfrj-wa-tooltip {
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  line-height: 1.2;
}

.osfrj-wa-link:hover .osfrj-wa-tooltip {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Botão Circular com Ícone */
.osfrj-wa-btn {
  position: relative;
  width: 58px;
  height: 58px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 32px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.osfrj-wa-link:hover .osfrj-wa-btn {
  transform: scale(1.08);
  background-color: #20ba5a;
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
}

/* Animação de Pulso */
.osfrj-wa-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.65);
  animation: osfrjWaPulseAnim 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  pointer-events: none;
}

@keyframes osfrjWaPulseAnim {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    opacity: 0;
  }
}

/* ==========================================================
   RESPONSIVIDADE MOBILE (Evita sobrepor barra fixa inferior)
========================================================== */
@media (max-width: 991px) {
  .osfrj-floating-whatsapp.osfrj-wa-bottom-right {
    bottom: 84px;
    right: 20px;
  }

  .osfrj-floating-whatsapp.osfrj-wa-bottom-left {
    bottom: 84px;
    left: 20px;
  }

  .osfrj-wa-tooltip {
    display: none; /* Em mobile exibe somente o ícone para economizar espaço */
  }

  .osfrj-wa-btn {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }
}

