.p3d-viewer {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 4px;
	background: transparent;
	touch-action: none;
	cursor: grab;
}

.p3d-viewer:active {
	cursor: grabbing;
}

.p3d-viewer__canvas {
	display: block;
	position: relative;
	z-index: 1;
	width: 100% !important;
	height: 100% !important;
	outline: none;
}

.p3d-viewer [hidden] {
	display: none !important;
}

.p3d-viewer__loader,
.p3d-viewer__error {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	pointer-events: none;
	z-index: 3;
}

.p3d-viewer__loader {
	background: rgba(255, 255, 255, 0.92);
	color: #333;
}

.p3d-viewer__loader::after {
	content: '';
	width: 32px;
	height: 32px;
	margin-left: 12px;
	border: 3px solid #ddd;
	border-top-color: #333;
	border-radius: 50%;
	animation: p3d-spin 0.8s linear infinite;
}

.p3d-viewer__error {
	z-index: 4;
	background: rgba(255, 235, 235, 0.95);
	color: #8b0000;
}

.p3d-viewer__hint {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 8px 12px;
	text-align: center;
	font-size: 12px;
	line-height: 1.4;
	color: rgba(0, 0, 0, 0.6);
	background: linear-gradient(to top, rgba(255, 255, 255, 0.35), transparent);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.p3d-viewer--dark-bg .p3d-viewer__hint {
	color: rgba(255, 255, 255, 0.75);
	background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
}

.p3d-viewer--loaded .p3d-viewer__loader {
	display: none !important;
}

.p3d-viewer--loaded .p3d-viewer__hint {
	opacity: 1;
}

.p3d-viewer--loaded:hover .p3d-viewer__hint {
	opacity: 0;
}

.p3d-viewer--error .p3d-viewer__loader {
	display: none !important;
}

.p3d-viewer-placeholder {
	padding: 40px 20px;
	text-align: center;
	color: #666;
	background: #f9f9f9;
	border: 2px dashed #ccc;
	border-radius: 4px;
	font-size: 14px;
}

@keyframes p3d-spin {
	to {
		transform: rotate(360deg);
	}
}
