.pcfb {
	--pcfb-channel-size: 44px;
	--pcfb-main-size: 56px;
	--pcfb-radius: 16px;
	--pcfb-shadow: 0 6px 16px rgba(15, 23, 42, 0.12), 0 12px 32px rgba(15, 23, 42, 0.14);
	--pcfb-shadow-hover: 0 10px 24px rgba(15, 23, 42, 0.16), 0 18px 44px rgba(15, 23, 42, 0.2);
	box-sizing: border-box;
	font-family: inherit;
}

.pcfb *,
.pcfb *::before,
.pcfb *::after {
	box-sizing: inherit;
}

.pcfb svg {
	display: block;
	fill: currentColor;
	height: 20px;
	width: 20px;
}

.pcfb-floating {
	bottom: 24px;
	position: fixed;
	z-index: 99999;
}

.pcfb-position-right {
	right: 24px;
}

.pcfb-position-left {
	left: 24px;
}

.pcfb-main-button,
.pcfb-channel {
	align-items: center;
	border: 0;
	border-radius: 999px;
	box-shadow: var(--pcfb-shadow);
	cursor: pointer;
	display: inline-flex;
	justify-content: center;
	text-decoration: none;
	transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.pcfb-main-button {
	background: var(--pcfb-primary-color);
	color: var(--pcfb-icon-color);
	gap: 8px;
	height: var(--pcfb-main-size);
	min-width: var(--pcfb-main-size);
	padding: 0 20px;
}

.pcfb-main-button:hover,
.pcfb-main-button:focus-visible {
	background: var(--pcfb-hover-color);
	box-shadow: var(--pcfb-shadow-hover);
	color: var(--pcfb-icon-color);
	transform: translateY(-3px);
}

.pcfb-main-button:active {
	transform: translateY(-1px) scale(0.97);
}

/* Soft attention pulse on the floating trigger. */
.pcfb-floating .pcfb-main-button::after {
	border-radius: inherit;
	box-shadow: 0 0 0 0 var(--pcfb-primary-color);
	content: "";
	inset: 0;
	opacity: 0.55;
	pointer-events: none;
	position: absolute;
	animation: pcfb-pulse 2.4s ease-out infinite;
}

.pcfb-floating .pcfb-main-button {
	position: relative;
}

.pcfb.is-open .pcfb-main-button::after,
.pcfb.is-chat-open .pcfb-main-button::after,
.pcfb-main-button:hover::after {
	animation: none;
	opacity: 0;
}

@keyframes pcfb-pulse {
	0% {
		box-shadow: 0 0 0 0 var(--pcfb-primary-color);
		opacity: 0.5;
	}
	70% {
		box-shadow: 0 0 0 14px transparent;
		opacity: 0;
	}
	100% {
		box-shadow: 0 0 0 0 transparent;
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pcfb-floating .pcfb-main-button::after {
		animation: none;
	}

	.pcfb-main-button,
	.pcfb-channel,
	.pcfb-menu,
	.pcfb-chat,
	.pcfb-chat-send {
		transition: none;
	}
}

.pcfb-direct-button {
	padding: 0;
	width: var(--pcfb-main-size);
}

.pcfb-single-channel .pcfb-direct-button.pcfb-channel-whatsapp {
	background: #25d366;
}

.pcfb-single-channel .pcfb-direct-button.pcfb-channel-whatsapp:hover,
.pcfb-single-channel .pcfb-direct-button.pcfb-channel-whatsapp:focus-visible {
	background: #1ebe5a;
}

.pcfb-single-channel .pcfb-direct-button.pcfb-channel-phone {
	background: #0ea5e9;
}

.pcfb-single-channel .pcfb-direct-button.pcfb-channel-phone:hover,
.pcfb-single-channel .pcfb-direct-button.pcfb-channel-phone:focus-visible {
	background: #0284c7;
}

.pcfb-single-channel .pcfb-direct-button.pcfb-channel-email {
	background: #374151;
}

.pcfb-single-channel .pcfb-direct-button.pcfb-channel-email:hover,
.pcfb-single-channel .pcfb-direct-button.pcfb-channel-email:focus-visible {
	background: #1f2937;
}

.pcfb-main-button:focus-visible,
.pcfb-channel:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.28);
	outline-offset: 3px;
}

.pcfb-main-text {
	color: currentColor;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	max-width: 130px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pcfb-menu {
	display: flex;
	gap: 12px;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	transform: translateY(8px) scale(0.96);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.pcfb-chat {
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.06);
	border-radius: var(--pcfb-radius);
	bottom: calc(var(--pcfb-main-size) + 16px);
	box-shadow: 0 16px 50px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.1);
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	transform: translateY(12px) scale(0.97);
	transform-origin: bottom right;
	transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
	width: 320px;
}

.pcfb-position-right .pcfb-chat {
	right: 0;
}

.pcfb-position-left .pcfb-chat {
	left: 0;
	transform-origin: bottom left;
}

