/* ============================================================
   Olsen WhatsApp Floating Button
   ============================================================ */

.olsen-fab {
  position: fixed;
  bottom: 28px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 12px;
  /* Force fixed positioning regardless of parent transforms */
  contain: layout;
  will-change: auto;
  transform: none;
  filter: none;
  perspective: none;
}

.olsen-fab--right {
  right: 28px;
  left: auto;
  flex-direction: row-reverse;
}

.olsen-fab--left {
  left: 28px;
  right: auto;
  flex-direction: row;
}

/* Botao */
.olsen-fab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: olsen-fab-pulse 2s infinite;
}

.olsen-fab-btn:hover {
  background: #1fb855;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
  animation: none;
}

.olsen-fab-btn svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Tooltip — sempre a esquerda do botao quando posicao right */
.olsen-fab-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: #ffffff;
  color: #14223c;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.olsen-fab--left .olsen-fab-tooltip {
  right: auto;
  left: 72px;
  transform: translateY(-50%) translateX(-10px);
}

.olsen-fab:hover .olsen-fab-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Pulse animation */
@keyframes olsen-fab-pulse {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4),
                0 0 0 12px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4),
                0 0 0 20px rgba(37, 211, 102, 0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .olsen-fab {
    bottom: 20px;
  }
  .olsen-fab--right {
    right: 20px;
  }
  .olsen-fab--left {
    left: 20px;
  }
  .olsen-fab-btn {
    width: 54px;
    height: 54px;
  }
  .olsen-fab-btn svg {
    width: 24px;
    height: 24px;
  }
  /* Tooltip sempre visivel no mobile por 3s depois esconde */
  .olsen-fab-tooltip {
    font-size: 0.75rem;
    padding: 8px 14px;
  }
}
