/**
 * Image → STL maker.
 */

.rb3d-image-stl .form-field select,
.rb3d-image-stl .form-field input[type='range'],
.rb3d-image-stl .form-field input[type='file'],
.rb3d-image-stl .form-field input[type='color'] {
	width: 100%;
}

.rb3d-image-stl .form-field {
	position: relative;
}

.rb3d-image-stl .form-field[hidden] {
	display: none !important;
}

.rb3d-image-stl .form-field select,
.rb3d-image-stl .form-field input[type='file'] {
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--rb3d-border);
	border-radius: var(--rb3d-radius);
	font-family: var(--rb3d-font-sans);
	font-size: 0.875rem;
	color: var(--rb3d-text);
	background: var(--rb3d-surface);
}

.rb3d-image-stl .form-field input[type='color'] {
	height: 2.5rem;
	padding: 0.2rem;
	border: 1px solid var(--rb3d-border);
	border-radius: var(--rb3d-radius);
	background: var(--rb3d-surface);
	cursor: pointer;
}

.rb3d-image-stl .form-field input[type='range'] {
	accent-color: var(--rb3d-accent);
}

.rb3d-image-stl__fields {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
	.rb3d-image-stl__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rb3d-image-stl__fields .form-field--full {
		grid-column: 1 / -1;
	}
}

.rb3d-image-stl__hint {
	margin: 0.35rem 0 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--rb3d-muted);
}

.rb3d-image-stl__range-val {
	position: absolute;
	right: 0.6rem;
	bottom: 0.55rem;
	font-family: var(--rb3d-font-mono);
	font-size: 0.7rem;
	color: var(--rb3d-muted);
	pointer-events: none;
}

.rb3d-image-stl .rb3d-maker__actions {
	flex-wrap: wrap;
}

.rb3d-image-stl__mask-panel {
	margin-bottom: 0.75rem;
}

.rb3d-image-stl__mask-label {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--rb3d-muted);
}

.rb3d-image-stl__mask-canvas {
	display: block;
	width: 100%;
	max-height: 12rem;
	object-fit: contain;
	background: #2a2c28;
	border: 1px solid var(--rb3d-surface-high);
	border-radius: var(--rb3d-radius-lg);
	image-rendering: pixelated;
}

.rb3d-maker__canvas {
	display: block;
	width: 100%;
	height: 100%;
	touch-action: none;
}

.rb3d-tool__status.is-error {
	color: var(--rb3d-accent-dark);
}
