/* Floating WhatsApp — botón verde fijo */
.whatsapp-float {
  position: fixed;
  width: 56px;
  height: 56px;
  bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.75rem + env(safe-area-inset-right, 0px));
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: whatsapp-pulse 2.4s ease-in-out infinite;
}

body:has(.fc-cookie-bar) .whatsapp-float {
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
  display: block;
  flex-shrink: 0;
}

@keyframes whatsapp-pulse {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  }
  50% {
    box-shadow: 0 4px 28px rgba(37, 211, 102, 0.75);
  }
}

.whatsapp-float:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1c1c1e;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.whatsapp-float:hover .whatsapp-tooltip,
.whatsapp-float:focus-visible .whatsapp-tooltip {
  opacity: 1;
}

@media (max-width: 576px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    right: calc(1.25rem + env(safe-area-inset-right, 0px));
  }

  body:has(.fc-cookie-bar) .whatsapp-float {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .whatsapp-tooltip {
    display: none;
  }
}

/* Tema oscuro: hereda estilos base (no sobrescribir fondo) */
.fc-theme .whatsapp-float {
  color: #fff;
}

.fc-theme #back-to-top {
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.75rem + env(safe-area-inset-right, 0px));
}

body:has(.fc-cookie-bar) .fc-theme #back-to-top {
  bottom: calc(9rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 576px) {
  .fc-theme #back-to-top {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    right: calc(5.5rem + env(safe-area-inset-right, 0px));
  }

  body:has(.fc-cookie-bar) .fc-theme #back-to-top {
    bottom: calc(8.25rem + env(safe-area-inset-bottom, 0px));
  }
}
