/**
 * WhatsApp Floating Button - Modern & Minimalist
 * Beautiful floating button for direct WhatsApp contact
 */

/* === Floating Button Container === */
.whatsapp-float {
	position: fixed;
    bottom: 80px;
    left: 10px;
	z-index: 9999;
	transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* === Button Style === */
.whatsapp-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	background: #25D366;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
	text-decoration: none;
	border: none;
	outline: none;
}

/* === Hover Effect === */
.whatsapp-button:hover {
	background: #128C7E;
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* === Active/Click Effect === */
.whatsapp-button:active {
	transform: scale(0.95);
}

/* === WhatsApp Icon (SVG) === */
.whatsapp-button svg {
	width: 32px;
	height: 32px;
	fill: white;
	transition: transform 0.3s ease;
}

.whatsapp-button:hover svg {
	transform: rotate(15deg);
}

/* === Pulse Animation (Subtle) === */
@keyframes whatsapp-pulse {
	0% {
		box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
	}
	50% {
		box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1);
	}
	100% {
		box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
	}
}

.whatsapp-button {
	animation: whatsapp-pulse 3s ease-in-out infinite;
}

/* Stop animation on hover */
.whatsapp-button:hover {
	animation: none;
}

/* === Tooltip (Optional Enhancement) === */
.whatsapp-float::before {
	content: "צור קשר בוואטסאפ";
	position: absolute;
	bottom: 50%;
	right: calc(100% + 12px);
	transform: translateY(50%);
	background: #2c3e2f;
	color: white;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 14px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	direction: rtl;
}

/* Tooltip arrow */
.whatsapp-float::after {
	content: "";
	position: absolute;
	bottom: 50%;
	right: calc(100% + 4px);
	transform: translateY(50%);
	border: 6px solid transparent;
	border-right-color: #2c3e2f;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	pointer-events: none;
}

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

/* === Mobile Responsive === */
@media (max-width: 768px) {
	.whatsapp-float {
		bottom: 16px;
		left: 16px;
	}

	.whatsapp-button {
		width: 50px;
		height: 50px;
	}

	.whatsapp-button svg {
		width: 26px;
		height: 26px;
	}

	/* Hide tooltip on mobile (no hover) */
	.whatsapp-float::before,
	.whatsapp-float::after {
		display: none;
	}
}

/* === Accessibility === */
.whatsapp-button:focus {
	outline: 3px solid #25D366;
	outline-offset: 4px;
}

.whatsapp-button:focus:not(:focus-visible) {
	outline: none;
}

/* === Hide on specific pages === */
/* This will be handled by JavaScript for better control */
body.woocommerce-checkout .whatsapp-float,
body.woocommerce-cart .whatsapp-float {
	display: none;
}

/* === Smooth entrance animation === */
.whatsapp-float {
	animation: whatsapp-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes whatsapp-enter {
	0% {
		opacity: 0;
		transform: scale(0) translateY(20px);
	}
	100% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}
