/**
 * Hollywood Prints Designer UI — Phase 3.5 polished mobile studio.
 *
 * Visual refinement only. Does not change Fabric print coordinates or export size.
 * Scoped to body.hp-mobile-designer (<900px). Desktop unchanged.
 */

.hp-mobile-designer {
	--hp-pink: #FF39A3;
	--hp-mint: #77FFC9;
	--hp-yellow: #FEC85C;
	--hp-surface: #FFFFFF;
	--hp-surface-muted: #F4F4F6;
	--hp-border: #E4E4EA;
	--hp-text: #1F1F24;
	--hp-text-muted: #6B6B76;
	--hp-canvas-bg: #EBEBEF;
	--hp-toolbar-height: 58px;
	--hp-purchase-height: 64px;
	--hp-sheet-max: min(58dvh, 460px);
	--hp-radius: 12px;
	--hp-radius-sm: 8px;
	--hp-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--hp-canvas-scale: 1;
	--hp-mobile-thumbs-space: 72px;
}

/* -------------------------------------------------------------------------
   Full-bleed stage — beat Elementor page CSS (body.page-id-* !important)
   and Printspace gutters so WCDP can size the canvas to the phone width.
   ------------------------------------------------------------------------- */

html body.hp-mobile-designer main.haru-page,
html body.hp-mobile-designer .haru-container,
html body.hp-mobile-designer .page-content,
html body.hp-mobile-designer .page-content-wrap,
html body.hp-mobile-designer .entry-content,
html body.hp-mobile-designer .hp-design-studio-root,
html body.hp-mobile-designer .type-page.hentry,
html body.hp-mobile-designer .h-row {
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
}

html body.hp-mobile-designer #wcdp-container {
	background: var(--hp-canvas-bg) !important;
	margin: 0 !important;
	padding: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* Kill nested white card from designer page Elementor CSS. */
html body.hp-mobile-designer #wcdp-editor-container {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

html body.hp-mobile-designer #wcdp-editor-container .upper-canvas,
html body.hp-mobile-designer #wcdp-editor-container .lower-canvas,
html body.hp-mobile-designer #wcdp-editor-container canvas {
	box-shadow: none !important;
}

.hp-mobile-designer #wcdp-canvas-container {
	padding: 4px 6px 0 !important;
	background: transparent !important;
	/* Pack toward top so the product sits near Front/Back chips. */
	justify-content: flex-start;
	align-items: center;
	/* Wrapper reserves scaled size; avoid clipping the visual canvas. */
	overflow: hidden;
}

.hp-mobile-designer .hp-canvas-visual-wrap {
	position: relative;
	flex: 0 0 auto;
	/* Must be allowed wider than the stage so height-first scale can crop sides. */
	max-width: none;
	overflow: visible;
	line-height: 0;
}

.hp-mobile-designer #wcdp-editor-container .canvas-container {
	margin: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	/* Transform is applied by phase35.js (inline) — CSS var transform is unreliable here.
	   top-left origin keeps Fabric 1.6.7 getPointer aligned. */
	transform-origin: top left !important;
}

.hp-mobile-designer #wcdp-editor-container canvas,
.hp-mobile-designer #wcdp-editor-container .upper-canvas,
.hp-mobile-designer #wcdp-editor-container .lower-canvas {
	border-radius: 10px !important;
	box-shadow: none !important;
	max-width: none !important;
}

.hp-mobile-designer.hp-sheet-is-open #wcdp-canvas-container {
	max-height: calc(
		100dvh - var(--hp-mobile-header-offset, 56px) - var(--hp-sheet-max) -
			var(--hp-mobile-thumbs-space, 72px) - 4px
	);
}

/* -------------------------------------------------------------------------
   Compact Front / Back chips under the product
   ------------------------------------------------------------------------- */

.hp-mobile-designer #wcdp-opts-below-canvas {
	padding: 2px 10px 4px !important;
	gap: 8px;
	margin-bottom: calc(
		var(--hp-toolbar-height) + var(--hp-purchase-height) + env(safe-area-inset-bottom, 0px)
	) !important;
	background: transparent;
}

