/* Estilos para el botón de WhatsApp */
.ewb-whatsapp-button-wrapper {
	text-align: left;
	display: block;
}

.ewb-whatsapp-button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-weight: 500;
	text-align: center;
	line-height: 1.2;
	position: relative;
	overflow: hidden;
	border-radius: 5px;
	background-color: #25D366;
	color: #ffffff;
	padding: 10px 30px;
	font-size: 14px;
	min-height: 44px;
	width: fit-content;
}

.ewb-whatsapp-button:hover {
	text-decoration: none;
	background-color: #128C7E;
}

.ewb-whatsapp-button:active {
	/* Sin transform por defecto */
}

.ewb-whatsapp-button:focus {
	outline: none;
}

.ewb-whatsapp-button .ewb-icon {
	display: inline-block;
	line-height: 1;
	font-size: 16px;
	width: 1em;
	height: 1em;
	vertical-align: middle;
}

.ewb-whatsapp-button .ewb-button-text {
	display: inline-block;
	white-space: nowrap;
	vertical-align: middle;
	line-height: 1;
}

/* Estilos para iconos SVG */
.ewb-whatsapp-button svg {
	fill: currentColor;
	stroke: currentColor;
	vertical-align: middle;
	width: 1em;
	height: 1em;
	display: inline-block;
}

/* Iconos heredan el color del texto */
.ewb-whatsapp-button i,
.ewb-whatsapp-button svg {
	color: inherit;
	fill: currentColor;
}

/* Estilos para diferentes posiciones de icono */
.ewb-whatsapp-button .ewb-icon-before {
	order: 1;
	margin-right: 8px;
}

.ewb-whatsapp-button .ewb-button-text {
	order: 2;
}

.ewb-whatsapp-button .ewb-icon-after {
	order: 3;
	margin-left: 8px;
}

/* Asegurar que todo el contenido esté en línea horizontal */
.ewb-whatsapp-button > * {
	display: inline-block !important;
	vertical-align: middle !important;
}

/* Prevenir que el texto se rompa en múltiples líneas */
.ewb-whatsapp-button .ewb-button-text {
	word-wrap: normal;
	word-break: keep-all;
	white-space: nowrap;
}

/* Forzar layout horizontal específicamente */
.ewb-whatsapp-button .ewb-icon-before,
.ewb-whatsapp-button .ewb-icon-after,
.ewb-whatsapp-button .ewb-button-text {
	display: inline-block !important;
	vertical-align: middle !important;
	float: none !important;
	clear: none !important;
}

/* Anular estilos de Elementor que puedan causar problemas */
.elementor-button.ewb-whatsapp-button {
	flex-direction: row !important;
}

.elementor-button.ewb-whatsapp-button .ewb-icon,
.elementor-button.ewb-whatsapp-button .ewb-button-text {
	display: inline-block !important;
	vertical-align: middle !important;
}

/* Regla final para asegurar layout horizontal */
.ewb-whatsapp-button {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center !important;
}

.ewb-whatsapp-button .ewb-icon,
.ewb-whatsapp-button .ewb-button-text {
	display: inline-block !important;
	vertical-align: middle !important;
	position: static !important;
}

/* Estilos específicos para el editor de Elementor */
.elementor-editor-active .ewb-whatsapp-button {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center !important;
}

.elementor-editor-active .ewb-whatsapp-button .ewb-icon,
.elementor-editor-active .ewb-whatsapp-button .ewb-button-text {
	display: inline-block !important;
	vertical-align: middle !important;
}

/* Asegurar que los iconos FontAwesome se muestren correctamente en el editor */
.elementor-editor-active .ewb-whatsapp-button .ewb-icon i[class*="fa-"] {
	display: inline-block !important;
	vertical-align: middle !important;
	font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
	font-weight: 900 !important;
	font-size: inherit !important;
	line-height: 1 !important;
	width: auto !important;
	height: auto !important;
}

/* Forzar renderizado de iconos en el editor */
.elementor-editor-active .ewb-whatsapp-button .ewb-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 1em !important;
	min-height: 1em !important;
}

/* Prevenir que se muestre texto [object Object] */
.elementor-editor-active .ewb-whatsapp-button .ewb-icon:empty,
.elementor-editor-active .ewb-whatsapp-button .ewb-icon:blank,
.elementor-editor-active .ewb-whatsapp-button .ewb-icon:not(:has(i)) {
	display: none !important;
}

