/* "Living portrait" (assets/js/gadgets/avatar.js): a WebGL canvas laid over the
   profile photo, a 2D canvas above it for the weather (petals, rain, snow,
   leaves), a tiny caption that names the mode after a double-click, and a seat
   on the top edge for the navbar cat. None of them takes pointer events, so
   hover, tilt and click all still reach the image underneath. */

.gavatar-canvas,
.gavatar-fx {
	position: absolute;
	display: block;
	pointer-events: none;
	opacity: 0;
	transition: opacity 900ms ease;
	z-index: 1;
}

.gavatar-fx {
	z-index: 2;
}

.gavatar-canvas.is-on,
.gavatar-fx.is-on {
	opacity: 1;
}

/* Mode name, lower-left corner of the photo; top is set to the photo's bottom
   edge minus a gutter, so the pill is pulled up by its own height. */
.gavatar-cap {
	position: absolute;
	z-index: 3;
	transform: translateY(-100%);
	padding: 2px 6px;
	border-radius: 6px;
	background: rgba(18, 20, 30, 0.42);
	color: rgba(255, 255, 255, 0.92);
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: 10px;
	line-height: 1.4;
	letter-spacing: 0.04em;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	opacity: 0;
	transition: opacity 600ms ease;
}

.gavatar-cap.is-on {
	opacity: 1;
	transition-duration: 160ms;
}

/* Where the navbar cat sits when it visits: a 24x16 box whose bottom edge is
   the photo's top edge. The cat's own box inside it takes the pointer. */
.gavatar-perch {
	position: absolute;
	z-index: 3;
	width: 24px;
	height: 16px;
	pointer-events: none;
}

@media (max-width: 767.98px) {
	.gavatar-perch {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gavatar-canvas,
	.gavatar-fx,
	.gavatar-cap {
		transition: none;
	}
}
