/* ── Viewer: fills the axv2-viewer figure ───────────────────── */
.adaptx-glb-viewer-mount.woocommerce-product-gallery {
	float: none !important;
	clear: none !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	opacity: 1 !important;
	height: 100%;
}

.adaptx-glb-viewer {
	position: relative;
	overflow: hidden;
	height: 100%;
	background: #f5f5f5;
}

.adaptx-glb-canvas,
.adaptx-glb-canvas canvas {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
}

.adaptx-glb-status {
	position: absolute;
	top: 50%;
	left: 50%;
	padding: 10px 14px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.92);
	color: #222;
	font-size: 13px;
	font-weight: 500;
	transform: translate(-50%, -50%);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	white-space: nowrap;
}

.adaptx-glb-configurator.is-ready .adaptx-glb-status {
	display: none;
}

/* Top-right viewer icons */
.adaptx-glb-viewer-actions {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	gap: 18px;
	color: #777;
}

.adaptx-glb-viewer-actions span {
	position: relative;
	width: 20px;
	height: 20px;
}

.adaptx-glb-viewer-actions span:first-child::before {
	content: "";
	position: absolute;
	inset: 3px;
	border: 2px dashed currentColor;
}

.adaptx-glb-viewer-actions span:last-child::before,
.adaptx-glb-viewer-actions span:last-child::after {
	content: "";
	position: absolute;
	border: 2px solid currentColor;
}

.adaptx-glb-viewer-actions span:last-child::before {
	inset: 4px;
	transform: rotate(45deg);
}

.adaptx-glb-viewer-actions span:last-child::after {
	top: 8px;
	left: 8px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
}

/* Dimension SVG overlay — JS projects 3D world-space corners each frame */
.adaptx-glb-dimensions {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: visible;
}

/* Thumbnail strip — hidden */
.adaptx-glb-thumbs {
	display: none;
}

/* ── Controls panel ─────────────────────────────────────────── */
.adaptx-glb-panel {
	margin: 10px 0 0;
}

/* 15px gap between options — matches pl-option margin-bottom: 15px */
.adaptx-glb-controls {
	display: grid;
	gap: 15px;
	margin-bottom: 12px;
}

.adaptx-glb-control {
	display: grid;
	gap: 4px;
}

/* ── Label — exact MUI pl-option__label values ──────────────── */
.adaptx-glb-label {
	font-size: 16px;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.6);
	line-height: 23px;
	letter-spacing: 0.8px;
}

/* ── Description ────────────────────────────────────────────── */
.adaptx-glb-description {
	font-size: 12px;
	color: rgba(0, 0, 0, 0.6);
	line-height: 1.45;
	margin-top: 2px;
	letter-spacing: 0;
}

/* ── Swatches ───────────────────────────────────────────────── */
.adaptx-glb-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.adaptx-glb-swatch {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
	height: 36px;
	padding: 0;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 80ms ease, box-shadow 80ms ease;
}

.adaptx-glb-swatch.is-selected {
	border-color: #3f51b5;
	box-shadow: inset 0 0 0 1px #3f51b5;
}

.adaptx-glb-swatch:focus-visible {
	outline: 2px solid #3f51b5;
	outline-offset: 2px;
}

.adaptx-glb-swatch-chip {
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 0;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}

.adaptx-glb-swatch-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #333;
	padding: 0 10px;
	text-align: left;
	white-space: nowrap;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none !important;
}

/* ── Slider — label above, [track | stepper] row below ──────── */
.adaptx-glb-slider-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Exact MUI slider values: 4px track, 13px vertical padding, 20px thumb.
   background-size/position constrains the gradient to 4px height at center
   so the touch-area padding (13px top/bottom) stays transparent. */
.adaptx-glb-slider {
	flex: 1;
	-webkit-appearance: none;
	appearance: none;
	height: 4px;
	border-radius: 0;
	outline: none;
	cursor: pointer;
	display: block;
	padding: 13px 0;
	box-sizing: content-box;
	background-color: transparent;
	background-size: 100% 4px;
	background-repeat: no-repeat;
	background-position: center;
	background-image: linear-gradient(to right, rgba(63,81,181,0.38), rgba(63,81,181,0.38));
}

.adaptx-glb-slider::-webkit-slider-runnable-track {
	height: 4px;
	background: transparent;
}

.adaptx-glb-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #3f51b5;
	border: none;
	margin-top: -8px;
	cursor: pointer;
}

