/* Compartir. Especificidad baja: los controles de Elementor ({{WRAPPER}}) siempre ganan. */

.wzpy-share-wrap {
	display: flex;
	justify-content: flex-start;
}

.wzpy-share {
	--wzpy-share-duration: 250ms;
	--wzpy-share-offset: 8px;
	--wzpy-share-x: 0;
	--wzpy-share-y: -12px;
	position: relative;
	display: inline-flex;
}

.wzpy-share__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	min-height: 40px; /* el tema fuerza height en <button>: usar min-height */
	padding: 0 12px;
	border: 0;
	border-radius: 999px;
	background: #ff6500;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 200ms, color 200ms;
}

.wzpy-share__trigger svg,
.wzpy-share__link svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------- Lista ---------- */

.wzpy-share__list {
	position: absolute;
	z-index: 50;
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear var(--wzpy-share-duration);
}

/* Puente invisible sobre la distancia al botón: el hover no se corta al cruzarla. */
.wzpy-share__list::before {
	content: '';
	position: absolute;
	inset: calc(var(--wzpy-share-offset) * -1);
	z-index: -1;
}

.wzpy-share--dir-down .wzpy-share__list { top: calc(100% + var(--wzpy-share-offset)); left: 0; }
.wzpy-share--dir-up .wzpy-share__list { bottom: calc(100% + var(--wzpy-share-offset)); left: 0; }
.wzpy-share--dir-left .wzpy-share__list { right: calc(100% + var(--wzpy-share-offset)); top: 50%; transform: translateY(-50%); }
.wzpy-share--dir-right .wzpy-share__list { left: calc(100% + var(--wzpy-share-offset)); top: 50%; transform: translateY(-50%); }

/* Desde dónde entran los elementos (Deslizar / Cascada). */
.wzpy-share--dir-up .wzpy-share { --wzpy-share-y: 12px; }
.wzpy-share--dir-left .wzpy-share { --wzpy-share-x: 12px; --wzpy-share-y: 0; }
.wzpy-share--dir-right .wzpy-share { --wzpy-share-x: -12px; --wzpy-share-y: 0; }

/* Abierta: por clic (.is-open) o por hover/foco. */
.wzpy-share.is-open .wzpy-share__list,
.wzpy-share--open-hover .wzpy-share:hover .wzpy-share__list,
.wzpy-share--open-hover .wzpy-share:focus-within .wzpy-share__list {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

/* ---------- Redes ---------- */

.wzpy-share__item {
	opacity: 0;
	transition: opacity var(--wzpy-share-duration) ease, transform var(--wzpy-share-duration) cubic-bezier(.2, .8, .3, 1.2);
}

.wzpy-share.is-open .wzpy-share__item,
.wzpy-share--open-hover .wzpy-share:hover .wzpy-share__item,
.wzpy-share--open-hover .wzpy-share:focus-within .wzpy-share__item {
	opacity: 1;
	transform: none;
}

/* 1. Aparecer: solo opacidad (base). */
/* 2. Deslizar */
.wzpy-share--anim-slide .wzpy-share__item { transform: translate(var(--wzpy-share-x), var(--wzpy-share-y)); }
/* 3. Zoom */
.wzpy-share--anim-zoom .wzpy-share__item { transform: scale(.3); }
/* 4. Cascada: desliza uno tras otro (el retraso solo al abrir, al cerrar se van juntos). */
.wzpy-share--anim-cascade .wzpy-share__item { transform: translate(calc(var(--wzpy-share-x) * 2), calc(var(--wzpy-share-y) * 2)) scale(.8); }
.wzpy-share--anim-cascade .is-open .wzpy-share__item,
.wzpy-share--anim-cascade.wzpy-share--open-hover .wzpy-share:hover .wzpy-share__item,
.wzpy-share--anim-cascade.wzpy-share--open-hover .wzpy-share:focus-within .wzpy-share__item { transition-delay: calc(var(--i) * 60ms); }
/* 5. Girar */
.wzpy-share--anim-flip .wzpy-share__list { perspective: 400px; }
.wzpy-share--anim-flip .wzpy-share__item { transform: rotateY(90deg); }

@media (prefers-reduced-motion: reduce) {
	.wzpy-share__item { transform: none !important; transition-property: opacity; transition-delay: 0s !important; }
}

.wzpy-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 40px;
	min-height: 40px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #555;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 200ms, color 200ms, filter 200ms;
}

.wzpy-share__link:hover {
	color: #fff;
	filter: brightness(1.1);
}

.wzpy-share__link--whatsapp { background: #25d366; }
.wzpy-share__link--facebook { background: #1877f2; }
.wzpy-share__link--x { background: #000; }
.wzpy-share__link--telegram { background: #229ed9; }
.wzpy-share__link--linkedin { background: #0a66c2; }
.wzpy-share__link--pinterest { background: #e60023; }

.wzpy-share__label {
	display: none;
	font-size: 14px;
	font-weight: 600;
}

.wzpy-share--labels-yes .wzpy-share__label { display: inline; }
.wzpy-share--labels-yes .wzpy-share__link { justify-content: flex-start; padding: 0 14px; }

/* ---------- Enlace copiado ---------- */

.wzpy-share__copied {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	z-index: 60;
	padding: 4px 10px;
	border-radius: 4px;
	background: #222;
	color: #fff;
	font-size: 12px;
	white-space: nowrap;
	transform: translateX(-50%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 200ms;
}

.wzpy-share__copied.is-visible { opacity: 1; }
