/* woo_personalize preview — shared by the product page and the admin (README: Preview markup).
   Geometry comes only from the CSS variables set inline by jk_pz_preview_html(); colours only from
   theme variables (with light fallbacks for the admin), so dark.css needs no generated rule. */

.jk-pz-tv {
	--jk-pz-size: 190px;
	position: relative;
	box-sizing: border-box;
	width: var(--jk-pz-size);
	aspect-ratio: 1;
	overflow: hidden;
	/* 5px ring in the page's card colour, then a 1px hairline: both drawn INSIDE the box, so the
	   circle's outer edge is exactly --jk-pz-size and lines up with whatever sits next to it. */
	border: 5px solid var(--jk-tile, #fff);
	box-shadow: 0 0 0 1px var(--jk-line, #E2E2E5);
	background: #000;
	isolation: isolate;
}
.jk-pz-tv--circle { border-radius: 50%; }
.jk-pz-tv--rect { border-radius: var(--jk-r-thumb, 12px); aspect-ratio: auto; height: calc(var(--jk-pz-size) * .75); }

/* The photo: zoom x the preview width, its focus point (fx%, fy%) pinned at the preview centre. */
.jk-pz-tv::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 50%;
	top: 50%;
	width: calc(var(--jk-pz-zoom, 1) * 100%);
	aspect-ratio: var(--jk-pz-ar, 1.5);
	transform: translate(calc(var(--jk-pz-fx, 50) * -1%), calc(var(--jk-pz-fy, 50) * -1%));
	background: var(--jk-pz-img, none) center / 100% 100% no-repeat;
}

/* Text area: box.x/y/w/h % of the preview, turned by preview.rotate to follow the screen edges. */
.jk-pz-tv__scr {
	position: absolute;
	left: var(--jk-pz-bx, 0);
	top: var(--jk-pz-by, 0);
	width: var(--jk-pz-bw, 100%);
	height: var(--jk-pz-bh, 100%);
	transform: rotate(var(--jk-pz-rot, 0deg));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .12em;
	font-family: var(--jk-pz-font, monospace);
	font-size: var(--jk-pz-fs, 16px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: uppercase;
	white-space: pre;
	color: var(--jk-pz-color, #9DFF7E);
	text-align: center;
	pointer-events: none;
	user-select: none;
}
.jk-pz-tv__scr > span[hidden] { display: none; }
/* Phosphor, not neon: matched to the owner's photo of a real screen (2026-12-02, text pixels median
   #73AF66 on that photo, #75A86A here with the preset colour #8CCB78). Slightly see-through so the
   photo's texture shows, and striped like the scanlines that run through the real letters; the
   stripes are in em, so they scale with the text and turn with the box. */
.jk-pz-tv__scr {
	opacity: .9;
	-webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 .07em, rgb(0 0 0 / .55) .07em .11em);
	mask-image: repeating-linear-gradient(to bottom, #000 0 .07em, rgb(0 0 0 / .55) .07em .11em);
	filter: blur(.2px);
}
/* `glow`: a faint 2px halo only. A wide glow read as neon and promised a brighter screen than the
   product has. */
.jk-pz-tv--glow .jk-pz-tv__scr {
	text-shadow: 0 0 2px color-mix(in srgb, var(--jk-pz-color, #9DFF7E) 40%, transparent);
}
/* Nothing typed yet: a dim sample so the customer sees where the text goes. */
.jk-pz-tv__scr.is-empty::before {
	content: attr(data-empty);
	opacity: .35;
}