.pcfb.is-chat-open .pcfb-chat {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.pcfb-chat-header {
	align-items: center;
	background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
	color: #fff;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 14px 16px;
}

.pcfb-chat-brand {
	align-items: center;
	display: inline-flex;
	gap: 11px;
	min-width: 0;
}

.pcfb-chat-avatar {
	align-items: center;
	background: rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	flex: none;
	height: 40px;
	justify-content: center;
	position: relative;
	width: 40px;
}

.pcfb-chat-avatar svg {
	height: 22px;
	width: 22px;
}

.pcfb-chat-avatar::after {
	background: #4ade80;
	border: 2px solid #0c7c6f;
	border-radius: 50%;
	bottom: 1px;
	content: "";
	height: 10px;
	position: absolute;
	right: 1px;
	width: 10px;
}

.pcfb-chat-titles {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pcfb-chat-titles strong {
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pcfb-chat-status {
	color: rgba(255, 255, 255, 0.82);
	font-size: 12px;
	line-height: 1.2;
}

.pcfb-chat-close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	flex: none;
	font-size: 24px;
	height: 32px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	transition: background-color 0.2s ease;
	width: 32px;
}

.pcfb-chat-close:hover,
.pcfb-chat-close:focus-visible {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	outline: none;
}

.pcfb-chat-body {
	background-color: #e5ddd5;
	background-image: linear-gradient(rgba(229, 221, 213, 0.92), rgba(229, 221, 213, 0.92)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23c8bfb3' fill-opacity='0.4'%3E%3Ccircle cx='10' cy='10' r='1.5'/%3E%3Ccircle cx='40' cy='25' r='1.5'/%3E%3Ccircle cx='20' cy='45' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
	padding: 16px 14px 6px;
}

.pcfb-chat-bubble {
	background: #fff;
	border-radius: 0 10px 10px 10px;
	box-shadow: 0 1px 1px rgba(15, 23, 42, 0.12);
	color: #1f2937;
	font-size: 13.5px;
	line-height: 1.5;
	max-width: 88%;
	padding: 9px 12px;
	position: relative;
}

.pcfb-chat-bubble::before {
	border-color: transparent #fff transparent transparent;
	border-style: solid;
	border-width: 0 8px 8px 0;
	content: "";
	left: -7px;
	position: absolute;
	top: 0;
}

.pcfb-chat-form {
	align-items: flex-end;
	background: #f0f2f5;
	display: flex;
	gap: 8px;
	padding: 12px;
}

.pcfb-chat-message {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	box-shadow: none;
	color: #1f2937;
	flex: 1;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	max-height: 160px;
	min-height: 84px;
	padding: 11px 16px;
	resize: none;
	width: 100%;
}

.pcfb-chat-message:focus {
	border-color: #25d366;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.16);
	outline: none;
}

.pcfb-chat-send {
	align-items: center;
	background: #25d366;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	flex: none;
	font-family: inherit;
	font-size: 0;
	height: 44px;
	justify-content: center;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.2s ease;
	width: 44px;
}

.pcfb-chat-send svg {
	height: 20px;
	width: 20px;
}

.pcfb-chat-send:hover,
.pcfb-chat-send:focus-visible {
	background: #1ebe5a;
	color: #fff;
	transform: scale(1.05);
}

.pcfb-chat-send:active {
	transform: scale(0.95);
}

.pcfb-open-up .pcfb-menu {
	bottom: calc(var(--pcfb-main-size) + 14px);
	flex-direction: column;
	left: 50%;
	transform: translate(-50%, 8px) scale(0.96);
}

.pcfb-position-left.pcfb-open-up .pcfb-menu,
.pcfb-position-right.pcfb-open-up .pcfb-menu {
	left: 50%;
}

.pcfb-open-left .pcfb-menu {
	align-items: center;
	bottom: 6px;
	flex-direction: row;
	right: calc(var(--pcfb-main-size) + 14px);
	transform: translateX(8px) scale(0.96);
}

.pcfb-position-left.pcfb-open-left .pcfb-menu {
	left: calc(var(--pcfb-main-size) + 14px);
	right: auto;
	transform: translateX(-8px) scale(0.96);
}

.pcfb.is-open .pcfb-menu {
	opacity: 1;
	pointer-events: auto;
	transform: translate(0, 0) scale(1);
}

.pcfb-open-up.is-open .pcfb-menu {
	transform: translate(-50%, 0) scale(1);
}

.pcfb-position-left.pcfb-open-left.is-open .pcfb-menu,
.pcfb-open-left.is-open .pcfb-menu {
	transform: translateX(0) scale(1);
}

.pcfb-channel {
	color: #fff;
	height: var(--pcfb-channel-size);
	position: relative;
	width: var(--pcfb-channel-size);
}

.pcfb-channel:hover,
.pcfb-channel:focus-visible {
	color: #fff;
	transform: translateY(-3px) scale(1.05);
}

.pcfb-channel-whatsapp {
	background: #25d366;
}

.pcfb-channel-phone {
	background: #0ea5e9;
}

.pcfb-channel-email {
	background: #374151;
}

.pcfb-inline {
	width: 100%;
}

.pcfb-inline-list {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.pcfb-inline .pcfb-channel {
	border-radius: 12px;
	gap: 10px;
	height: 46px;
	padding: 0 18px;
	width: auto;
}

.pcfb-channel-label {
	color: currentColor;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 782px) {
	.pcfb-floating {
		bottom: 16px;
	}

	.pcfb-position-right {
		right: 16px;
	}

	.pcfb-position-left {
		left: 16px;
	}

	.pcfb-hide-mobile {
		display: none;
	}

	.pcfb-main-text {
		display: none;
	}

	.pcfb-main-button {
		padding: 0;
		width: var(--pcfb-main-size);
	}

	.pcfb-chat {
		max-width: calc(100vw - 32px);
		width: 320px;
	}

	.pcfb-chat-message {
		font-size: 16px;
		min-height: 76px;
	}
}

@media (min-width: 783px) {
	.pcfb-hide-desktop {
		display: none;
	}
}

@media (max-width: 480px) {
	.pcfb-inline-list {
		flex-direction: column;
	}

	.pcfb-inline .pcfb-channel {
		justify-content: center;
		width: 100%;
	}
}
