/* efraim-effects – kurzor, magnet, menu, karty.
   Hodnoty proměnných nastavuje fx-vars.js podle Nastavení → Efekty. */
:root {
	--fx-primary: #A8E63C; --fx-second: #8DDC7C;
	--fx-ring-color: #F4F4F0; --fx-dot-color: #A8E63C; --fx-light-ring: #0A0A0A;
	--fx-dot: 7px; --fx-border: 1.5px; --fx-gap: 10px;
	--fx-o-radius: 0px; --fx-o-rot: 0deg; --fx-i-radius: 0px; --fx-i-rot: 0deg;
	--fx-card-size: 96px; --fx-card-radius: 0px; --fx-card-rot: 0deg;
	/* nad odkazem (h) a nad tlačítkem (b) */
	--fx-h-rot: 90deg; --fx-h-base-rot: var(--fx-o-rot); --fx-h-radius: var(--fx-o-radius); --fx-h-grow: 5px;
	--fx-h-border: var(--fx-border); --fx-h-border-color: var(--fx-ring-color); --fx-h-bg: transparent; --fx-h-anim: none; --fx-h-dot-scale: 1;
	--fx-b-rot: 0deg; --fx-b-base-rot: var(--fx-o-rot); --fx-b-radius: var(--fx-o-radius); --fx-b-grow: 8px;
	--fx-b-border: var(--fx-border); --fx-b-border-color: var(--fx-ring-color); --fx-b-bg: transparent; --fx-b-anim: none; --fx-b-dot-scale: 1;
}

/* ---------- Kurzor ---------- */
.fx-cursor { display: none; }
html.fx-on .fx-cursor { display: block; }
/* systémový kurzor schovat všude (i na vnitřních prvcích tlačítek z jiných témat), kromě textových polí */
html.fx-on, html.fx-on *, html.fx-on *::before, html.fx-on *::after { cursor: none !important; }
html.fx-on input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.fx-on textarea, html.fx-on [contenteditable="true"] { cursor: text !important; }
html.fx-on select { cursor: default !important; }

.fx-ring, .fx-dot { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 99999; }
.fx-ring-in {
	--fx-size: calc(var(--fx-dot) + 2 * var(--fx-gap) + 2 * var(--fx-border));
	position: absolute; left: 0; top: 0; width: var(--fx-size); height: var(--fx-size); box-sizing: border-box;
	border: var(--fx-border) solid var(--fx-ring-color); border-radius: var(--fx-o-radius); background: transparent;
	transform: translate(-50%, -50%) rotate(var(--fx-o-rot));
	transition: width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1), transform .45s cubic-bezier(.2,.8,.2,1), background-color .3s, border-color .3s, border-width .3s, opacity .25s, border-radius .3s;
}
.fx-dot-in {
	position: absolute; left: 0; top: 0; width: var(--fx-dot); height: var(--fx-dot);
	background: var(--fx-c, var(--fx-dot-color)); border-radius: var(--fx-i-radius);
	transform: translate(-50%, -50%) rotate(var(--fx-i-rot));
	transition: opacity .2s, transform .35s cubic-bezier(.2,.8,.2,1), background-color .3s;
}
.fx-label {
	position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.8); opacity: 0; white-space: nowrap;
	font-family: var(--wp--preset--font-family--helvetica, 'Helvetica Neue', Helvetica, Arial, sans-serif); font-size: 11px; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase; color: #0A0A0A; transition: opacity .2s, transform .35s cubic-bezier(.2,.8,.2,1);
}

/* nad odkazem */
html.fx-m-link .fx-ring-in, .fx-prev--link .fx-ring-in {
	--fx-size: calc(var(--fx-dot) + 2 * (var(--fx-gap) + var(--fx-h-grow)) + 2 * var(--fx-h-border));
	border-width: var(--fx-h-border); border-color: var(--fx-h-border-color); background: var(--fx-h-bg); border-radius: var(--fx-h-radius);
	transform: translate(-50%, -50%) rotate(calc(var(--fx-h-base-rot) + var(--fx-h-rot))); animation: var(--fx-h-anim);
}
html.fx-m-link .fx-dot-in, .fx-prev--link .fx-dot-in {
	background: var(--fx-h-dot, var(--fx-c, var(--fx-dot-color)));
	transform: translate(-50%, -50%) rotate(calc(var(--fx-i-rot) - var(--fx-h-rot))) scale(var(--fx-h-dot-scale));
}

/* nad tlačítkem */
html.fx-m-btn .fx-ring-in, .fx-prev--btn .fx-ring-in {
	--fx-size: calc(var(--fx-dot) + 2 * (var(--fx-gap) + var(--fx-b-grow)) + 2 * var(--fx-b-border));
	border-width: var(--fx-b-border); border-color: var(--fx-b-border-color); background: var(--fx-b-bg); border-radius: var(--fx-b-radius);
	transform: translate(-50%, -50%) rotate(calc(var(--fx-b-base-rot) + var(--fx-b-rot))); animation: var(--fx-b-anim);
}
html.fx-m-btn .fx-dot-in, .fx-prev--btn .fx-dot-in {
	background: var(--fx-b-dot, var(--fx-c, var(--fx-dot-color)));
	transform: translate(-50%, -50%) rotate(calc(var(--fx-i-rot) - var(--fx-b-rot))) scale(var(--fx-b-dot-scale));
}

