:root {
  --wa-primary: #25D366;
  --wa-hover: #128C7E;
  --wa-dark: #075E54;
  --wa-light: #DCF8C6;
  --wa-accent: #34B7F1;
  --wa-shadow: rgba(0, 0, 0, 0.15);
  --wa-pulse: rgba(37, 211, 102, 0.5);
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  
  --transition-speed: 0.3s;
  --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-sm: 0.85rem;
  --text-md: 1rem;
  --text-lg: 1.2rem;
  
  --blur: blur(4px);
  --drop-shadow: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.a-Wa-S1 {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 9999;
  
  display: grid;
  place-items: center;
  width: 3.8rem;
  height: 3.8rem;
  padding: var(--space-xs);
  
  background: linear-gradient(135deg, var(--wa-primary), var(--wa-hover));
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 4px 12px var(--wa-shadow),
    0 2px 4px rgba(0,0,0,0.1) inset;
  animation: pulse 2s infinite alternate;
  
  font-family: var(--font-family);
  font-weight: 600;
  text-decoration: none;
  
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  filter: var(--drop-shadow);
  transform: translateZ(0);
  will-change: transform, box-shadow, filter;
  
  transition: all 0.4s var(--bounce);
  animation: float 3s ease-in-out infinite;
  
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.Wa-S1 {
  font-size: 1.8rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

@media (hover: hover) {
  .a-Wa-S1:hover {
    transform: translateY(-0.5rem) scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #2be46b, #1a9b4b);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 
      0 0 15px rgba(37, 211, 102, 0.4),
      0 8px 24px rgba(0,0,0,0.2),
      0 4px 8px rgba(0,0,0,0.1) inset;
    filter: var(--drop-shadow) brightness(1.1);
    animation: none;
  }
  
  .a-Wa-S1:hover .Wa-S1 {
    transform: scale(1.2) rotate(-5deg);
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.15));
  }
}

.a-Wa-S1:active {
  transform: scale(0.95) !important;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 
    0 0 0 3px rgba(255, 255, 255, 0.5),
    0 4px 12px rgba(0,0,0,0.1) inset !important;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5rem); }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 4px 12px var(--wa-shadow);
    border-color: rgba(255, 255, 255, 0.3);
  }
  100% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0),
                0 0 0 1px rgba(255, 255, 255, 0.2),
                0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
  }
}

.a-Wa-S1::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.a-Wa-S1:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0.3;
  }
}

.a-Wa-S1::before {
  content: '¡Háblanos por WhatsApp!';
  position: absolute;
  right: calc(100% + 0.8rem);
  background: var(--wa-dark);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 0.6rem;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-0.5rem);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: -1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.a-Wa-S1:hover::before {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
}

body.dark .a-Wa-S1 {
  background: linear-gradient(135deg, var(--wa-dark), #0c4a42);
  box-shadow: 
    0 4px 12px rgba(0,0,0,0.25),
    0 2px 4px rgba(0,0,0,0.2) inset;
}

body.dark .a-Wa-S1:hover {
  background: linear-gradient(135deg, #0e6e63, #0a5049);
  filter: var(--drop-shadow) brightness(1.1);
}

@media (min-width: 768px) {
  .a-Wa-S1 {
    width: 4.5rem;
    height: 4.5rem;
    bottom: var(--space-lg);
    right: var(--space-lg);
  }
  
  .Wa-S1 {
    font-size: 2.2rem;
  }
  
  .a-Wa-S1::before {
    font-size: var(--text-md);
    padding: 0.6rem 1rem;
  }
}

@media (min-width: 1200px) {
  .a-Wa-S1 {
    width: 5rem;
    height: 5rem;
  }
  
  .Wa-S1 {
    font-size: 2.4rem;
  }
}

.a-Wa-S1:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 183, 241, 0.5);
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .a-Wa-S1 {
    animation: none;
    transition: none;
  }
  
  .a-Wa-S1:active {
    transform: none;
  }
  
  .a-Wa-S1::before,
  .a-Wa-S1::after {
    display: none;
  }
}


.a-Wa-S1 {
  animation: popIn 0.6s var(--bounce) both;
  animation-delay: 0.3s;
}