.spv-viewer-wrapper {
	margin: 10px 0 20px;
}

.spv-stl-canvas {
	position: relative;
	width: 100%;
	height: 450px;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	cursor: grab;
}

.spv-stl-canvas:active {
	cursor: grabbing;
}

.spv-stl-canvas canvas {
	display: block;
}

.spv-viewer-loading,
.spv-viewer-error {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #888;
	text-align: center;
	padding: 0 20px;
}

.spv-viewer-hint {
	text-align: center;
	font-size: 12px;
	color: #888;
	margin-top: 8px;
}

@media (max-width: 600px) {
	.spv-stl-canvas {
		height: 320px;
	}
}

/* Frontend part-size controls */
.spv-part-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 16px;
}

.spv-part-field {
	background: #fafafa;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 12px 14px;
	min-width: 220px;
}

.spv-part-field-name {
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 13px;
}

.spv-part-field-live {
	border-color: #5b8def;
	background: #f2f6ff;
}

.spv-part-live-badge {
	display: inline-block;
	margin-left: 8px;
	font-weight: 500;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #5b8def;
	background: #e4ecff;
	border-radius: 10px;
	padding: 2px 8px;
	vertical-align: middle;
}

.spv-part-field-inputs {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.spv-part-input {
	display: flex;
	flex-direction: column;
	font-size: 12px;
	color: #555;
	gap: 4px;
}

.spv-part-input-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.spv-part-input input[type="number"] {
	width: 80px;
	padding: 4px 6px;
}

.spv-part-unit {
	font-size: 12px;
	color: #888;
}

/* Frontend filament selector */
.spv-filament-select {
	background: #fafafa;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 12px 14px;
	margin-top: 16px;
	max-width: 360px;
}

.spv-filament-label {
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 13px;
}

.spv-filament-dropdown {
	width: 100%;
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid #ccc;
	font-size: 13px;
	background: #fff;
}

.spv-filament-caption {
	margin-top: 8px;
	font-size: 12px;
	color: #666;
}

.spv-filament-caption strong {
	color: #333;
}

.spv-estimate {
	margin-top: 12px;
	max-width: 360px;
}

.spv-estimate-line {
	font-size: 13px;
	color: #555;
	padding: 2px 0;
}

.spv-estimate-cost {
	font-weight: 600;
	color: #2c7a2c;
}

/* Admin metabox */
.spv-admin-preview {
	width: 100%;
	height: 300px;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
}

.spv-admin-preview canvas {
	display: block;
}

#spv-parts-table input.small-text {
	width: 90px;
}

#spv-parts-table td {
	vertical-align: middle;
	padding: 6px 8px;
}

.spv-filaments-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 10px;
}

.spv-filament-group {
	min-width: 220px;
}

.spv-filament-group h5 {
	margin: 0 0 6px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #666;
}

.spv-filament-checkbox {
	display: flex;
	align-items: baseline;
	gap: 6px;
	padding: 3px 0;
	cursor: pointer;
}

.spv-filament-name {
	font-weight: 600;
	min-width: 80px;
}

.spv-filament-tag {
	color: #888;
	font-size: 12px;
}
