/* ==========================================================================
   SnapHub Studio Avatar Fallback
   The existing page CSS owns avatar geometry (48px, responsive sizes, radius).
   This primitive owns only the identity fallback layer and image overlay.
   ========================================================================== */

[data-studio-avatar] {
	position: relative;
	display: grid;
	place-items: center;
	isolation: isolate;
	background: #fff1f1;
	color: var(--primary);
	box-shadow: inset 0 0 0 1px rgba(255, 85, 85, .14);
}

[data-studio-avatar].studio-avatar--surface-pink {
	background: #fff1f1;
	box-shadow: inset 0 0 0 1px rgba(255, 85, 85, .14);
}

[data-studio-avatar].studio-avatar--surface-white {
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 85, 85, .20);
}

[data-studio-avatar-fallback] {
	position: relative;
	z-index: 0;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 16px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: -.02em;
	text-transform: uppercase;
	user-select: none;
}

[data-studio-avatar] [data-studio-avatar-image] {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

[data-studio-avatar].is-avatar-fallback [data-studio-avatar-fallback] {
	visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
	[data-studio-avatar] [data-studio-avatar-image] {
		transition: none;
	}
}
