/* Lo Que Buscas Bar — barra dentro del artículo */

.lqb-wrap {
	--lqb-c1: #6d28d9;
	--lqb-c2: #db2777;
	--lqb-tx: #ffffff;
	--lqb-bb: #ffffff;
	--lqb-bt: #111827;
	--lqb-r: 18px;
	--lqb-w: 720px;
	--lqb-k: 1; /* tamaño elegido */
	--lqb-m: 1; /* ajuste en móvil */
	--lqb-s: calc(var(--lqb-k) * var(--lqb-m));
	--lqb-depth: 7px;
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	clear: both;
	width: 100%;
	max-width: var(--lqb-w);
	margin: 34px auto 40px;
	padding: 0;
}

.lqb-wrap.lqb-sm { --lqb-k: 0.86; }
.lqb-wrap.lqb-lg { --lqb-k: 1.16; }

.lqb-wrap *,
.lqb-wrap *::before,
.lqb-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Barra ---------- */

.lqb-wrap .lqb-bar {
	--lqb-p: 0;
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	gap: calc(16px * var(--lqb-s));
	min-height: calc(88px * var(--lqb-s));
	margin: 0;
	padding: calc(17px * var(--lqb-s)) calc(22px * var(--lqb-s));
	overflow: hidden;
	border-radius: var(--lqb-r);
	border: 1px solid rgba(255, 255, 255, 0.24);
	color: var(--lqb-tx);
	background:
		radial-gradient(120% 150% at 0% 0%, rgba(255, 255, 255, 0.26), transparent 46%),
		linear-gradient(115deg, var(--lqb-c1) 0%, var(--lqb-c2) 50%, var(--lqb-c1) 100%);
	background-size: 100% 100%, 220% 100%;
	background-position: 0 0, 0% 50%;
	box-shadow:
		0 24px 44px -22px var(--lqb-c1),
		0 12px 26px -14px var(--lqb-c2),
		0 2px 6px rgba(0, 0, 0, 0.12),
		inset 0 1px 0 rgba(255, 255, 255, 0.34),
		inset 0 -10px 18px -12px rgba(0, 0, 0, 0.28);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.25;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.14s ease, filter 0.2s ease;
}

.lqb-wrap .lqb-bar.lqb-anim {
	animation: lqb-flow 7s ease-in-out infinite alternate;
}

/* Textura de puntos a la derecha */
.lqb-wrap .lqb-bar::after {
	content: "";
	position: absolute;
	z-index: 0;
	top: 0;
	right: 0;
	bottom: 0;
	width: 55%;
	background: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.6px) 0 0 / 13px 13px;
	-webkit-mask-image: linear-gradient(to left, #000, transparent);
	mask-image: linear-gradient(to left, #000, transparent);
	pointer-events: none;
}

/* Brillo que recorre la barra */
.lqb-wrap .lqb-bar.lqb-anim::before {
	content: "";
	position: absolute;
	z-index: 2;
	top: 0;
	bottom: 0;
	left: -45%;
	width: 30%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34), transparent);
	transform: skewX(-20deg);
	pointer-events: none;
	animation: lqb-shine 3.4s ease-in-out infinite;
}

.lqb-wrap .lqb-bar:hover {
	transform: translateY(-2px);
	filter: saturate(1.1) brightness(1.03);
}

.lqb-wrap .lqb-bar:active {
	transform: scale(0.985);
}

.lqb-wrap .lqb-bar:focus-visible {
	outline: 3px solid var(--lqb-c2);
	outline-offset: 4px;
}

/* ---------- Efecto 3D: la barra se hunde ---------- */

.lqb-wrap.lqb-3d::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 0;
	right: 0;
	top: var(--lqb-depth);
	bottom: calc(var(--lqb-depth) * -1);
	border-radius: var(--lqb-r);
	background: linear-gradient(115deg, var(--lqb-c1), var(--lqb-c2));
	filter: brightness(0.6) saturate(1.1);
	box-shadow: 0 20px 34px -16px var(--lqb-c1), 0 10px 20px -12px var(--lqb-c2);
}

