/* Reset local — nunca globalizamos box-sizing en todo el sitio para no
   pisar el CSS del tema; solo dentro de nuestros propios componentes. */
.whatsgrowth-floating,
.whatsgrowth-floating *,
.whatsgrowth-form,
.whatsgrowth-form *,
.whatsgrowth-confirmation,
.whatsgrowth-confirmation * {
	box-sizing: border-box;
}

/* ============================================================
 * GLOBO FLOTANTE
 * ============================================================ */

@media (max-width: 782px) {
	.wgw-hide-mobile { display: none !important; }
}
@media (min-width: 783px) {
	.wgw-hide-desktop { display: none !important; }
}

.whatsgrowth-floating {
	position: fixed;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	right: calc(20px + env(safe-area-inset-right, 0px));
	z-index: 9999;
	display: flex;
	flex-direction: column-reverse;
	align-items: flex-end;
	gap: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	transition: transform 0.2s ease;
}

.whatsgrowth-floating--left {
	right: auto;
	left: calc(20px + env(safe-area-inset-left, 0px));
	align-items: flex-start;
}

.whatsgrowth-floating__toggle {
	width: 58px;
	height: 58px;
	background-color: var(--wgw-primary, #25d366) !important;
	background-image: none !important;
	border: none !important;
	border-radius: 50% !important;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	padding: 0 !important;
	appearance: none;
	-webkit-appearance: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whatsgrowth-floating__toggle:hover {
	transform: scale(1.06);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.whatsgrowth-floating__toggle svg {
	width: 28px;
	height: 28px;
	display: block;
	flex-shrink: 0;
}

.whatsgrowth-floating__toggle--pill {
	width: auto;
	height: 50px;
	border-radius: var(--wgw-pill-radius, 25px) !important;
	padding: 0 20px 0 16px !important;
	gap: 10px;
}

.whatsgrowth-floating__toggle--pill svg {
	width: 24px;
	height: 24px;
}

.whatsgrowth-floating__toggle-label {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.whatsgrowth-floating.is-open .whatsgrowth-floating__toggle,
.whatsgrowth-floating.is-closing .whatsgrowth-floating__toggle {
	display: none;
}

@keyframes whatsgrowth-pulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wgw-pulse-color, var(--wgw-primary, #25d366)) 70%, transparent); }
	70%  { box-shadow: 0 0 0 20px color-mix(in srgb, var(--wgw-pulse-color, var(--wgw-primary, #25d366)) 0%, transparent); }
	100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wgw-pulse-color, var(--wgw-primary, #25d366)) 0%, transparent); }
}

.whatsgrowth-floating__toggle--pulse {
	animation: whatsgrowth-pulse var(--wgw-pulse-speed, 1.8s) infinite;
}

.whatsgrowth-floating__toggle--glow {
	position: relative;
}

.whatsgrowth-floating__toggle--glow::before {
	content: "";
	position: absolute;
	inset: var(--wgw-glow-inset, -6px);
	border-radius: 50%;
	background: var(--wgw-pulse-color, var(--wgw-primary, #25d366));
	filter: blur(var(--wgw-glow-blur, 6px));
	z-index: -1;
	animation: whatsgrowth-glow-breathe var(--wgw-pulse-speed, 1.8s) ease-in-out infinite;
}

@keyframes whatsgrowth-glow-breathe {
	0%, 100% { opacity: 0.25; transform: scale(0.9); }
	50%      { opacity: 0.6; transform: scale(var(--wgw-glow-max-scale, 1.1)); }
}

@keyframes whatsgrowth-rainbow {
	0%   { box-shadow: 0 0 0 4px var(--wgw-rainbow-1, #25d366); }
	20%  { box-shadow: 0 0 0 4px var(--wgw-rainbow-2, #25d366); }
	40%  { box-shadow: 0 0 0 4px var(--wgw-rainbow-3, var(--wgw-rainbow-1, #25d366)); }
	60%  { box-shadow: 0 0 0 4px var(--wgw-rainbow-4, var(--wgw-rainbow-1, #25d366)); }
	80%  { box-shadow: 0 0 0 4px var(--wgw-rainbow-5, var(--wgw-rainbow-1, #25d366)); }
	100% { box-shadow: 0 0 0 4px var(--wgw-rainbow-1, #25d366); }
}

.whatsgrowth-floating__toggle--rainbow {
	animation: whatsgrowth-rainbow var(--wgw-pulse-speed, 2.4s) linear infinite;
}

@keyframes whatsgrowth-breathe {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.12); }
}

.whatsgrowth-floating__toggle--breathe {
	animation: whatsgrowth-breathe var(--wgw-pulse-speed, 1.8s) ease-in-out infinite;
}

@keyframes whatsgrowth-fire {
	0%   { box-shadow: 0 0 8px 2px #ff6b00, 0 0 16px 4px #ff3d00; transform: scale(1); }
	15%  { box-shadow: 0 0 10px 3px #ffae00, 0 0 20px 6px #ff6b00; transform: scale(1.03); }
	30%  { box-shadow: 0 0 6px 2px #ff3d00, 0 0 14px 4px #ffae00; transform: scale(0.98); }
	45%  { box-shadow: 0 0 12px 4px #ff6b00, 0 0 22px 6px #ff3d00; transform: scale(1.05); }
	60%  { box-shadow: 0 0 8px 2px #ffae00, 0 0 16px 5px #ff6b00; transform: scale(1); }
	75%  { box-shadow: 0 0 10px 3px #ff3d00, 0 0 18px 5px #ffae00; transform: scale(1.02); }
	90%  { box-shadow: 0 0 7px 2px #ff6b00, 0 0 15px 4px #ff3d00; transform: scale(0.99); }
	100% { box-shadow: 0 0 8px 2px #ff6b00, 0 0 16px 4px #ff3d00; transform: scale(1); }
}

.whatsgrowth-floating__toggle--fire {
	animation: whatsgrowth-fire 1.2s infinite;
}

.whatsgrowth-floating__toggle--coin {
	position: relative;
	overflow: hidden;
	animation: whatsgrowth-coin-scale var(--wgw-pulse-speed, 1.6s) ease-in-out infinite;
}

.whatsgrowth-floating__toggle--coin::after {
	content: "";
	position: absolute;
	top: -50%;
	left: -60%;
	width: 14%;
	height: 200%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.75), transparent);
	transform: rotate(20deg);
	animation: whatsgrowth-coin-shine var(--wgw-pulse-speed, 1.6s) linear infinite;
}

@keyframes whatsgrowth-coin-shine {
	0%   { left: -60%; }
	100% { left: 140%; }
}

@keyframes whatsgrowth-coin-scale {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.08); }
}

.whatsgrowth-floating__toggle--smoke {
	position: relative;
}

.whatsgrowth-floating__toggle--smoke::before,
.whatsgrowth-floating__toggle--smoke::after {
	content: "";
	position: absolute;
	bottom: 5%;
	width: calc(55% * var(--wgw-smoke-scale, 1));
	height: calc(55% * var(--wgw-smoke-scale, 1));
	border-radius: 50%;
	background: radial-gradient(ellipse at center, var(--wgw-pulse-color, rgba(255, 255, 255, 0.75)) 0%, transparent 72%);
	filter: blur(4px);
	z-index: -1;
	opacity: 0;
}

.whatsgrowth-floating__toggle--smoke::before {
	left: 8%;
	animation: whatsgrowth-smoke-rise var(--wgw-pulse-speed, 2.6s) ease-out infinite;
}

.whatsgrowth-floating__toggle--smoke::after {
	right: 5%;
	width: calc(42% * var(--wgw-smoke-scale, 1));
	height: calc(42% * var(--wgw-smoke-scale, 1));
	animation: whatsgrowth-smoke-rise var(--wgw-pulse-speed, 2.6s) ease-out infinite;
	animation-delay: calc(var(--wgw-pulse-speed, 2.6s) / -2);
}

@keyframes whatsgrowth-smoke-rise {
	0%   { transform: translateY(0) scale(0.6); opacity: 0; }
	15%  { opacity: var(--wgw-smoke-opacity, 0.55); }
	100% { transform: translateY(-170%) scale(1.7); opacity: 0; }
}

/* Letrero: texto que se desliza como en una marquesina, para textos
   de botón más largos de lo que cabe cómodo en la píldora. */
.whatsgrowth-floating__toggle-label--letrero {
	display: inline-block;
	max-width: 100px;
	overflow: hidden;
	white-space: nowrap;
	vertical-align: middle;
	mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.whatsgrowth-letrero-inner {
	display: inline-block;
	padding-left: 100%;
	animation: whatsgrowth-letrero-scroll 6s linear infinite;
}

@keyframes whatsgrowth-letrero-scroll {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-200%); }
}

/* Trazo: un "cometa" de luz recorriendo el contorno del botón sin
   parar — funciona en cualquier forma/tamaño porque usa un degradado
   cónico enmascarado, no depende de medir el perímetro real. */
.whatsgrowth-floating__toggle--trazo {
	position: relative;
}

.whatsgrowth-floating__toggle--trazo::before {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: inherit;
	padding: 3px;
	background: conic-gradient(from var(--wgw-trazo-angle, 0deg), transparent 0%, var(--wgw-primary, #25d366) 12%, transparent 26%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	animation: whatsgrowth-trazo-rotate 3s linear infinite;
	pointer-events: none;
}

@property --wgw-trazo-angle {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

@keyframes whatsgrowth-trazo-rotate {
	to { --wgw-trazo-angle: 360deg; }
}

.whatsgrowth-greeting-bubble {
	background: #fff;
	color: #111827;
	padding: 10px 16px;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	font-size: 13px;
	max-width: 220px;
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	animation: whatsgrowth-panel-in 0.25s ease-out;
}

.whatsgrowth-greeting-bubble[hidden] {
	display: none !important;
}

.whatsgrowth-status-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.whatsgrowth-status-dot--pulse {
	animation: whatsgrowth-status-dot-pulse 1.6s ease-in-out infinite;
}

.whatsgrowth-status-dot--breathe {
	animation: whatsgrowth-status-dot-breathe 2.4s ease-in-out infinite;
}

.whatsgrowth-status-dot--glow {
	box-shadow: 0 0 0 0 var(--wgw-status-dot-color, #25d366);
	animation: whatsgrowth-status-dot-glow 1.8s ease-out infinite;
}

@keyframes whatsgrowth-status-dot-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.35); opacity: 0.7; }
}

@keyframes whatsgrowth-status-dot-breathe {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

@keyframes whatsgrowth-status-dot-glow {
	0% { box-shadow: 0 0 0 0 var(--wgw-status-dot-color, #25d366); }
	70% { box-shadow: 0 0 0 6px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}

.whatsgrowth-greeting-bubble::after {
	content: "";
	position: absolute;
	bottom: -7px;
	right: 22px;
	width: 14px;
	height: 14px;
	background: #fff;
	transform: rotate(45deg);
	box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.06);
}

.whatsgrowth-floating--left .whatsgrowth-greeting-bubble::after {
	right: auto;
	left: 22px;
}

.whatsgrowth-greeting-bubble__close {
	background: none;
	border: none;
	color: #9ca3af;
	cursor: pointer;
	font-size: 14px;
	padding: 6px;
	margin: -6px -6px -6px 0;
	line-height: 1;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.whatsgrowth-greeting-bubble__close:hover {
	background: #f3f4f6;
	color: #374151;
}

/* ============================================================
 * PANEL (tipo chat)
 * ============================================================ */

.whatsgrowth-floating__panel {
	width: 320px;
	max-width: calc(100vw - 40px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
	overflow: hidden;
	animation: whatsgrowth-panel-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes whatsgrowth-panel-in {
	from { opacity: 0; transform: translateY(16px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes whatsgrowth-panel-out {
	from { opacity: 1; transform: translateY(0) scale(1); }
	to   { opacity: 0; transform: translateY(16px) scale(0.98); }
}

.whatsgrowth-floating.is-closing .whatsgrowth-floating__panel {
	animation: whatsgrowth-panel-out 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.whatsgrowth-floating__panel-header {
	background: var(--wgw-window, var(--wgw-primary, #25d366));
	color: #fff;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	font-size: 15px;
}

.whatsgrowth-floating__close {
	background-color: rgba(255, 255, 255, 0.18) !important;
	background-image: none !important;
	border: none !important;
	color: #fff !important;
	font-size: 14px;
	cursor: pointer;
	line-height: 1;
	width: 26px;
	height: 26px;
	border-radius: 50% !important;
	display: flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.15s ease;
}

.whatsgrowth-floating__close:hover {
	background: rgba(255, 255, 255, 0.32);
}

.whatsgrowth-floating__panel .whatsgrowth-form {
	padding: 18px;
	max-width: none;
	margin: 0;
	max-height: 60vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	/* Deja ver un poco del siguiente campo asomando en el borde —
	   es la señal visual de "aquí hay más" sin depender de que el
	   navegador dibuje una barra de scroll visible en móvil. */
	scrollbar-width: thin;
}

.whatsgrowth-floating__panel .whatsgrowth-form::-webkit-scrollbar {
	width: 5px;
}

.whatsgrowth-floating__panel .whatsgrowth-form::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 10px;
}

.whatsgrowth-required-mark {
	color: #dc2626;
}

.whatsgrowth-form__consent {
	margin-bottom: 14px;
	font-size: 12px;
	color: #6b7280;
	line-height: 1.4;
}

.whatsgrowth-form__consent label {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	cursor: pointer;
}

.whatsgrowth-form__consent input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
}

.whatsgrowth-form__consent a {
	color: var(--wgw-primary, #25d366);
	font-weight: 600;
}

/* ============================================================
 * FORM (embebido y dentro del panel flotante)
 * ============================================================ */

.whatsgrowth-form {
	max-width: 420px;
	margin: 0 auto;
	font-family: inherit;
}

.whatsgrowth-form__title {
	margin: 0 0 16px;
	font-size: 17px;
	font-weight: 600;
	color: #111827;
}

.whatsgrowth-form__field {
	margin-bottom: 18px;
}

.whatsgrowth-form__field label {
	display: block !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #4b5563 !important;
	margin: 0 0 8px !important;
	padding: 0 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.01em;
}

.whatsgrowth-form__field input,
.whatsgrowth-form__field textarea,
.whatsgrowth-form__field select {
	width: 100%;
	padding: 11px 13px;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	font-size: 14px;
	color: #111827;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.whatsgrowth-form__field select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
	cursor: pointer;
}

.whatsgrowth-form__field input::placeholder,
.whatsgrowth-form__field textarea::placeholder {
	color: #9ca3af;
}

.whatsgrowth-form__field input:focus,
.whatsgrowth-form__field textarea:focus,
.whatsgrowth-form__field select:focus {
	outline: none;
	border-color: var(--wgw-focus, var(--wgw-primary, #25d366));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wgw-focus, var(--wgw-primary, #25d366)) 20%, transparent);
}

.whatsgrowth-form__submit {
	background-color: var(--wgw-button, var(--wgw-primary, #25d366)) !important;
	background-image: none !important;
	color: #fff !important;
	border: none !important;
	padding: 13px 20px;
	border-radius: 8px !important;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	margin-top: 4px;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.15s ease;
}

.whatsgrowth-form__submit:hover {
	filter: brightness(0.9);
}

.whatsgrowth-form__submit:active {
	transform: translateY(1px);
}

/* ============================================================
 * BOTÓN EXTERNO — [wappgrowth_open_button]. Estilo mínimo de
 * cortesía; se sobreescribe fácil con la clase que le pases o
 * el CSS del tema, ya que puede vivir en cualquier parte del sitio.
 * ============================================================ */

.wappgrowth-open-button {
	background-color: var(--wgw-primary, #25d366);
	color: #fff;
	border: none;
	padding: 12px 22px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.wappgrowth-open-button:hover {
	filter: brightness(0.9);
}

/* ============================================================
 * CONFIRMACIÓN POST-ENVÍO
 * ============================================================ */

.whatsgrowth-confirmation {
	text-align: center;
	padding: 20px 18px 18px;
}

.whatsgrowth-confirmation__emoji {
	font-size: 36px;
	line-height: 1;
	margin-bottom: 10px;
}

.whatsgrowth-confirmation__text {
	font-size: 14px;
	color: #374151;
	margin: 0 0 14px;
	line-height: 1.5;
	font-weight: 500;
}

.whatsgrowth-confirmation__toggle-fallback {
	background: none !important;
	border: none !important;
	color: #6b7280 !important;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
	padding: 4px !important;
	appearance: none;
	-webkit-appearance: none;
}

.whatsgrowth-confirmation__toggle-fallback:hover {
	color: #374151 !important;
}

.whatsgrowth-confirmation__fallback {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #f0f1f3;
}

.whatsgrowth-confirmation__retry,
.whatsgrowth-confirmation__resend {
	display: block;
	width: 100%;
	padding: 11px;
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
	margin-bottom: 8px;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.whatsgrowth-confirmation__retry {
	background-color: #fff !important;
	background-image: none !important;
	color: var(--wgw-primary, #1da851) !important;
	border: 1.5px solid var(--wgw-primary, #25d366) !important;
	font-weight: 600;
	appearance: none;
	-webkit-appearance: none;
}

.whatsgrowth-confirmation__retry:hover {
	background-color: #f0fdf5 !important;
}

.whatsgrowth-confirmation__resend {
	background: none !important;
	background-image: none !important;
	color: #6b7280 !important;
	border: none !important;
	margin-bottom: 0;
	font-size: 13px;
	text-decoration: underline;
	appearance: none;
	-webkit-appearance: none;
}

.whatsgrowth-confirmation__resend:hover {
	color: #374151 !important;
}
