/* WhatsApp Chat Plus */

:root {
	--wcp-gap: 20px;
	--wcp-safe-bottom: env(safe-area-inset-bottom, 0px);
	--wcp-font: "Manrope", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (max-width: 767px) {
	:root { --wcp-gap: 14px; }
	.wcp__desktop-only { display: none !important; }
}


#wcp {
	--wcp-green: #25d366;
	--wcp-green-2: #1fb65a;
	--wcp-ink: #193c31;
	--wcp-text: #29483e;
	--wcp-muted: #687a73;
	--wcp-border: #d9e5df;
	--wcp-error: #b42318;
	font-family: var(--wcp-font);
}

#wcp,
#wcp *,
#wcp *::before,
#wcp *::after { box-sizing: border-box; }

#wcp [hidden] { display: none !important; }

#wcp h2,
#wcp p,
#wcp form,
#wcp button,
#wcp input,
#wcp select,
#wcp textarea {
	opacity: 1;
	transform: none;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

#wcp button {
	margin: 0;
	border: 0;
	background: none;
	color: inherit;
	box-shadow: none;
	cursor: pointer;
}

/* Botón flotante */

#wcp .wcp__trigger {
	position: fixed;
	right: max(22px, env(safe-area-inset-right, 0px));
	bottom: calc(var(--wcp-bar-offset, var(--wcp-safe-bottom)) + var(--wcp-gap));
	z-index: 9990;
	min-height: 60px;
	padding: 9px 20px 9px 10px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	display: flex;
	align-items: center;
	gap: 11px;
	background: linear-gradient(135deg, #27d66b, #20bd5b);
	color: #fff;
	text-align: left;
	box-shadow: 0 12px 30px rgba(17, 100, 57, .3);
	animation: wcp-float 3.4s ease-in-out infinite;
	transition: bottom .25s ease, box-shadow .18s ease, filter .18s ease;
}

#wcp .wcp__trigger:hover,
#wcp .wcp__trigger:focus-visible {
	background: linear-gradient(135deg, #2ee378, #22c961);
	color: #fff;
	filter: saturate(1.08);
	box-shadow: 0 18px 40px rgba(17, 100, 57, .38), 0 0 0 6px rgba(37, 211, 102, .14);
}

#wcp .wcp__trigger:focus-visible {
	outline: 3px solid #145f3a;
	outline-offset: 3px;
}

#wcp .wcp__trigger-icon {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	padding: 6px;
	border-radius: 50%;
	fill: #fff;
	background: rgba(8, 86, 45, .34);
}

#wcp .wcp__trigger-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: #fff;
}

#wcp .wcp__trigger-text strong {
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.15;
}

#wcp .wcp__trigger-text small {
	color: rgba(255, 255, 255, .92);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
}

#wcp .wcp__dot {
	position: absolute;
	top: 3px;
	left: 44px;
	width: 11px;
	height: 11px;
	border: 2px solid #20bd5b;
	border-radius: 50%;
	background: #fff;
	animation: wcp-pulse 2.3s ease-in-out infinite;
}

/* Modal */

#wcp .wcp__overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: rgba(7, 28, 20, .6);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	animation: wcp-fade .18s ease both;
}

#wcp .wcp__modal {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 2147483001;
	width: min(440px, calc(100% - 32px));
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	padding: 28px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 24px;
	background: #fff;
	color: var(--wcp-text);
	box-shadow: 0 30px 90px rgba(5, 30, 20, .32);
	transform: translate(-50%, -50%);
	animation: wcp-modal-in .24s cubic-bezier(.2, .8, .2, 1) both;
}

#wcp .wcp__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #edf4f0;
	color: #335348;
	transition: background .18s ease, color .18s ease;
}

#wcp .wcp__close:hover,
#wcp .wcp__close:focus-visible {
	background: #dff1e6;
	color: #146c40;
}

#wcp .wcp__close svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
}

#wcp .wcp__head {
	padding-right: 40px;
	display: flex;
	align-items: center;
	gap: 14px;
}

#wcp .wcp__head-icon {
	width: 50px;
	height: 50px;
	flex: 0 0 50px;
	border-radius: 15px;
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, #e3f9eb, #cef1da);
	color: #15914b;
}

#wcp .wcp__head-icon svg {
	width: 30px;
	height: 30px;
	fill: currentColor;
}

#wcp .wcp__eyebrow {
	display: block;
	margin-bottom: 3px;
	color: #168d4c;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

#wcp .wcp__title {
	margin: 0;
	color: var(--wcp-ink);
	font-size: clamp(21px, 4vw, 25px);
	font-weight: 800;
	line-height: 1.15;
}

#wcp .wcp__desc {
	margin: 16px 0 20px;
	color: var(--wcp-muted);
	font-size: 14px;
	line-height: 1.55;
}

#wcp .wcp__field { margin: 0 0 16px; }

#wcp .wcp__field label {
	display: block;
	margin: 0 0 7px;
	color: var(--wcp-text);
	font-size: 13px;
	font-weight: 700;
}

#wcp .wcp__req { color: #c0392b; }

#wcp .wcp__opt {
	margin-left: 5px;
	color: #82908b;
	font-size: 11px;
	font-weight: 500;
}