/* Pull Front/Back up toward the product; reserve only chrome height below. */
html body.hp-mobile-designer #wcdp-editor-container {
	justify-content: flex-start;
}

.hp-mobile-designer #wcdp-canvas-thumbs-container {
	gap: 10px;
}

.hp-mobile-designer #wcdp-canvas-thumbs-container > div {
	min-width: 56px;
	min-height: 0;
	padding: 4px 8px 5px;
	border-radius: 10px;
	border: 1.5px solid var(--hp-border);
	background: var(--hp-surface);
	box-shadow: none;
}

.hp-mobile-designer #wcdp-canvas-thumbs-container > div.dp-canvas-active {
	border-color: var(--hp-pink);
	box-shadow: 0 0 0 2px rgba(255, 57, 163, 0.12);
}

.hp-mobile-designer #wcdp-canvas-thumbs-container img {
	width: 36px !important;
	max-width: 36px !important;
	border-radius: 4px;
}

.hp-mobile-designer #wcdp-canvas-thumbs-container label {
	font-size: 10px !important;
	font-weight: 600;
	letter-spacing: 0.06em;
	margin-top: 2px !important;
	color: var(--hp-text-muted);
}

.hp-mobile-designer #wcdp-canvas-thumbs-container > div.dp-canvas-active label {
	color: var(--hp-pink);
}

/* -------------------------------------------------------------------------
   Header polish
   ------------------------------------------------------------------------- */

.hp-mobile-designer .hp-mobile-designer-header {
	box-shadow: none;
	border-bottom-color: var(--hp-border);
}

.hp-mobile-designer .hp-mobile-designer-header__title {
	font-size: 15px;
	font-weight: 650;
	letter-spacing: -0.01em;
}

.hp-mobile-designer .hp-mobile-designer-header__btn {
	border-radius: var(--hp-radius-sm);
}

.hp-mobile-designer .hp-mobile-designer-header__next {
	min-height: 36px;
	min-width: 68px;
	padding: 0 14px;
	font-size: 12px;
	box-shadow: none;
}

/* -------------------------------------------------------------------------
   Bottom toolbar
   ------------------------------------------------------------------------- */

