/* WhatsApp Chat Plus */

:root {
	--wcp-gap: 20px;
	--wcp-safe-bottom: env(safe-area-inset-bottom, 0px);
	--wcp-font: inherit;
}

@media (max-width: 767px) {
	:root { --wcp-gap: 14px; }
	.wcp__desktop-only { display: none !important; }
}

#wcp {
	--wcp-accent: #15803d;
	--wcp-accent-hover: #166534;
	--wcp-ink: #18181b;
	--wcp-text: #3f3f46;
	--wcp-muted: #6b6b73;
	--wcp-border: #e4e4e7;
	--wcp-surface: #f4f4f5;
	--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(20px, env(safe-area-inset-right, 0px));
	bottom: calc(var(--wcp-bar-offset, var(--wcp-safe-bottom)) + var(--wcp-gap));
	z-index: 9990;
	min-height: 52px;
	padding: 6px 18px 6px 6px;
	border: 1px solid var(--wcp-border);
	border-radius: 999px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	color: var(--wcp-ink);
	text-align: left;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
	transition: bottom .25s ease, box-shadow .18s ease, border-color .18s ease;
}

#wcp .wcp__trigger:hover {
	border-color: #d4d4d8;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
}

#wcp .wcp__trigger:focus-visible {
	outline: 2px solid var(--wcp-ink);
	outline-offset: 3px;
}

#wcp .wcp__trigger-icon {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	padding: 8px;
	border-radius: 50%;
	fill: #fff;
	background: var(--wcp-accent);
}

#wcp .wcp__trigger-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

#wcp .wcp__trigger-text strong {
	color: var(--wcp-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
}

#wcp .wcp__trigger-text small {
	color: var(--wcp-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
}

/* Ventana */

#wcp .wcp__overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: rgba(0, 0, 0, .45);
	animation: wcp-fade .18s ease both;
}

#wcp .wcp__modal {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 2147483001;
	width: min(420px, calc(100% - 32px));
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	padding: 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 16px;
	background: #fff;
	color: var(--wcp-text);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
	transform: translate(-50%, -50%);
	animation: wcp-modal-in .2s ease-out both;
}

#wcp .wcp__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: var(--wcp-muted);
	transition: background .16s ease, color .16s ease;
}

#wcp .wcp__close:hover {
	background: var(--wcp-surface);
	color: var(--wcp-ink);
}

#wcp .wcp__close svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

#wcp .wcp__head {
	padding-right: 40px;
	display: flex;
	align-items: center;
	gap: 12px;
}

#wcp .wcp__head-icon {
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--wcp-accent);
	color: #fff;
}

#wcp .wcp__head-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

#wcp .wcp__title {
	margin: 0;
	color: var(--wcp-ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
}

#wcp .wcp__desc {
	margin: 12px 0 20px;
	color: var(--wcp-muted);
	font-size: 14px;
	line-height: 1.5;
}

#wcp .wcp__field { margin: 0 0 14px; }

#wcp .wcp__field label {
	display: block;
	margin: 0 0 6px;
	color: var(--wcp-ink);
	font-size: 13px;
	font-weight: 500;
}

#wcp .wcp__req { color: var(--wcp-error); }

#wcp .wcp__opt {
	margin-left: 4px;
	color: var(--wcp-muted);
	font-size: 12px;
	font-weight: 400;
}

#wcp .wcp__field input,
#wcp .wcp__field select,
#wcp .wcp__field textarea {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #d4d4d8;
	border-radius: 10px;
	background: #fff;
	color: var(--wcp-ink);
	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: 80px;
	resize: vertical;
}

#wcp .wcp__field input:focus,
#wcp .wcp__field select:focus,
#wcp .wcp__field textarea:focus {
	border-color: var(--wcp-ink);
	box-shadow: 0 0 0 3px rgba(24, 24, 27, .08);
}

#wcp .wcp__field input[aria-invalid="true"] {
	border-color: var(--wcp-error);
	box-shadow: none;
}

#wcp .wcp__error {
	display: block;
	min-height: 16px;
	margin-top: 4px;
	color: var(--wcp-error);
	font-size: 12px;
}

#wcp .wcp__preview {
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--wcp-surface);
}

#wcp .wcp__preview-label {
	display: block;
	margin-bottom: 4px;
	color: var(--wcp-muted);
	font-size: 12px;
}

#wcp .wcp__preview p {
	margin: 0;
	color: var(--wcp-text);
	font-size: 13px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

#wcp .wcp__send,
#wcp .wcp__ghost {
	width: 100%;
	min-height: 46px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background .16s ease, border-color .16s ease, color .16s ease;
}

#wcp .wcp__send {
	background: var(--wcp-accent);
	color: #fff;
}

#wcp .wcp__send:hover {
	background: var(--wcp-accent-hover);
	color: #fff;
}

#wcp .wcp__send svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#wcp .wcp__ghost {
	margin-top: 8px;
	border: 1px solid #d4d4d8;
	background: #fff;
	color: var(--wcp-ink);
}

#wcp .wcp__ghost:hover {
	border-color: #a1a1aa;
}

#wcp .wcp__ghost:disabled {
	cursor: wait;
	opacity: .7;
}

#wcp .wcp__ghost svg {
	width: 18px;
	height: 18px;
	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: 2px solid var(--wcp-ink);
	outline-offset: 2px;
}

#wcp .wcp__status {
	min-height: 16px;
	margin: 8px 4px 0;
	color: var(--wcp-muted);
	font-size: 12px;
	line-height: 1.35;
	text-align: center;
}

#wcp .wcp__privacy {
	margin: 4px 4px 0;
	color: var(--wcp-muted);
	font-size: 12px;
	line-height: 1.45;
	text-align: center;
}

#wcp .wcp__qr { text-align: center; }
#wcp .wcp__qr .wcp__desc { max-width: 320px; margin-inline: auto; }

#wcp .wcp__qr-code {
	width: 228px;
	min-height: 228px;
	margin: 0 auto 8px;
	padding: 12px;
	border: 1px solid var(--wcp-border);
	border-radius: 12px;
	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: 52px;
		height: 52px;
		min-height: 52px;
		padding: 0;
		border: 0;
		justify-content: center;
		background: var(--wcp-accent);
	}

	#wcp .wcp__trigger:hover { background: var(--wcp-accent-hover); }

	#wcp .wcp__trigger-icon {
		width: 28px;
		height: 28px;
		flex-basis: 28px;
		padding: 0;
		background: none;
	}

	#wcp .wcp__trigger-text { display: none; }

	#wcp .wcp__modal {
		top: auto;
		bottom: 0;
		left: 0;
		width: 100%;
		max-height: 92vh;
		max-height: 92dvh;
		padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
		border-radius: 16px 16px 0 0;
		transform: none;
		animation: wcp-sheet-in .22s ease-out both;
	}
}

/* Animaciones */

@keyframes wcp-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes wcp-modal-in {
	from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
	to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes wcp-sheet-in {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	#wcp .wcp__overlay,
	#wcp .wcp__modal { animation: none !important; }

	#wcp .wcp__trigger,
	#wcp .wcp__send,
	#wcp .wcp__ghost,
	#wcp .wcp__close { transition: none !important; }
}