/* Asegurar que los iconos se muestren en el frontend también */
.ewb-whatsapp-button .ewb-icon i[class*="fa-"] {
	font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
	font-weight: 900 !important;
	display: inline-block !important;
	vertical-align: middle !important;
}

/* Asegurar que los colores se apliquen correctamente */
.elementor-widget-ewb_whatsapp_button .ewb-whatsapp-button {
	color: inherit !important;
}

.elementor-widget-ewb_whatsapp_button .ewb-whatsapp-button .ewb-icon,
.elementor-widget-ewb_whatsapp_button .ewb-whatsapp-button .ewb-button-text {
	color: inherit !important;
}

/* Asegurar que las animaciones de Elementor funcionen correctamente */
.ewb-whatsapp-button.elementor-animation-float:hover {
	animation-name: ewb-float;
	animation-duration: 0.6s;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
	animation-direction: alternate;
}

.ewb-whatsapp-button.elementor-animation-pulse:hover {
	animation-name: ewb-pulse;
	animation-duration: 1s;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
}

.ewb-whatsapp-button.elementor-animation-shake:hover {
	animation-name: ewb-shake;
	animation-duration: 0.5s;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
}

.ewb-whatsapp-button.elementor-animation-wobble:hover {
	animation-name: ewb-wobble;
	animation-duration: 1s;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
}

.ewb-whatsapp-button.elementor-animation-bounce:hover {
	animation-name: ewb-bounce;
	animation-duration: 0.6s;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
}

/* Prevenir que las animaciones por defecto interfieran */
.ewb-whatsapp-button:not([class*="elementor-animation-"]) {
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Estilos para mensajes de upgrade */
.ewb-upgrade-notice-wrapper {
	margin: 15px 0;
}

.ewb-upgrade-notice {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 20px;
	border-radius: 8px;
	text-align: center;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
	border: 2px solid #fff;
	position: relative;
	overflow: hidden;
}

.ewb-upgrade-notice::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
	animation: shine 2s infinite;
}

@keyframes shine {
	0% { left: -100%; }
	100% { left: 100%; }
}

.ewb-upgrade-notice p {
	margin: 0 0 15px 0;
	font-size: 14px;
	line-height: 1.5;
}

.ewb-upgrade-notice p:first-child {
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 10px;
}

.ewb-upgrade-notice .button {
	background: #fff !important;
	color: #667eea !important;
	border: 2px solid #fff !important;
	padding: 10px 20px !important;
	font-weight: bold !important;
	text-decoration: none !important;
	border-radius: 25px !important;
	transition: all 0.3s ease !important;
	display: inline-block !important;
}

.ewb-upgrade-notice .button:hover {
	background: transparent !important;
	color: #fff !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
}

/* Estilos para diferentes tamaños */
.ewb-whatsapp-button.elementor-size-xs {
	font-size: 12px;
	padding: 6px 12px;
	min-height: 32px;
}

.ewb-whatsapp-button.elementor-size-sm {
	font-size: 14px;
	padding: 8px 16px;
	min-height: 36px;
}

.ewb-whatsapp-button.elementor-size-md {
	font-size: 16px;
	padding: 12px 20px;
	min-height: 44px;
}

.ewb-whatsapp-button.elementor-size-lg {
	font-size: 18px;
	padding: 16px 24px;
	min-height: 52px;
}

.ewb-whatsapp-button.elementor-size-xl {
	font-size: 20px;
	padding: 20px 28px;
	min-height: 60px;
}

/* Animaciones de hover */
.ewb-whatsapp-button.elementor-animation-pulse:hover {
	animation: ewb-pulse 1s infinite;
}

.ewb-whatsapp-button.elementor-animation-bounce:hover {
	animation: ewb-bounce 1s infinite;
}

.ewb-whatsapp-button.elementor-animation-rubberBand:hover {
	animation: ewb-rubberBand 1s;
}

.ewb-whatsapp-button.elementor-animation-shake:hover {
	animation: ewb-shake 0.5s;
}

.ewb-whatsapp-button.elementor-animation-swing:hover {
	animation: ewb-swing 1s;
}

.ewb-whatsapp-button.elementor-animation-tada:hover {
	animation: ewb-tada 1s;
}

.ewb-whatsapp-button.elementor-animation-wobble:hover {
	animation: ewb-wobble 1s;
}

.ewb-whatsapp-button.elementor-animation-jello:hover {
	animation: ewb-jello 1s;
}