.hp-mobile-designer .hp-mobile-toolbar {
	height: var(--hp-toolbar-height);
	padding: 0 6px;
	border-top: 1px solid var(--hp-border);
	box-shadow: 0 -1px 0 rgba(36, 36, 36, 0.03);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.hp-mobile-designer .hp-mobile-toolbar__btn {
	gap: 3px;
	border-radius: 10px;
	font-size: 10px;
	font-weight: 650;
	letter-spacing: 0.01em;
	color: var(--hp-text-muted);
	position: relative;
}

.hp-mobile-designer .hp-mobile-toolbar__btn svg {
	width: 22px;
	height: 22px;
	stroke-width: 1.85;
}

.hp-mobile-designer .hp-mobile-toolbar__btn.is-active {
	color: var(--hp-pink);
	background: rgba(255, 57, 163, 0.1);
}

.hp-mobile-designer .hp-mobile-toolbar__btn.is-active::after {
	content: "";
	position: absolute;
	left: 22%;
	right: 22%;
	bottom: 3px;
	height: 2px;
	border-radius: 2px;
	background: var(--hp-pink);
}

.hp-mobile-designer .hp-mobile-toolbar__btn[data-hp-sheet="designs"].is-active {
	color: #8a6200;
	background: rgba(254, 200, 92, 0.28);
}

.hp-mobile-designer .hp-mobile-toolbar__btn[data-hp-sheet="designs"].is-active::after {
	background: var(--hp-yellow);
}

.hp-mobile-designer .hp-mobile-toolbar__btn[data-hp-sheet="product"].is-active {
	color: #0b6b4a;
	background: rgba(119, 255, 201, 0.3);
}

.hp-mobile-designer .hp-mobile-toolbar__btn[data-hp-sheet="product"].is-active::after {
	background: #2bbf8a;
}

/* -------------------------------------------------------------------------
   Purchase bar
   ------------------------------------------------------------------------- */

.hp-mobile-designer .hp-mobile-purchase {
	min-height: calc(var(--hp-purchase-height) + env(safe-area-inset-bottom, 0px));
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
	gap: 10px;
	box-shadow: 0 -1px 0 rgba(36, 36, 36, 0.03);
	background: var(--hp-surface);
}

.hp-mobile-designer .hp-mobile-purchase__price {
	font-size: 17px;
	letter-spacing: -0.02em;
}

.hp-mobile-designer .hp-mobile-purchase__summary {
	font-size: 11px;
	margin-top: 1px;
}

.hp-mobile-designer .hp-mobile-purchase__cta {
	min-width: 124px;
	min-height: 44px;
	border-radius: 12px;
	font-size: 13px;
	letter-spacing: 0.03em;
	box-shadow: none;
}

/* -------------------------------------------------------------------------
   Bottom sheets + native panel chrome
   ------------------------------------------------------------------------- */

.hp-mobile-designer .hp-mobile-sheet {
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -10px 30px rgba(31, 31, 36, 0.12);
}

.hp-mobile-designer .hp-mobile-sheet__handle {
	width: 36px;
	height: 4px;
	margin: 8px auto 2px;
	background: #d8d8de;
}

.hp-mobile-designer .hp-mobile-sheet__header {
	padding: 2px 12px 10px;
}

.hp-mobile-designer .hp-mobile-sheet__title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.hp-mobile-designer .hp-mobile-sheet__close {
	min-width: 40px;
	min-height: 40px;
	border-radius: 10px;
	background: var(--hp-surface-muted);
}

.hp-mobile-designer.hp-sheet-is-open #wcdp-custom-tool-panel {
	height: calc(var(--hp-sheet-max) - 54px - env(safe-area-inset-bottom, 0px)) !important;
	max-height: calc(var(--hp-sheet-max) - 54px - env(safe-area-inset-bottom, 0px)) !important;
	padding: 0 12px 20px !important;
	background: var(--hp-surface) !important;
}

/* Ensure icon glyphs still use WCDP sprite font inside sheets */
.hp-mobile-designer #wcdp-container [class^="wcdp-icon-"],
.hp-mobile-designer #wcdp-container [class*=" wcdp-icon-"],
.hp-mobile-designer #wcdp-container [id^="wcdp-btn-"] {
	font-family: "wcdp-sprites" !important;
}

/* Panel section titles */
.hp-mobile-designer.hp-sheet-is-open .dp-title-label {
	font-family: var(--hp-font) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	color: var(--hp-text-muted) !important;
	margin: 12px 0 8px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

.hp-mobile-designer.hp-sheet-is-open .dp-title-label:first-child {
	margin-top: 4px !important;
}

.hp-mobile-designer.hp-sheet-is-open .dp-row {
	margin: 0 0 10px !important;
	padding: 0 !important;
}

.hp-mobile-designer.hp-sheet-is-open #wcdp-tabs-content .dp-content-style,
.hp-mobile-designer.hp-sheet-is-open #wcdp-tabs-content .dp-border-style,
.hp-mobile-designer.hp-sheet-is-open #wcdp-settings-panel .dp-content-style,
.hp-mobile-designer.hp-sheet-is-open #wcdp-settings-panel .dp-border-style {
	border: 1px solid var(--hp-border) !important;
	border-radius: var(--hp-radius) !important;
	background: var(--hp-surface-muted) !important;
	box-shadow: none !important;
}

