/* 
 * Contact Buttons Styles
 * Apple/Tesla-inspired styling for contact buttons with micro-interactions
 * Enhanced for cross-device compatibility
 */

/* Pending URL animation */
.contact-btn.pending-url {
  animation: pulse 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  position: relative;
  overflow: hidden;
}

.contact-btn.pending-url::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  animation: ripple 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  pointer-events: none;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 8px rgba(0, 37, 84, 0.1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 37, 84, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 8px rgba(0, 37, 84, 0.1);
  }
}

@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* Enhanced button effects */
.contact-btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.3s ease;
  will-change: transform, box-shadow;
  transform: translateZ(0);
  position: relative;
  z-index: 5; /* Ensure buttons are always above other elements */
  pointer-events: auto !important; /* Always enable clicks */
  cursor: pointer; /* Always show pointer cursor */
}

/* Touch hover state */
.contact-btn.hover-state,
.contact-btn:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 16px rgba(0, 37, 84, 0.15);
}

/* Premium focus effect */
.contact-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 8px 16px rgba(0, 37, 84, 0.2);
}

/* Accessibility: focus visible */
.contact-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

/* Better active state */
.contact-btn:active {
  transform: scale(0.97) translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 37, 84, 0.1);
  transition-duration: 0.1s;
}

/* Touch-specific styles */
.touch-device .contact-btn {
  -webkit-tap-highlight-color: rgba(0,0,0,0); /* Remove default tap highlight */
}

/* Fix for any parent elements that might block clicks */
.contact-primary,
.secondary-action {
  position: relative;
  z-index: 5;
}

/* Submit ripple effect for feedback on both touch and mouse */
.submit-ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
  width: 100px;
  height: 100px;
  animation: submit-ripple 0.8s ease-out;
}

@keyframes submit-ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}
