/**
 * Floating WhatsApp — bottom-left; Blocksy back-to-top stays bottom-right.
 */

.regal-whatsapp-float {
	--regal-wa-green: #1a6b52;
	--regal-wa-green-soft: rgba(26, 107, 82, 0.92);
	position: fixed;
	z-index: 99990;
	left: max(1rem, env(safe-area-inset-left, 0px));
	bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 0.85rem 0.65rem 0.7rem;
	border-radius: 999px;
	background: var(--regal-wa-green-soft);
	color: #faf7f2;
	text-decoration: none;
	box-shadow: 0 8px 28px rgba(26, 24, 22, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.regal-whatsapp-float:hover,
.regal-whatsapp-float:focus-visible {
	background: var(--regal-wa-green);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(26, 24, 22, 0.18);
}

.regal-whatsapp-float:focus-visible {
	outline: 2px solid #a8946c;
	outline-offset: 3px;
}

.regal-whatsapp-float__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	flex-shrink: 0;
}

.regal-whatsapp-float__icon svg {
	display: block;
	width: 1.35rem;
	height: 1.35rem;
}

.regal-whatsapp-float__text {
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1;
}

/* Mobile: above sticky bottom nav (56px + safe area) */
@media (max-width: 767px) {
	.regal-whatsapp-float,
	.whatsapp-float,
	.wp-whatsapp-button,
	.whatsapp-chat-button,
	.concierge-button,
	a[href*="wa.me"],
	a[href*="whatsapp.com"] {
		left: 16px !important;
		bottom: 85px !important;
		z-index: 9998 !important;
	}

	.regal-whatsapp-float {
		padding: 0.6rem;
		border-radius: 50%;
		width: 3.25rem;
		height: 3.25rem;
		justify-content: center;
	}

	.regal-whatsapp-float__text {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	body.admin-bar .regal-whatsapp-float {
		bottom: 85px !important;
	}
}

/* Tablet: keep above thumb zone; back-to-top is on the right */
@media (min-width: 768px) and (max-width: 782px) {
	.regal-whatsapp-float {
		left: max(0.85rem, env(safe-area-inset-left, 0px));
		bottom: max(1rem, env(safe-area-inset-bottom, 0px));
		padding: 0.6rem;
		border-radius: 50%;
		width: 3.25rem;
		height: 3.25rem;
		justify-content: center;
	}

	.regal-whatsapp-float__text {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

/* Admin bar offset (desktop) */
body.admin-bar .regal-whatsapp-float {
	bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
}

/* Blocksy scroll-to-top: keep right; avoid overlap with our left anchor */
.ct-back-to-top[data-alignment="right"],
.ct-back-to-top[data-alignment="left"] {
	/* Blocksy controls horizontal side via data-alignment */
}