#wcp .wcp__field input,
#wcp .wcp__field select,
#wcp .wcp__field textarea {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 13px;
	border: 1px solid var(--wcp-border);
	border-radius: 12px;
	background: #fff;
	color: #203c33;
	font-size: 16px;
	line-height: 1.4;
	box-shadow: none;
	outline: none;
	transition: border-color .16s ease, box-shadow .16s ease;
}

#wcp .wcp__field textarea {
	min-height: 84px;
	resize: vertical;
}

#wcp .wcp__field input:focus,
#wcp .wcp__field select:focus,
#wcp .wcp__field textarea:focus {
	border-color: #25ad60;
	box-shadow: 0 0 0 4px rgba(37, 211, 102, .14);
}

#wcp .wcp__field input[aria-invalid="true"] {
	border-color: var(--wcp-error);
	box-shadow: 0 0 0 4px rgba(180, 35, 24, .08);
}

#wcp .wcp__error {
	display: block;
	min-height: 16px;
	margin-top: 5px;
	color: var(--wcp-error);
	font-size: 12px;
}

#wcp .wcp__preview {
	margin: 0 0 18px;
	padding: 13px 15px;
	border: 1px solid #dce9e2;
	border-radius: 14px;
	background: linear-gradient(135deg, #f5faf7, #edf7f1);
}

#wcp .wcp__preview-label {
	display: block;
	margin-bottom: 6px;
	color: #4d675e;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
}

#wcp .wcp__preview p {
	margin: 0;
	color: #29483d;
	font-size: 13px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

#wcp .wcp__send,
#wcp .wcp__ghost {
	width: 100%;
	min-height: 50px;
	border-radius: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

#wcp .wcp__send {
	background: linear-gradient(135deg, #29db70, #20bd5b);
	color: #fff;
	box-shadow: 0 10px 24px rgba(37, 211, 102, .27);
}

#wcp .wcp__send:hover,
#wcp .wcp__send:focus-visible {
	background: linear-gradient(135deg, #2ee378, #22c961);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 15px 30px rgba(37, 211, 102, .36);
}

#wcp .wcp__send svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#wcp .wcp__ghost {
	margin-top: 10px;
	border: 1px solid #b9dcc6;
	background: #f4fbf6;
	color: #185b38;
}

#wcp .wcp__ghost:hover,
#wcp .wcp__ghost:focus-visible {
	border-color: #24a85c;
	background: #e2f6e9;
	color: #104c2e;
}

#wcp .wcp__ghost:disabled {
	cursor: wait;
	opacity: .7;
}

#wcp .wcp__ghost svg {
	width: 19px;
	height: 19px;
	fill: currentColor;
}

#wcp #wcp-qr-back svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#wcp .wcp__send:focus-visible,
#wcp .wcp__ghost:focus-visible,
#wcp .wcp__close:focus-visible {
	outline: 3px solid #145f3a;
	outline-offset: 3px;
}

#wcp .wcp__status {
	min-height: 16px;
	margin: 8px 4px 0;
	color: #687d74;
	font-size: 12px;
	line-height: 1.35;
	text-align: center;
}

#wcp .wcp__privacy {
	margin: 6px 4px 0;
	color: #7b8a85;
	font-size: 11px;
	line-height: 1.45;
	text-align: center;
}

#wcp .wcp__qr { text-align: center; }
#wcp .wcp__qr .wcp__desc { max-width: 330px; margin-inline: auto; }

#wcp .wcp__qr-code {
	width: 236px;
	min-height: 236px;
	margin: 0 auto 8px;
	padding: 14px;
	border: 1px solid var(--wcp-border);
	border-radius: 18px;
	display: grid;
	place-items: center;
	background: #fff;
}

#wcp .wcp__qr-code img,
#wcp .wcp__qr-code canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

html.wcp-lock,
html.wcp-lock body { overflow: hidden !important; }

@media (max-width: 767px) {
	#wcp .wcp__trigger {
		right: max(14px, env(safe-area-inset-right, 0px));
		width: 58px;
		height: 58px;
		min-height: 58px;
		padding: 8px;
		justify-content: center;
	}

	#wcp .wcp__trigger-text { display: none; }

	#wcp .wcp__dot {
		top: 1px;
		right: 1px;
		left: auto;
	}

	#wcp .wcp__modal {
		top: auto;
		bottom: 0;
		left: 0;
		width: 100%;
		max-height: 92vh;
		max-height: 92dvh;
		padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
		border-radius: 24px 24px 0 0;
		transform: none;
		animation: wcp-sheet-in .22s ease both;
	}

	#wcp .wcp__head { align-items: flex-start; }
}

/* Animaciones */

@keyframes wcp-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

@keyframes wcp-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(.78); opacity: .65; }
}

@keyframes wcp-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes wcp-modal-in {
	from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)) scale(.97); }
	to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes wcp-sheet-in {
	from { opacity: 0; transform: translateY(36px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	#wcp .wcp__trigger,
	#wcp .wcp__dot,
	#wcp .wcp__overlay,
	#wcp .wcp__modal { animation: none !important; }

	#wcp .wcp__trigger,
	#wcp .wcp__send,
	#wcp .wcp__ghost { transition: none !important; }

	#wcp .wcp__send:hover { transform: none; }
}
