/* 5th Axis — TraceParts 3D viewer popup */

.axis5th-3d-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp( 12px, 3vw, 40px );
	background: rgba( 0, 0, 0, 0.72 );
}

.axis5th-3d-modal[hidden] {
	display: none;
}

.axis5th-3d-modal__dialog {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1100px;
	height: 100%;
	max-height: 760px;
	background: #ffffff;
	box-shadow: 0 24px 60px rgba( 0, 0, 0, 0.35 );
}

.axis5th-3d-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-shrink: 0;
	padding: 14px 20px;
	border-bottom: 1px solid #e4e4e7;
}

.axis5th-3d-modal__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #18181b;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.axis5th-3d-modal__sku {
	font-weight: 400;
	color: #71717a;
}

.axis5th-3d-modal__sku::before {
	content: '—';
	margin: 0 6px;
}

.axis5th-3d-modal__close {
	flex-shrink: 0;
	background: none;
	border: none;
	color: #71717a;
	font-size: 26px;
	line-height: 1;
	padding: 2px 6px;
	cursor: pointer;
	transition: color 0.15s ease;
}

.axis5th-3d-modal__close:hover,
.axis5th-3d-modal__close:focus-visible {
	color: #18181b;
}

.axis5th-3d-modal__body {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	background: #f4f4f5;
}

.axis5th-3d-modal__body iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	position: relative;
	z-index: 1;
}

/* Shown until the iframe's load event fires — the viewer takes a moment
   to boot, and an unexplained blank panel reads as broken. */
.axis5th-3d-modal__loading {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	font-size: 14px;
	color: #71717a;
	pointer-events: none;
}

.axis5th-3d-modal__loading[hidden] {
	display: none;
}

/* Prevent the page behind the dialog from scrolling while it's open. */
body.axis5th-3d-modal-open {
	overflow: hidden;
}

@media ( max-width: 782px ) {
	.axis5th-3d-modal__dialog {
		max-height: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.axis5th-3d-modal__close {
		transition: none;
	}
}
