/* xelikefx1 (03-11-2026, Mortimer: «dar mas color a lo que son el pintado de los likes … efectos muy coquetos»): the burst of
   static/js/likefx.js (the same file as on bascdao.com) when a news or comment like turns on, in the colours of the post's
   tribe (each card already sets --tribe-primary-bright / --tribe-accent to its tribe, on the hub and on each tribe) and
   in pieces of that tribe: Earth leaves, Fire embers, Water drops, Air stars, Aether sparks. Classes lfx-* only. */
:root { --lk-1: #7be8ff; --lk-2: #ffd166; --lk-3: #ffffff; }
.news-card { --lk-1: var(--tribe-primary-bright, #7be8ff); --lk-2: var(--tribe-accent, #ffd166); --lk-3: var(--tribe-primary-soft, #ffffff); }
.lfx-pop i.fa-heart { display: inline-block; animation: lfx-pop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); }

/* ---- the pop of the heart ---- */
.lfx-pop svg { animation: lfx-pop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); transform-origin: 50% 55%; }
@keyframes lfx-pop { 0% { transform: scale(0.6); } 45% { transform: scale(1.38); } 70% { transform: scale(0.92); } 100% { transform: scale(1); } }

/* ---- the burst (fixed, over everything, never in the way) ---- */
.lfx { position: fixed; z-index: 2147482000; width: 0; height: 0; pointer-events: none; contain: layout style; }
.lfx-p { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; display: block; opacity: 0;
    animation: lfx-fly 0.75s cubic-bezier(0.15, 0.7, 0.3, 1) forwards; will-change: transform, opacity; }
@keyframes lfx-fly {
    0% { opacity: 0; transform: translate(0, 0) scale(0.3) rotate(0deg); }
    15% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(var(--s, 1)) rotate(var(--r, 0deg)); }
}
svg.lfx-p { width: 12px; height: 12px; left: -6px; top: -6px; overflow: visible; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--lk-1) 60%, transparent)); }
.lfx-p--gold, .lfx-p--spark { width: 6px; height: 6px; left: -3px; top: -3px; border-radius: 50%; background: var(--c);
    box-shadow: 0 0 6px 1px var(--c), 0 0 12px color-mix(in srgb, var(--c) 50%, transparent); }
.lfx--gold .lfx-p--gold { background: #fde68a; box-shadow: 0 0 6px 1px #fbbf24, 0 0 12px rgba(251, 191, 36, 0.6); }
.lfx-p--star { width: 11px; height: 11px; left: -5.5px; top: -5.5px; background: var(--c);
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 3px var(--c)); }
.lfx-p--bolt { width: 8px; height: 13px; left: -4px; top: -6.5px; background: #fef08a;
    clip-path: polygon(55% 0, 0 58%, 42% 58%, 30% 100%, 100% 38%, 58% 38%, 75% 0); filter: drop-shadow(0 0 4px #facc15); }
.lfx-p--leaf { width: 10px; height: 10px; left: -5px; top: -5px; border-radius: 0 100% 0 100%; background: linear-gradient(135deg, #4ade80, #15803d); }
.lfx-p--banana { width: 12px; height: 12px; left: -6px; top: -6px; border-radius: 50%; border-bottom: 4px solid #facc15;
    border-left: 1px solid transparent; border-right: 1px solid transparent; box-sizing: border-box; }
.lfx-p--ember { width: 6px; height: 6px; left: -3px; top: -3px; border-radius: 50%; background: #fdba74;
    box-shadow: 0 0 6px 2px #f97316, 0 0 14px rgba(239, 68, 68, 0.6); }
.lfx-p--drop { width: 7px; height: 10px; left: -3.5px; top: -5px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
    background: linear-gradient(180deg, #bae6fd, #3b82f6); box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); }
.lfx-ring { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; display: block; opacity: 0;
    border: 2px solid var(--lk-1); box-shadow: 0 0 10px color-mix(in srgb, var(--lk-1) 60%, transparent);
    animation: lfx-ring 0.7s ease-out forwards; }
.lfx--t4 .lfx-ring { border-color: var(--lk-2); }
@keyframes lfx-ring { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(2.6); } }
.lfx-flash { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; display: block;
    background: radial-gradient(circle, color-mix(in srgb, var(--lk-1) 55%, transparent), transparent 70%);
    animation: lfx-flash 0.5s ease-out forwards; }
.lfx--legend .lfx-flash { background: radial-gradient(circle, rgba(253, 230, 138, 0.75), rgba(244, 114, 182, 0.3) 45%, transparent 72%); }
@keyframes lfx-flash { 0% { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.8); } }
@media (prefers-reduced-motion: reduce) { .lfx-pop svg, .lfx-pop i.fa-heart { animation: none; } .lfx { display: none; } }
