/**
 * WhatsApp Float Button
 * Professional floating button for WhatsApp contact
 */

.whatsapp-float {
  position: fixed;
  width: 56px;
  height: 56px;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RTL Support - position on left for Arabic */
[dir="rtl"] .whatsapp-float {
  right: auto;
  left: 24px;
}

.whatsapp-icon {
  width: 26px;
  height: 26px;
  transition: transform 0.3s ease;
}

.whatsapp-icon path {
  fill: #ffffff;
}

/* Tooltip */
.whatsapp-float::before {
  content: attr(title);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a1a2e;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.whatsapp-float::after {
  content: '';
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #1a1a2e;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* RTL Tooltip positioning */
[dir="rtl"] .whatsapp-float::before {
  right: auto;
  left: calc(100% + 12px);
}

[dir="rtl"] .whatsapp-float::after {
  right: auto;
  left: calc(100% + 4px);
  border-left-color: transparent;
  border-right-color: #1a1a2e;
}

/* Show tooltip on hover */
.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Hover effects */
.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:hover .whatsapp-icon {
  transform: scale(1.1);
}

.whatsapp-float:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* Subtle pulse animation */
@keyframes whatsapp-pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1);
  }
}

.whatsapp-float.pulse {
  animation: whatsapp-pulse 2.5s infinite;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 20px;
  }
  
  [dir="rtl"] .whatsapp-float {
    right: auto;
    left: 20px;
  }
  
  .whatsapp-icon {
    width: 24px;
    height: 24px;
  }
  
  /* Hide tooltip on mobile - use native title */
  .whatsapp-float::before,
  .whatsapp-float::after {
    display: none;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .whatsapp-float {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
  }
  
  [dir="rtl"] .whatsapp-float {
    right: auto;
    left: 16px;
  }
  
  .whatsapp-icon {
    width: 22px;
    height: 22px;
  }
}



