/* ===== Shared skeleton screen utilities ===== */
/* Loaded site-wide via header.ejs. Used by category, home, weapon, cases, global search. */

@keyframes dp-skeleton-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.dp-skeleton {
	position: relative;
}

.dp-skeleton__block {
	background: linear-gradient(
		110deg,
		rgba(255, 255, 255, 0.03) 25%,
		rgba(255, 255, 255, 0.08) 50%,
		rgba(255, 255, 255, 0.03) 75%
	);
	background-size: 200% 100%;
	animation: dp-skeleton-shimmer 1.6s ease-in-out infinite;
}

.dp-skeleton__block--image {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 1;
}

.dp-skeleton__block--caption {
	height: 14px;
	width: 60%;
	border-radius: 4px;
}

.dp-skeleton__block--price {
	height: 18px;
	width: 50px;
	border-radius: 6px;
}

.dp-skeleton__block--badge {
	height: 12px;
	width: 40px;
	border-radius: 999px;
}

/* When loaded, remove shimmer */
.dp-skeleton--loaded .dp-skeleton__block {
	display: none;
}

/* ---- Global search skeleton ---- */
[data-search-skel] img {
	opacity: 0;
}
[data-search-skel] .caption,
[data-search-skel] .price-tag {
	display: none;
}
[data-search-skel] .dp-skeleton__block--image {
	position: absolute;
	inset: 0;
	border-radius: var(--radius-lg, 12px);
	z-index: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	.dp-skeleton__block {
		animation: none;
	}
}
