/* wsapp.css - Estilos aislados para el botón flotante radial de WhatsApp */

.wsapp-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Poppins', sans-serif;
}

.wsapp-main {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background-color: #d32593;
  /* WhatsApp Green */
  color: white;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), background-color 0.3s ease, border-color 0.3s ease;
  outline: none;
  overflow: visible;
  padding: 0;
}

.wsapp-main img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wsapp-container.wsapp-active .wsapp-main {
  transform: rotate(90deg);
  background: linear-gradient(90deg, #ff7a18, #ec4899);
}

.wsapp-icon-open,
.wsapp-icon-close,
.wsapp-main img {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.wsapp-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
  font-size: 26px;
  color: white;
  z-index: 3;
}

.wsapp-container.wsapp-active .wsapp-main img {
  opacity: 0;
  transform: scale(0.5);
}

.wsapp-container.wsapp-active .wsapp-icon-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.wsapp-items {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 60px;
  z-index: 1;
}

.wsapp-item {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: white;
  color: #1f2933;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  opacity: 0;
  top: 5px;
  left: 5px;
  transform: translate(0, 0) scale(0.5);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, background-color 0.2s ease, color 0.2s ease;
  pointer-events: none;
}

.wsapp-item:hover {
  background: linear-gradient(90deg, #ff7a18, #ec4899);
  color: white;
  z-index: 10;
}

.wsapp-tooltip {
  position: absolute;
  right: 65px;
  background-color: rgba(31, 41, 51, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(10px);
}

.wsapp-item:hover .wsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.wsapp-main::after {
  content: "Te ayudo";
  position: absolute;
  right: 75px;
  background-color: rgba(31, 41, 51, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(10px);
}

.wsapp-container:not(.wsapp-active) .wsapp-main:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.wsapp-container.wsapp-active .wsapp-main::after {
  display: none;
}

/* Specific item positions when active - Radial Expansion */
/* Radius = ~85px */
.wsapp-container.wsapp-active .wsapp-item-1 {
  /* Arriba (90 grados desde horizontal izquierda) */
  transform: translate(0, -90px) scale(1);
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.1s;
}

.wsapp-container.wsapp-active .wsapp-item-2 {
  /* Diagonal arriba-izquierda (45 grados) */
  transform: translate(-70px, -70px) scale(1);
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.05s;
}

.wsapp-container.wsapp-active .wsapp-item-3 {
  /* Izquierda (0 grados) */
  transform: translate(-90px, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

/* Hover effects when active maintaining their translation */
.wsapp-container.wsapp-active .wsapp-item-1:hover {
  transform: translate(0, -90px) scale(1.1);
}

.wsapp-container.wsapp-active .wsapp-item-2:hover {
  transform: translate(-70px, -70px) scale(1.1);
}

.wsapp-container.wsapp-active .wsapp-item-3:hover {
  transform: translate(-90px, 0) scale(1.1);
}

/* Animación de cierre invertida (delays) */
.wsapp-container:not(.wsapp-active) .wsapp-item-1 {
  transition-delay: 0s;
}

.wsapp-container:not(.wsapp-active) .wsapp-item-2 {
  transition-delay: 0.05s;
}

.wsapp-container:not(.wsapp-active) .wsapp-item-3 {
  transition-delay: 0.1s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wsapp-container {
    bottom: 20px;
    right: 20px;
  }
}