/* Text / form controls */
.hp-mobile-designer.hp-sheet-is-open #wcdp-new-textbox,
.hp-mobile-designer.hp-sheet-is-open select,
.hp-mobile-designer.hp-sheet-is-open input[type="text"],
.hp-mobile-designer.hp-sheet-is-open input[type="number"],
.hp-mobile-designer.hp-sheet-is-open textarea {
	font-family: var(--hp-font) !important;
	font-size: 14px !important;
	border: 1px solid var(--hp-border) !important;
	border-radius: var(--hp-radius-sm) !important;
	background: var(--hp-surface) !important;
	color: var(--hp-text) !important;
	min-height: 42px !important;
	padding: 8px 12px !important;
	box-shadow: none !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

.hp-mobile-designer.hp-sheet-is-open #wcdp-new-textbox {
	min-height: 72px !important;
	resize: vertical;
}

.hp-mobile-designer.hp-sheet-is-open #wcdp-add-new-text,
.hp-mobile-designer.hp-sheet-is-open #wcdp-btn-upload-img + label,
.hp-mobile-designer.hp-sheet-is-open .dp-btn-style > span,
.hp-mobile-designer.hp-sheet-is-open #wcdp-upload-images label {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 44px !important;
	padding: 0 16px !important;
	border-radius: var(--hp-radius-sm) !important;
	background: var(--hp-pink) !important;
	color: #fff !important;
	font-family: var(--hp-font) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	border: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.hp-mobile-designer.hp-sheet-is-open .hp-font-picker__toggle {
	min-height: 44px !important;
	border: 1px solid var(--hp-border) !important;
	border-radius: var(--hp-radius-sm) !important;
	background: var(--hp-surface) !important;
	padding: 6px 10px !important;
}

.hp-mobile-designer.hp-sheet-is-open input[type="range"] {
	accent-color: var(--hp-pink);
	width: 100%;
}

.hp-mobile-designer.hp-sheet-is-open .dp-col-8 {
	display: flex !important;
	flex-wrap: wrap;
	gap: 6px !important;
	margin-bottom: 12px !important;
}

.hp-mobile-designer.hp-sheet-is-open .dp-col-8 > span {
	flex: 0 0 auto;
	min-width: 40px;
	min-height: 40px;
	border-radius: var(--hp-radius-sm) !important;
	border: 1px solid var(--hp-border) !important;
	background: var(--hp-surface) !important;
}

.hp-mobile-designer.hp-sheet-is-open .dp-col-8 > span.dp-active,
.hp-mobile-designer.hp-sheet-is-open .dp-col-8 > span.selected,
.hp-mobile-designer.hp-sheet-is-open .dp-col-8 > span.vtab-selected {
	border-color: var(--hp-pink) !important;
	background: rgba(255, 57, 163, 0.08) !important;
	color: var(--hp-pink) !important;
}

.hp-mobile-designer.hp-sheet-is-open .variations select,
.hp-mobile-designer.hp-sheet-is-open .variations label {
	font-family: var(--hp-font) !important;
}

.hp-mobile-designer.hp-sheet-is-open .variations .label label {
	font-size: 12px !important;
	font-weight: 600 !important;
	color: var(--hp-text-muted) !important;
}

.hp-mobile-designer.hp-sheet-is-open .dp-layer-row {
	border: 1px solid var(--hp-border) !important;
	border-radius: var(--hp-radius-sm) !important;
	background: var(--hp-surface) !important;
	margin-bottom: 6px !important;
	padding: 6px 8px !important;
}

.hp-mobile-designer.hp-sheet-is-open .dp-layer-row.dp-active {
	border-color: var(--hp-pink) !important;
	box-shadow: 0 0 0 2px rgba(255, 57, 163, 0.12);
}

/* Short phones */
@media (max-height: 700px) {
	.hp-mobile-designer {
		--hp-sheet-max: min(50dvh, 360px);
		--hp-toolbar-height: 54px;
		--hp-purchase-height: 60px;
	}
}

@media (max-width: 379px) {
	.hp-mobile-designer .hp-mobile-toolbar__btn {
		font-size: 9px;
		padding: 2px 0;
	}

	.hp-mobile-designer .hp-mobile-purchase__cta {
		min-width: 112px;
		padding: 0 12px;
	}
}

@media (min-width: 900px) {
	.hp-mobile-designer {
		--hp-canvas-scale: 1;
	}
}