.adaptx-glb-slider::-moz-range-track {
	height: 4px;
	background: transparent;
}

.adaptx-glb-slider::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #3f51b5;
	border: none;
	cursor: pointer;
}

/* Stepper: exact MUI values — 132×58px, buttons 40×56px, font 18px 700 */
.adaptx-glb-stepper {
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	align-items: stretch;
	width: 132px;
	min-width: 132px;
	height: 58px;
	border: 1px solid rgb(209, 209, 209);
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	flex-shrink: 0;
}

.adaptx-glb-stepper-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgb(246, 246, 246);
	color: #111;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.adaptx-glb-stepper-btn:hover {
	background: #ececec;
}

/* Number display — matches MUI input: 16px/400, centered, 50px wide */
.adaptx-glb-slider-display {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 400;
	color: #111;
	border-left: 1px solid rgb(209, 209, 209);
	border-right: 1px solid rgb(209, 209, 209);
	text-align: center;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.adaptx-glb-slider-value {
	display: none;
}

/* ── Segment select (shelf count) ───────────────────────────── */
.adaptx-glb-segments {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.adaptx-glb-segment {
	min-height: 36px;
	min-width: 36px;
	padding: 0 8px;
	border: 1px solid rgb(209, 209, 209);
	border-radius: 4px;
	background: rgb(246, 246, 246);
	color: rgba(0, 0, 0, 0.6);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.8px;
	cursor: pointer;
}

.adaptx-glb-segment.is-selected {
	border-color: #3f51b5;
	background: #eef0fb;
	color: #3f51b5;
	box-shadow: inset 0 0 0 1px #3f51b5;
}

/* ── Toggle — exact MUI switch values ───────────────────────── */
.adaptx-glb-control--toggle {
	gap: 0;
}

.adaptx-glb-toggle-label {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	cursor: pointer;
	user-select: none;
	padding: 6px 0;
	border-bottom: 1px solid #ebebeb;
}

.adaptx-glb-control--toggle:last-of-type .adaptx-glb-toggle-label {
	border-bottom: none;
}

/* Track: 34×14px, border-radius 7px, black 38% opacity — exact MUI values */
.adaptx-glb-toggle-track {
	position: relative;
	width: 34px;
	height: 14px;
	border-radius: 7px;
	background: rgba(0, 0, 0, 0.38);
	transition: background 150ms ease;
	margin: 4px 3px; /* extra space for 20px thumb that overflows 14px track */
}

.adaptx-glb-toggle-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

/* Thumb: 20×20px, white, material shadow — exact MUI values */
.adaptx-glb-toggle-thumb {
	position: absolute;
	top: -3px;
	left: -3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: rgba(0,0,0,0.2) 0px 2px 1px -1px, rgba(0,0,0,0.14) 0px 1px 1px 0px, rgba(0,0,0,0.12) 0px 1px 3px 0px;
	transition: transform 150ms ease;
	pointer-events: none;
}

/* Travel = track width (34) - thumb width (20) = 14px */
.adaptx-glb-toggle-input:checked ~ .adaptx-glb-toggle-thumb {
	transform: translateX(14px);
}

.adaptx-glb-toggle-track:has(.adaptx-glb-toggle-input:checked) {
	background: rgba(63, 81, 181, 0.5);
}

.adaptx-glb-control.is-disabled {
	opacity: 0.38;
	pointer-events: none;
}

/* ── Price display ──────────────────────────────────────────── */
.adaptx-glb-price {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-top: 1px solid #e0e0e0;
	margin-top: 4px;
	color: rgba(0, 0, 0, 0.6);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.8px;
}

.adaptx-glb-total {
	font-size: 18px;
	font-weight: 700;
	color: #111;
	letter-spacing: 0;
}

/* ── Mobile — matches axv2-productlab-form pl-* overrides at ≤767px ── */
@media (max-width: 767px) {
	.adaptx-glb-label {
		font-size: 13px !important;
		line-height: 18px !important;
	}

	.adaptx-glb-stepper {
		height: 42px !important;
		min-width: 112px !important;
		width: 112px !important;
		grid-template-columns: 32px 1fr 32px;
	}

	.adaptx-glb-stepper-btn {
		width: 32px !important;
		height: 40px !important;
		font-size: 16px !important;
	}

	.adaptx-glb-slider-display {
		font-size: 14px !important;
	}

}
