/**
 * RZ Floating Contact
 * Frontend styles are scoped under .rcw to avoid theme conflicts.
 */

.rcw,
.rcw *,
.rcw *::before,
.rcw *::after {
	box-sizing: border-box !important;
	-webkit-tap-highlight-color: transparent;
}

.rcw {
	--rzfc-offset-x: 20px;
	--rzfc-offset-y: 100px;
	--rzfc-mobile-offset-x: 14px;
	--rzfc-mobile-offset-y: 120px;
	--rzfc-label-bg: #ffffff;
	--rzfc-label-color: #1a1a2e;
	--rzfc-whatsapp-bg: #25d366;
	--rzfc-whatsapp-color: #ffffff;
	--rzfc-whatsapp-hover-bg: #20bf5a;
	--rzfc-whatsapp-hover-color: #ffffff;
	--rzfc-phone-bg: #5c35b4;
	--rzfc-phone-color: #ffffff;
	--rzfc-phone-hover-bg: #5030a8;
	--rzfc-phone-hover-color: #ffffff;
	--rzfc-messenger-bg: #0084ff;
	--rzfc-messenger-color: #ffffff;
	--rzfc-messenger-hover-bg: #0076e8;
	--rzfc-messenger-hover-color: #ffffff;
	--rzfc-toggle-gradient-start: #25d366;
	--rzfc-toggle-gradient-end: #128c7e;
	--rzfc-toggle-icon-color: #ffffff;
	--rzfc-toggle-active-start: #128c7e;
	--rzfc-toggle-active-end: #0f6f64;
	--rzfc-toggle-active-icon-color: #ffffff;

	position: fixed !important;
	right: var(--rzfc-offset-x);
	bottom: var(--rzfc-offset-y);
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	pointer-events: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rcw > * {
	pointer-events: auto;
}

.rcw__menu {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	visibility: hidden;
}

.rcw__menu.is-open {
	visibility: visible;
}

.rcw__label {
	background: var(--rzfc-label-bg) !important;
	color: var(--rzfc-label-color) !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	padding: 10px 18px;
	border-radius: 999px !important;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
	white-space: nowrap;
	font-family: inherit;
	border: none;
	opacity: 0;
	transform: translateY(8px) scale(0.95);
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.rcw__item {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	padding: 11px 20px 11px 14px;
	border-radius: 999px !important;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	border: none;
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.14),
		0 1px 3px rgba(0, 0, 0, 0.08);
	white-space: nowrap;
	font-family: inherit;
	cursor: pointer;
	opacity: 0;
	transform: translateY(10px) scale(0.95);
	transition:
		opacity 0.28s ease,
		transform 0.28s ease,
		background-color 0.22s ease,
		color 0.22s ease,
		box-shadow 0.22s ease;
}

.rcw__item:hover,
.rcw__item:focus-visible {
	text-decoration: none !important;
	transform: translateY(-2px) scale(1.02);
	box-shadow:
		0 8px 24px rgba(0, 0, 0, 0.20),
		0 2px 6px rgba(0, 0, 0, 0.10);
}

.rcw__item:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 2px;
}

.rcw__item svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	display: block;
}

.rcw__item--wa,
.rcw__item--wa:visited {
	background: var(--rzfc-whatsapp-bg) !important;
	color: var(--rzfc-whatsapp-color) !important;
}

.rcw__item--wa:hover,
.rcw__item--wa:focus-visible {
	background: var(--rzfc-whatsapp-hover-bg) !important;
	color: var(--rzfc-whatsapp-hover-color) !important;
}

.rcw__item--ph,
.rcw__item--ph:visited {
	background: var(--rzfc-phone-bg) !important;
	color: var(--rzfc-phone-color) !important;
}

.rcw__item--ph:hover,
.rcw__item--ph:focus-visible {
	background: var(--rzfc-phone-hover-bg) !important;
	color: var(--rzfc-phone-hover-color) !important;
}

