/* Spline 3D Scene – Avada Builder Element Styles v2.0 */

.spline-3d-container {
	box-sizing: border-box;
	display: block;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
}

.spline-3d-container canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* ─── Loading Spinner ────────────────────────── */

.spline-3d-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: inherit;
	transition: opacity 0.4s ease;
	pointer-events: none;
	z-index: 1;
}

.spline-3d-loader span {
	width: 32px;
	height: 32px;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	animation: spline3d-spin 0.7s linear infinite;
}

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

/* Hide loader once scene is loaded */
.spline-3d-loaded .spline-3d-loader {
	opacity: 0;
	pointer-events: none;
}

/* ─── Error State ────────────────────────────── */

.spline-3d-error .spline-3d-loader {
	display: none;
}

.spline-3d-error::after {
	content: 'Failed to load 3D scene';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ─── Inspector Overlay (debug mode) ─────────── */

.spline-3d-inspector-toggle {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 10;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 14px;
	cursor: pointer;
	display: none;
	line-height: 1;
}

.spline-3d-inspector-toggle:hover {
	background: rgba(0, 0, 0, 0.8);
}

[data-spline-debug] .spline-3d-inspector-toggle {
	display: block;
}

.spline-3d-inspector {
	position: absolute;
	top: 0;
	right: 0;
	width: 280px;
	max-height: 100%;
	z-index: 11;
	background: rgba(20, 20, 20, 0.95);
	color: #e0e0e0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
	font-size: 12px;
	flex-direction: column;
	overflow: hidden;
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	pointer-events: auto;
}

.spline-3d-inspector-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	font-weight: 600;
}

.spline-3d-inspector-close {
	background: none;
	border: none;
	color: #999;
	font-size: 18px;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.spline-3d-inspector-close:hover {
	color: #fff;
}

.spline-3d-inspector-search input {
	width: 100%;
	box-sizing: border-box;
	padding: 6px 10px;
	background: rgba(255, 255, 255, 0.05);
	border: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	color: #e0e0e0;
	font-size: 12px;
	outline: none;
}

.spline-3d-inspector-search input::placeholder {
	color: #666;
}

.spline-3d-inspector-list {
	overflow-y: auto;
	flex: 1;
	padding: 4px 0;
}

.spline-3d-inspector-item {
	padding: 6px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spline-3d-inspector-item:hover {
	background: rgba(255, 255, 255, 0.05);
}

.spline-3d-inspector-item strong {
	color: #fff;
	font-size: 12px;
}

.spline-3d-inspector-type {
	float: right;
	color: #888;
	font-size: 10px;
	text-transform: uppercase;
}

.spline-3d-inspector-details {
	margin-top: 4px;
}

.spline-3d-inspector-details small {
	display: block;
	color: #777;
	line-height: 1.5;
	font-size: 11px;
}

.spline-3d-inspector-empty {
	padding: 20px 10px;
	text-align: center;
	color: #666;
}

/* ─── Responsive ─────────────────────────────── */

@media (max-width: 768px) {
	.spline-3d-container {
		height: 350px !important;
	}

	.spline-3d-inspector {
		width: 220px;
		font-size: 11px;
	}
}