.lqb-wrap.lqb-3d .lqb-bar {
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.36),
		inset 0 -10px 18px -12px rgba(0, 0, 0, 0.3);
}

.lqb-wrap.lqb-3d .lqb-bar:active {
	transform: translateY(calc(var(--lqb-depth) - 1px));
}

/* ---------- Progreso ---------- */

.lqb-wrap .lqb-fill {
	position: absolute;
	z-index: 0;
	top: 0;
	bottom: 0;
	left: 0;
	width: calc(var(--lqb-p) * 100%);
	background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.26) 0 14px, rgba(255, 255, 255, 0.12) 14px 28px);
	background-size: 39.6px 100%;
	border-right: 2px solid rgba(255, 255, 255, 0.55);
	opacity: 0;
	transition: width 0.12s linear, opacity 0.3s ease;
	pointer-events: none;
}

.lqb-wrap .lqb-line {
	position: absolute;
	z-index: 1;
	left: 0;
	bottom: 0;
	width: calc(var(--lqb-p) * 100%);
	height: 4px;
	background: currentColor;
	opacity: 0;
	transition: width 0.12s linear, opacity 0.3s ease;
	pointer-events: none;
}

/* ---------- Icono ---------- */

.lqb-wrap .lqb-icon {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: calc(52px * var(--lqb-s));
	height: calc(52px * var(--lqb-s));
	border-radius: calc(16px * var(--lqb-s));
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.34);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.lqb-wrap .lqb-icon:empty {
	display: none;
}

.lqb-wrap .lqb-icon svg {
	display: block;
	width: 46%;
	height: 46%;
}

.lqb-wrap .lqb-anim .lqb-icon {
	animation: lqb-pulse 2.2s ease-out infinite;
}

/* ---------- Textos ---------- */

.lqb-wrap .lqb-copy {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.lqb-wrap .lqb-title {
	display: block;
	margin: 0;
	font-size: calc(22px * var(--lqb-s));
	font-weight: 900;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.16), 0 1px 10px rgba(0, 0, 0, 0.16);
	overflow-wrap: anywhere;
}

.lqb-wrap .lqb-sub {
	display: block;
	margin: 0;
	font-size: calc(14px * var(--lqb-s));
	font-weight: 500;
	opacity: 0.92;
	font-variant-numeric: tabular-nums;
}

.lqb-wrap .lqb-sub:empty {
	display: none;
}

/* ---------- Lado derecho: botón o contador ---------- */

.lqb-wrap .lqb-action {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.lqb-wrap .lqb-cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: calc(12px * var(--lqb-s)) calc(22px * var(--lqb-s));
	border-radius: 999px;
	background: var(--lqb-bb);
	color: var(--lqb-bt);
	font-size: calc(15px * var(--lqb-s));
	font-weight: 800;
	letter-spacing: 0.02em;
	white-space: nowrap;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.lqb-wrap .lqb-cta[hidden] {
	display: none;
}

.lqb-wrap .lqb-anim .lqb-cta::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 0 0 0 var(--lqb-bb);
	opacity: 0.7;
	animation: lqb-halo-sm 1.9s ease-out infinite;
	pointer-events: none;
}

.lqb-wrap .lqb-cta svg {
	display: block;
	width: 15px;
	height: 15px;
	transition: transform 0.2s ease;
}

.lqb-wrap .lqb-bar:hover .lqb-cta svg {
	transform: translateX(4px);
}

.lqb-wrap .lqb-timer {
	position: relative;
	display: none;
	place-items: center;
	width: calc(58px * var(--lqb-s));
	height: calc(58px * var(--lqb-s));
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.14);
}

