/**
 * 3D customiser (studio page) — phone layout tweaks.
 *
 * Lives in the theme so the plugin's customizer.css is never touched.
 *  1. Home + cart icons show at the top-right on phones (the canvas was
 *     sitting on top of them).
 *  2. Zoom (− 100% +) and Size Chart move into the options sheet's top row,
 *     either side of the drag handle (see studio-mobile.js).
 */
.sky-deck-bar { display: none; }

@media (max-width: 860px) {
	/* 1. Home / cart */
	body.devexhub-3d-studio .dx-studio-tools {
		position: relative;
		z-index: 6;
		margin: 12px 12px 0 0;
	}
	body.devexhub-3d-studio .dx-studio-icon {
		width: 40px;
		height: 40px;
		background: #fff;
		box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
	}

	/* 2. Zoom + size chart in the sheet's top row */
	body.sky-deck-bar-on .dx-studio-deck { padding-top: 52px; }
	body.sky-deck-bar-on .dx-sheet-grip { height: 52px; }

	.sky-deck-bar {
		display: flex;
		position: absolute;
		top: 9px;
		left: 14px;
		right: 14px;
		height: 34px;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		z-index: 5;
		pointer-events: none; /* the middle stays draggable */
	}
	.sky-deck-bar > * { pointer-events: auto; }
	.dx-studio-deck.is-collapsed .sky-deck-bar { display: none; }

	.sky-deck-bar #devexhub-3d-customiser-zoom {
		margin: 0;
		gap: 6px;
		flex-direction: row;
	}
	.sky-deck-bar #devexhub-3d-customiser-zoom button {
		width: 30px;
		height: 30px;
		background: #fff;
		border: 1px solid #e3e3e0;
		box-shadow: none;
	}
	.sky-deck-bar #devexhub-3d-customiser-zoom-level {
		min-width: 42px;
		padding: 0;
		background: none;
		font-size: 12px;
		font-weight: 700;
		color: #131313;
	}
	.sky-deck-bar .devexhub-3d-customiser-size-chart-link {
		position: static !important;
		inset: auto !important;
		margin: 0 0 0 auto;
		padding: 7px 14px;
		border: 1px solid #e3e3e0;
		border-radius: 999px;
		background: #fff;
		box-shadow: none;
		color: #131313;
		font-size: 12px;
		font-weight: 600;
		line-height: 1.2;
		white-space: nowrap;
		cursor: pointer;
	}

	/* 3. Information button: a small icon-only button */
	body.devexhub-3d-studio #dx-studio-info-toggle {
		flex: 0 0 44px;
		width: 44px;
		min-width: 0;
		padding: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		font-size: 0;
		letter-spacing: 0;
	}
	body.devexhub-3d-studio #dx-studio-info-toggle .sky-info-icon {
		width: 20px;
		height: 20px;
		flex: 0 0 auto;
	}
}

/* Stepper "next" arrow lights up once the open step is complete. */
body.devexhub-3d-studio #dx-studio-step-next.sky-next-ready {
	background: #040e49;
	color: #fdc502;
	border-color: #040e49;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(4, 14, 73, .45);
	animation: sky-next-pulse 1.6s ease-out infinite;
}
body.devexhub-3d-studio #dx-studio-step-next.sky-next-ready svg {
	stroke-width: 2.4;
}
@keyframes sky-next-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(4, 14, 73, .45); }
	70%  { box-shadow: 0 0 0 10px rgba(4, 14, 73, 0); }
	100% { box-shadow: 0 0 0 0 rgba(4, 14, 73, 0); }
}
@media (prefers-reduced-motion: reduce) {
	body.devexhub-3d-studio #dx-studio-step-next.sky-next-ready { animation: none; }
}


/* ---------------------------------------------------------------------
   Phones: room for the options
   - "How this works" (?) sits top-left, level with home / cart.
   - The options sheet starts taller so the choices are visible.
   - Step titles (already shown in the stepper) and long helper lines
     are hidden; the saved-design notice is one compact line.
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
	body.devexhub-3d-studio .devexhub-3d-studio-shell { position: relative; }
	/* Size Chart top-left, level with home / cart; no zoom buttons. */
	body.devexhub-3d-studio .devexhub-3d-customiser-size-chart-link.sky-size-top {
		position: absolute !important;
		inset: auto !important;
		top: 12px !important;
		left: 12px !important;
		z-index: 6;
		margin: 0;
		padding: 0 16px;
		height: 40px;
		display: inline-flex;
		align-items: center;
		border: 0;
		border-radius: 999px;
		background: #fff;
		box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
		color: #131313;
		font-size: 12px;
		font-weight: 700;
		letter-spacing: .04em;
		white-space: nowrap;
		cursor: pointer;
	}
	body.devexhub-3d-studio #devexhub-3d-customiser-zoom { display: none !important; }

	/* A bigger model: the sheet starts a little lower. */
	body.devexhub-3d-studio .dx-studio-deck { height: var(--dx-sheet, 42dvh); }

	body.devexhub-3d-studio .sky-m-hide { display: none !important; }

	body.devexhub-3d-studio #devexhub-3d-customiser-resume-banner {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 6px 8px 6px 12px;
		margin: 0 0 8px;
		font-size: 12px;
		line-height: 1.3;
	}
	body.devexhub-3d-studio #devexhub-3d-customiser-resume-banner span { flex: 1 1 auto; margin: 0; }
	body.devexhub-3d-studio #devexhub-3d-customiser-resume-new {
		margin: 0;
		padding: 5px 10px;
		font-size: 11px;
		white-space: nowrap;
	}
	body.devexhub-3d-studio #devexhub-3d-customiser-resume-dismiss {
		position: static;
		margin: 0;
		padding: 0 4px;
	}
}
