/* ===== FLOATING WHATSAPP BUTTON ===== */

/* ===== WRAPPER POSITIONS ===== */

.fwb-wrap {
	position: fixed;
	z-index: 9999;
}

.fwb-bottom-right {
	bottom: 24px;
	right: 24px;
}

.fwb-bottom-left {
	bottom: 24px;
	left: 24px;
}

.fwb-top-right {
	top: 24px;
	right: 24px;
}

.fwb-top-left {
	top: 24px;
	left: 24px;
}

/* ===== BUTTON ===== */

.fwb-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--fwb-size, 60px);
	height: var(--fwb-size, 60px);
	border-radius: 50%;
	background-color: var(--fwb-color, #25D366);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	cursor: pointer;
}

.fwb-button:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
	color: #fff;
	text-decoration: none;
}

.fwb-button:focus {
	outline: 2px solid var(--fwb-color, #25D366);
	outline-offset: 3px;
}

/* ===== ICON ===== */

.fwb-icon {
	width: 55%;
	height: 55%;
	flex-shrink: 0;
}

/* ===== TOOLTIP ===== */

.fwb-tooltip {
	position: absolute;
	white-space: nowrap;
	background: #333;
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	padding: 6px 12px;
	border-radius: 6px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fwb-tooltip::after {
	content: '';
	position: absolute;
	border: 6px solid transparent;
}

.fwb-button:hover .fwb-tooltip {
	opacity: 1;
}

/* Tooltip positions based on button position */

/* Right-side buttons → tooltip appears on the left */
.fwb-bottom-right .fwb-tooltip,
.fwb-top-right .fwb-tooltip {
	right: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
}

.fwb-bottom-right .fwb-tooltip::after,
.fwb-top-right .fwb-tooltip::after {
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	border-left-color: #333;
}

/* Left-side buttons → tooltip appears on the right */
.fwb-bottom-left .fwb-tooltip,
.fwb-top-left .fwb-tooltip {
	left: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
}

.fwb-bottom-left .fwb-tooltip::after,
.fwb-top-left .fwb-tooltip::after {
	right: 100%;
	top: 50%;
	transform: translateY(-50%);
	border-right-color: #333;
}

/* ===== PULSE ANIMATION ===== */

.fwb-animated .fwb-button::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: var(--fwb-color, #25D366);
	z-index: -1;
	animation: fwb-pulse 2s ease-out infinite;
}

@keyframes fwb-pulse {
	0% {
		transform: scale(1);
		opacity: 0.6;
	}
	100% {
		transform: scale(1.5);
		opacity: 0;
	}
}

/* ===== MOBILE ONLY ===== */

.fwb-mobile-only {
	display: none;
}

@media (max-width: 768px) {
	.fwb-mobile-only {
		display: block;
	}
}

/* ===== RESPONSIVE ===== */

@media (max-width: 480px) {
	.fwb-bottom-right {
		bottom: 16px;
		right: 16px;
	}

	.fwb-bottom-left {
		bottom: 16px;
		left: 16px;
	}

	.fwb-top-right {
		top: 16px;
		right: 16px;
	}

	.fwb-top-left {
		top: 16px;
		left: 16px;
	}
}

/* ===== ADMIN BAR COMPAT ===== */

.admin-bar .fwb-top-right,
.admin-bar .fwb-top-left {
	top: 56px; /* 24px offset + 32px admin bar */
}

@media (max-width: 782px) {
	.admin-bar .fwb-top-right,
	.admin-bar .fwb-top-left {
		top: 62px; /* 16px offset + 46px mobile admin bar */
	}
}