.lqb-wrap .lqb-dial {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.lqb-wrap .lqb-dial circle {
	fill: none;
	stroke-width: 4;
}

.lqb-wrap .lqb-track {
	stroke: currentColor;
	opacity: 0.25;
}

.lqb-wrap .lqb-ring {
	stroke: currentColor;
	stroke-linecap: round;
	stroke-dasharray: 125.66;
	stroke-dashoffset: 125.66;
	transition: stroke-dashoffset 0.12s linear;
}

.lqb-wrap .lqb-num {
	position: relative;
	font-size: calc(20px * var(--lqb-s));
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}

.lqb-wrap .lqb-num.lqb-tick {
	animation: lqb-tick 0.32s ease-out;
}

.lqb-wrap .lqb-check {
	position: relative;
	display: none;
	width: 46%;
	height: 46%;
}

.lqb-wrap .lqb-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Estado: generando ---------- */

.lqb-wrap .lqb-bar.is-counting,
.lqb-wrap .lqb-bar.is-done {
	cursor: default;
	transform: none;
	filter: none;
}

.lqb-wrap.lqb-3d .lqb-bar.is-counting {
	transform: translateY(calc(var(--lqb-depth) - 2px)); /* se queda hundida mientras genera */
}

.lqb-wrap .lqb-bar.is-counting::before,
.lqb-wrap .lqb-bar.is-done::before {
	display: none;
}

.lqb-wrap .is-counting .lqb-icon,
.lqb-wrap .is-done .lqb-icon {
	animation: none;
}

.lqb-wrap .is-counting .lqb-cta,
.lqb-wrap .is-done .lqb-cta {
	display: none;
}

.lqb-wrap .is-counting .lqb-timer,
.lqb-wrap .is-done .lqb-timer {
	display: grid;
	animation: lqb-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

.lqb-wrap .is-counting .lqb-fill {
	opacity: 1;
	animation: lqb-stripes 0.9s linear infinite;
}

.lqb-wrap .is-counting .lqb-line,
.lqb-wrap .is-done .lqb-line {
	opacity: 0.95;
}

.lqb-wrap .is-counting .lqb-title {
	font-size: calc(18px * var(--lqb-s));
	letter-spacing: 0.02em;
	text-transform: none;
	animation: lqb-breathe 1.4s ease-in-out infinite;
}

/* ---------- Estado: terminado ---------- */

.lqb-wrap .lqb-bar.is-done {
	cursor: pointer;
}

.lqb-wrap .is-done .lqb-num {
	display: none;
}

.lqb-wrap .is-done .lqb-check {
	display: block;
}

.lqb-wrap .is-done .lqb-title {
	font-size: calc(19px * var(--lqb-s));
	letter-spacing: 0.02em;
	text-transform: none;
}

/* ---------- Estado: lista para hundir ---------- */

.lqb-wrap .lqb-bar.is-ready {
	animation: lqb-rise 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5), lqb-ready 1.5s ease-in-out 0.5s infinite;
}

.lqb-wrap .lqb-bar.is-ready:hover {
	filter: saturate(1.14) brightness(1.06);
}

.lqb-wrap .lqb-bar.is-ready:active {
	animation: none;
	transform: scale(0.985);
}

.lqb-wrap.lqb-3d .lqb-bar.is-ready:active {
	transform: translateY(calc(var(--lqb-depth) - 1px));
}

.lqb-wrap .is-ready .lqb-title {
	font-size: calc(21px * var(--lqb-s));
	letter-spacing: 0.01em;
}

.lqb-wrap .is-ready .lqb-timer {
	background: var(--lqb-bb);
	color: var(--lqb-bt);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.lqb-wrap .is-ready .lqb-dial {
	display: none;
}

.lqb-wrap .is-ready .lqb-cta:not([hidden]) {
	display: inline-flex;
	animation: lqb-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

.lqb-wrap .is-ready .lqb-cta:not([hidden]) + .lqb-timer {
	display: none;
}

/* Onda que sale de la barra cuando está lista */
.lqb-wrap.lqb-ready::after {
	content: "";
	position: absolute;
	z-index: -2;
	inset: 0;
	border-radius: var(--lqb-r);
	box-shadow: 0 0 0 0 var(--lqb-c2);
	opacity: 0;
	animation: lqb-halo 1.5s ease-out 0.4s infinite;
	pointer-events: none;
}

/* Chispas al terminar */
.lqb-wrap .lqb-sparks {
	position: absolute;
	z-index: 3;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	pointer-events: none;
}

.lqb-wrap .lqb-sparks i {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--sz, 8px);
	height: var(--sz, 8px);
	margin: calc(var(--sz, 8px) / -2);
	border-radius: 2px;
	background: #fff;
	opacity: 0;
	animation: lqb-spark 0.95s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

.lqb-wrap .lqb-sparks .lqb-sp1 {
	border-radius: 50%;
	background: var(--lqb-c2);
}

.lqb-wrap .lqb-sparks .lqb-sp2 {
	background: #ffd84d;
}

.lqb-wrap .lqb-sparks .lqb-sp3 {
	border-radius: 50%;
	background: var(--lqb-c1);
}

/* ---------- Aviso solo para el administrador y enlace sin JavaScript ---------- */

.lqb-hint {
	margin: 24px 0;
	padding: 12px 16px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	color: #1d2327;
	font-size: 14px;
}

.lqb-wrap .lqb-nojs {
	display: block;
	margin-top: 16px;
	text-align: center;
	font-weight: 700;
}

/* ---------- Animaciones ---------- */

@keyframes lqb-flow {
	from { background-position: 0 0, 0% 50%; }
	to { background-position: 0 0, 100% 50%; }
}

@keyframes lqb-shine {
	0%, 50% { left: -45%; }
	100% { left: 125%; }
}

@keyframes lqb-pulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
	70%, 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

@keyframes lqb-halo-sm {
	0% { box-shadow: 0 0 0 0 var(--lqb-bb); opacity: 0.6; }
	70%, 100% { box-shadow: 0 0 0 12px var(--lqb-bb); opacity: 0; }
}

@keyframes lqb-halo {
	0% { box-shadow: 0 0 0 0 var(--lqb-c2); opacity: 0.6; }
	80%, 100% { box-shadow: 0 0 0 20px var(--lqb-c2); opacity: 0; }
}

@keyframes lqb-stripes {
	from { background-position: 0 0; }
	to { background-position: 39.6px 0; }
}

@keyframes lqb-breathe {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.72; }
}

@keyframes lqb-tick {
	0% { transform: scale(1.45); }
	100% { transform: scale(1); }
}

@keyframes lqb-pop {
	from { transform: scale(0.6); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@keyframes lqb-rise {
	0% { transform: translateY(5px); }
	60% { transform: translateY(-6px); }
	100% { transform: translateY(0); }
}

@keyframes lqb-ready {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

@keyframes lqb-spark {
	0% { transform: translate(0, 0) rotate(0) scale(0.4); opacity: 1; }
	70% { opacity: 1; }
	100% { transform: translate(var(--dx), var(--dy)) rotate(260deg) scale(1); opacity: 0; }
}

/* ---------- Móvil ---------- */

@media (max-width: 560px) {
	.lqb-wrap {
		--lqb-m: 0.82;
		--lqb-depth: 6px;
		margin: 26px auto 32px;
	}

	.lqb-wrap .lqb-bar {
		gap: 11px;
		padding-left: 15px;
		padding-right: 13px;
	}

	.lqb-wrap .lqb-title {
		letter-spacing: 0.04em;
	}

	.lqb-wrap .lqb-cta svg {
		display: none;
	}
}

@media (max-width: 360px) {
	.lqb-wrap .lqb-icon {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lqb-wrap .lqb-bar,
	.lqb-wrap .lqb-bar::before,
	.lqb-wrap .lqb-icon,
	.lqb-wrap .lqb-timer,
	.lqb-wrap .lqb-title,
	.lqb-wrap .lqb-fill,
	.lqb-wrap .lqb-num,
	.lqb-wrap .lqb-cta::after,
	.lqb-wrap.lqb-ready::after {
		animation: none !important;
	}

	.lqb-wrap .lqb-bar.lqb-anim::before,
	.lqb-wrap .lqb-sparks {
		display: none;
	}
}