.rcw__item--ms,
.rcw__item--ms:visited {
	background: var(--rzfc-messenger-bg) !important;
	color: var(--rzfc-messenger-color) !important;
}

.rcw__item--ms:hover,
.rcw__item--ms:focus-visible {
	background: var(--rzfc-messenger-hover-bg) !important;
	color: var(--rzfc-messenger-hover-color) !important;
}

.rcw__menu.is-open .rcw__label {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: 0.04s;
}

.rcw__menu.is-open .rcw__item {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: 0.09s;
}

.rcw__menu.is-open .rcw__item:nth-child(2) {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: 0.09s;
}

.rcw__menu.is-open .rcw__item:nth-child(3) {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: 0.14s;
}

.rcw__menu.is-open .rcw__item:nth-child(4) {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: 0.19s;
}

.rcw__toggle {
	appearance: none !important;
	-webkit-appearance: none !important;
	position: relative;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 58px !important;
	height: 58px !important;
	min-width: 58px;
	min-height: 58px;
	aspect-ratio: 1 / 1;
	border-radius: 50% !important;
	background-color: transparent;
	background-image: linear-gradient(135deg, var(--rzfc-toggle-gradient-start), var(--rzfc-toggle-gradient-end)) !important;
	border: none !important;
	outline: none;
	margin: 0;
	padding: 0 !important;
	cursor: pointer;
	color: var(--rzfc-toggle-icon-color) !important;
	flex-shrink: 0;
	line-height: 1;
	box-shadow:
		0 6px 20px rgba(18, 140, 126, 0.45),
		0 2px 6px rgba(0, 0, 0, 0.12);
	transition:
		transform 0.28s ease,
		box-shadow 0.28s ease;
}

.rcw__toggle:hover,
.rcw__toggle:focus-visible {
	transform: scale(1.08);
	box-shadow:
		0 10px 28px rgba(18, 140, 126, 0.50),
		0 3px 8px rgba(0, 0, 0, 0.14);
}

.rcw__toggle.is-open,
.rcw__toggle:active {
	background-image: linear-gradient(135deg, var(--rzfc-toggle-active-start), var(--rzfc-toggle-active-end)) !important;
	color: var(--rzfc-toggle-active-icon-color) !important;
}

.rcw__toggle:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 3px;
}

.rcw__toggle .rcw-ico-chat,
.rcw__toggle .rcw-ico-close {
	width: 24px;
	height: 24px;
	fill: currentColor !important;
	position: absolute;
	display: block;
	transition:
		opacity 0.22s ease,
		transform 0.30s ease;
}

.rcw__toggle .rcw-ico-chat path,
.rcw__toggle .rcw-ico-close path {
	fill: currentColor !important;
}

.rcw__toggle .rcw-ico-chat {
	opacity: 1;
	transform: rotate(0deg);
}

.rcw__toggle .rcw-ico-close {
	opacity: 0;
	transform: rotate(-90deg);
}

.rcw__toggle.is-open .rcw-ico-chat {
	opacity: 0;
	transform: rotate(90deg);
}

.rcw__toggle.is-open .rcw-ico-close {
	opacity: 1;
	transform: rotate(0deg);
}

@media (max-width: 768px) {
	.rcw {
		right: var(--rzfc-mobile-offset-x);
		bottom: var(--rzfc-mobile-offset-y);
		gap: 8px;
	}

	.rcw__toggle {
		width: 50px !important;
		height: 50px !important;
		min-width: 50px;
		min-height: 50px;
	}

	.rcw__toggle .rcw-ico-chat,
	.rcw__toggle .rcw-ico-close {
		width: 20px;
		height: 20px;
	}

	.rcw__item {
		font-size: 13px;
		padding: 9px 16px 9px 11px;
	}

	.rcw__item svg {
		width: 20px;
		height: 20px;
	}

	.rcw__label {
		font-size: 13px;
		padding: 9px 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rcw,
	.rcw * {
		transition: none !important;
		animation: none !important;
	}
}
