/* ==========================
   Optimify Connect
   Botón WhatsApp
========================== */

.oc-whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  box-sizing: border-box;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;

  background: #25D366;
  color: #ffffff;
  border-radius: 999px;
  border: none;

  font-family: inherit;
  font-weight: 700;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;

  opacity: 0;
  transform: translateY(8px);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.oc-whatsapp-button.ready {
  opacity: 1;
  transform: translateY(0);
}

.oc-whatsapp-button:hover,
.oc-whatsapp-button:focus {
  background: #1ebe5d;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.oc-whatsapp-button:focus {
  outline: 2px solid rgba(37, 211, 102, 0.35);
  outline-offset: 4px;
}

.oc-whatsapp-button,
.oc-whatsapp-button:visited,
.oc-whatsapp-button:active {
  color: #ffffff;
}

.oc-whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.oc-whatsapp-icon svg {
  display: block;
  fill: currentColor;
  margin: 0;
  padding: 0;
}

.oc-whatsapp-text {
  display: inline-block;
}

/* ==========================
   Botón sticky inferior derecho
========================== */

.oc-whatsapp-sticky {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
}

/* ==========================
   Botón por shortcode
========================== */

.oc-whatsapp-shortcode {
  position: relative;
}

/* ==========================
   Responsive
========================== */

@media (max-width: 767px) {
  .oc-whatsapp-sticky {
    right: 16px;
    bottom: 16px;
  }

  .oc-whatsapp-button {
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .oc-whatsapp-sticky {
    right: 12px;
    bottom: 12px;
  }

  .oc-whatsapp-text {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ==========================
   Evitar conflictos con temas
========================== */

.oc-whatsapp-button * {
  box-sizing: border-box;
}

.oc-whatsapp-button:hover .oc-whatsapp-text,
.oc-whatsapp-button:focus .oc-whatsapp-text {
  color: inherit;
}

/* ==========================
   Animaciones configurables
========================== */

/* Ninguna */
.oc-animation-none,
.oc-animation-none.ready {
  animation: none !important;
}

/* Pulse + Float suave */
.oc-animation-pulse_float.ready {
  animation: ocPulseFloat 1.85s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform, box-shadow;
}

@keyframes ocPulseFloat {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  }

  35% {
    transform: translateY(-5px) scale(1.055);
    box-shadow:
      0 0 0 5px rgba(37, 211, 102, 0.12),
      0 14px 34px rgba(37, 211, 102, 0.38);
  }

  65% {
    transform: translateY(-2px) scale(1.025);
    box-shadow:
      0 0 0 2px rgba(37, 211, 102, 0.08),
      0 11px 28px rgba(37, 211, 102, 0.26);
  }

  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  }
}

/* Scale on hover + Glow */
.oc-animation-hover_glow.ready:hover,
.oc-animation-hover_glow.ready:focus {
  transform: translateY(-3px) scale(1.075);
  box-shadow:
    0 0 0 7px rgba(37, 211, 102, 0.18),
    0 14px 34px rgba(37, 211, 102, 0.38);
}

/* Fade in + Breathing */
.oc-animation-fade_breathing.ready {
  animation: ocBreathing 2.4s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes ocBreathing {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.055);
  }

  100% {
    opacity: 0.9;
    transform: scale(1);
  }
}

/* Wobble */
.oc-animation-wobble.ready {
  animation: ocWobble 1.55s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform;
}

@keyframes ocWobble {
  0% {
    transform: translateX(0) rotate(0deg);
  }

  12% {
    transform: translateX(-5px) rotate(-2.5deg);
  }

  24% {
    transform: translateX(5px) rotate(2.5deg);
  }

  36% {
    transform: translateX(-4px) rotate(-1.8deg);
  }

  48% {
    transform: translateX(4px) rotate(1.8deg);
  }

  60% {
    transform: translateX(-2px) rotate(-1deg);
  }

  72% {
    transform: translateX(2px) rotate(1deg);
  }

  100% {
    transform: translateX(0) rotate(0deg);
  }
}