.ewb-whatsapp-button.elementor-animation-heartBeat:hover {
	animation: ewb-heartBeat 1.3s ease-in-out infinite;
}

/* Definiciones de animaciones */
@keyframes ewb-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

@keyframes ewb-bounce {
	0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
	40%, 43% { transform: translate3d(0,-8px,0); }
	70% { transform: translate3d(0,-4px,0); }
	90% { transform: translate3d(0,-2px,0); }
}

@keyframes ewb-rubberBand {
	0% { transform: scale(1); }
	30% { transform: scaleX(1.25) scaleY(0.75); }
	40% { transform: scaleX(0.75) scaleY(1.25); }
	60% { transform: scaleX(1.15) scaleY(0.85); }
	100% { transform: scale(1); }
}

@keyframes ewb-shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
	20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes ewb-swing {
	20% { transform: rotate(15deg); }
	40% { transform: rotate(-10deg); }
	60% { transform: rotate(5deg); }
	80% { transform: rotate(-5deg); }
	100% { transform: rotate(0deg); }
}

@keyframes ewb-tada {
	0% { transform: scale(1); }
	10%, 20% { transform: scale(0.9) rotate(-3deg); }
	30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
	40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
	100% { transform: scale(1) rotate(0); }
}

@keyframes ewb-wobble {
	0% { transform: translateX(0%); }
	15% { transform: translateX(-25%) rotate(-5deg); }
	30% { transform: translateX(20%) rotate(3deg); }
	45% { transform: translateX(-15%) rotate(-3deg); }
	60% { transform: translateX(10%) rotate(2deg); }
	75% { transform: translateX(-5%) rotate(-1deg); }
	100% { transform: translateX(0%); }
}

@keyframes ewb-jello {
	0%, 11.1%, 100% { transform: translate3d(0,0,0); }
	22.2% { transform: skewX(-12.5deg) skewY(-12.5deg); }
	33.3% { transform: skewX(6.25deg) skewY(6.25deg); }
	44.4% { transform: skewX(-3.125deg) skewY(-3.125deg); }
	55.5% { transform: skewX(1.5625deg) skewY(1.5625deg); }
	66.6% { transform: skewX(-0.78125deg) skewY(-0.78125deg); }
	77.7% { transform: skewX(0.390625deg) skewY(0.390625deg); }
	88.8% { transform: skewX(-0.1953125deg) skewY(-0.1953125deg); }
}

@keyframes ewb-heartBeat {
	0% { transform: scale(1); }
	14% { transform: scale(1.1); }
	28% { transform: scale(1); }
	42% { transform: scale(1.1); }
	70% { transform: scale(1); }
}





/* Responsive */
@media (max-width: 1024px) {
	.ewb-whatsapp-button {
		font-size: 14px;
		padding: 10px 20px;
	}
}

@media (max-width: 768px) {
	.ewb-whatsapp-button {
		font-size: 13px;
		padding: 8px 16px;
		min-height: 40px;
	}
	
	.ewb-whatsapp-button .ewb-icon {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.ewb-whatsapp-button {
		font-size: 12px;
		padding: 6px 12px;
		min-height: 36px;
	}
	
	.ewb-whatsapp-button .ewb-icon {
		font-size: 12px;
	}
	
	.ewb-whatsapp-button .ewb-icon-before {
		margin-right: 6px;
	}
	
	.ewb-whatsapp-button .ewb-icon-after {
		margin-left: 6px;
	}
}

/* Estilos para accesibilidad */
.ewb-whatsapp-button:focus-visible {
	outline: 2px solid #25D366;
	outline-offset: 2px;
}

/* Asegurar que las sombras de Elementor tengan prioridad */
.ewb-whatsapp-button[style*="box-shadow"] {
	box-shadow: var(--elementor-box-shadow) !important;
}

/* Estilos para modo oscuro (si el tema lo soporta) */
@media (prefers-color-scheme: dark) {
	.ewb-whatsapp-button {
		/* Las sombras se controlan desde Elementor */
	}
}

/* Estilos para reducir movimiento (preferencias de accesibilidad) */
@media (prefers-reduced-motion: reduce) {
	.ewb-whatsapp-button {
		transition: none;
	}
	
	.ewb-whatsapp-button:hover {
		transform: none;
	}
	
	.ewb-whatsapp-button.elementor-animation-* {
		animation: none;
	}
}




