/**
 * Spinshop storefront styles.
 *
 * Deliberately unopinionated: this drops into thousands of themes we do not
 * control, so it claims as little as possible and inherits the rest.
 */

.spinshop-viewer {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 8px;
	background: linear-gradient(180deg, #f7f7f8 0%, #ececef 100%);
	touch-action: pan-y;
}

.spinshop-viewer canvas {
	display: block;
	width: 100%;
	height: 100%;
	/* The canvas swallows vertical drags on touch, which traps the shopper
	   mid-page. Horizontal rotation still works. */
	touch-action: pan-y;
	cursor: grab;
}

.spinshop-viewer canvas:active {
	cursor: grabbing;
}

.spinshop-viewer__status {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.875rem;
	color: #6b6b74;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.spinshop-viewer.is-ready .spinshop-viewer__status {
	opacity: 0;
}

.spinshop-viewer.has-error .spinshop-viewer__status::after {
	content: attr(data-error-text);
}

@media (prefers-color-scheme: dark) {
	.spinshop-viewer {
		background: linear-gradient(180deg, #1e1e22 0%, #141417 100%);
	}

	.spinshop-viewer__status {
		color: #9a9aa4;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spinshop-viewer__status {
		transition: none;
	}
}