/* automatické přizpůsobení pozadí (dá se vypnout zvlášť pro odkazy a tlačítka) */
html.fx-m-onfill .fx-dot-in, .fx-prev--fill .fx-dot-in { background: #0A0A0A; }
html.fx-m-onlight .fx-ring-in, .fx-prev--light .fx-ring-in { border-color: var(--fx-light-ring); }

/* nad kartou: vyplněný tvar s popiskem */
html.fx-m-label .fx-ring-in, .fx-prev--label .fx-ring-in {
	--fx-size: var(--fx-card-size); border-color: transparent; background: var(--fx-c, var(--fx-primary));
	border-radius: var(--fx-card-radius); transform: translate(-50%, -50%) rotate(var(--fx-card-rot)); animation: none;
}
html.fx-m-label .fx-label, .fx-prev--label .fx-label { opacity: 1; transform: translate(-50%, -50%) scale(1); transition-delay: .08s; }
html.fx-m-label .fx-dot-in, .fx-prev--label .fx-dot-in { opacity: 0; }

/* ruka s prstem (nad odkazem / tlačítkem, když je zapnutá) */
.fx-hand {
	position: absolute; left: 0; top: 0; width: var(--fx-hand-size, 24px); line-height: 0; opacity: 0; pointer-events: none;
	transform: translate(calc(-1 * var(--fx-hand-tx, 15%)), calc(-1 * var(--fx-hand-ty, 2%))) scale(.5); transform-origin: var(--fx-hand-tx, 15%) var(--fx-hand-ty, 2%);
	transition: opacity .2s, transform .3s cubic-bezier(.2,.8,.2,1);
}
.fx-hand svg { display: block; width: 100%; height: auto; overflow: visible; }
.fx-hand__body { fill: var(--fx-hand-fill, #F4F4F0); stroke: var(--fx-hand-fill, #F4F4F0); stroke-width: .12; }
.fx-hand__line { fill: var(--fx-hand-stroke, #0A0A0A); }
/* vzhledy: oblá a hranatá (obrys tahem), jen linka (světlá linka s tmavým lemem) */
.fx-hand[data-style="obla"] .fx-hand__body { stroke: var(--fx-hand-stroke, #0A0A0A); stroke-width: 1.4; stroke-linejoin: round; paint-order: stroke; }
.fx-hand[data-style="hranata"] .fx-hand__body { stroke: var(--fx-hand-stroke, #0A0A0A); stroke-width: 1.4; stroke-linejoin: miter; paint-order: stroke; }
.fx-hand[data-style="hranata"] .fx-hand__line { fill: none; stroke: var(--fx-hand-stroke, #0A0A0A); stroke-width: 1.2; stroke-linecap: square; }
.fx-hand[data-style="linka"] .fx-hand__halo { fill: none; stroke: var(--fx-hand-stroke, #0A0A0A); stroke-width: 3.4; stroke-linejoin: round; }
.fx-hand[data-style="linka"] .fx-hand__body { fill: none; stroke: var(--fx-hand-fill, #F4F4F0); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
/* ruka místo čtverečku: špička prstu přesně na místě myši */
html.fx-i-ruka .fx-hand, .fx-prev.fx-i-ruka .fx-hand { opacity: 1; transform: translate(calc(-1 * var(--fx-hand-tx, 15%)), calc(-1 * var(--fx-hand-ty, 2%))) scale(1); }
html.fx-i-ruka .fx-ring-in, html.fx-i-ruka .fx-dot-in, .fx-prev.fx-i-ruka .fx-ring-in, .fx-prev.fx-i-ruka .fx-dot-in { opacity: 0; }
/* ruka ve čtverečku: ruka uprostřed vnějšího tvaru */
html.fx-i-box .fx-hand, .fx-prev.fx-i-box .fx-hand { opacity: 1; transform: translate(-50%, -50%) scale(1); }
html.fx-i-box .fx-dot-in, .fx-prev.fx-i-box .fx-dot-in { opacity: 0; }

html.fx-m-hide .fx-ring-in, html.fx-m-hide .fx-dot-in, html.fx-m-out .fx-ring-in, html.fx-m-out .fx-dot-in, html.fx-m-out .fx-label { opacity: 0; }
html.fx-m-down .fx-ring-in { --fx-size: calc(var(--fx-dot) + 4px + 2 * var(--fx-border)); }
@keyframes fx-pulse { from { scale: 1; } to { scale: 1.18; } }

/* ---------- Menu: podbarvení, které jezdí za položkou ---------- */
.fx-nav-host { position: relative; }
.fx-pill {
	position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; box-sizing: border-box; pointer-events: none; opacity: 0; z-index: 0;
	background: color-mix(in srgb, var(--fx-second) 14%, transparent); border: 1px solid color-mix(in srgb, var(--fx-second) 38%, transparent);
	transition: left .35s cubic-bezier(.2,.8,.2,1), top .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1), opacity .25s;
}
.fx-nav-host > li { position: relative; z-index: 1; }

/* ---------- Magnetická tlačítka ---------- */
.fx-mag { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, background-color .25s !important; will-change: transform; }
html.fx-glow .fx-mag:hover { box-shadow: 0 14px 44px -10px var(--c, var(--fx-second)); }

/* ---------- Karty: světlo pod myší a zvednutí ---------- */
.fx-spot { position: relative; isolation: isolate; }
.fx-spot::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s;
	background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--fx-second)) 16%, transparent), transparent 62%);
}
.fx-spot:hover::before { opacity: 1; }
html.fx-lift .ef-card.fx-spot:hover, html.fx-lift .is-style-karta.fx-spot:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c, var(--fx-second)) 55%, transparent) !important; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }

@media (hover: none), (pointer: coarse) {
	.fx-cursor, .fx-pill { display: none !important; }
	html.fx-on, html.fx-on * { cursor: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
	.fx-cursor, .fx-pill { display: none !important; }
	html.fx-on, html.fx-on * { cursor: auto !important; }
	.fx-spot::before { display: none; }
}
