/**
 * PSDM Template Lock — fixed-template UI pruning (customer side).
 *
 * While a FIXED template is active (body.psdm-tpl-fixed, set by
 * psdm-template-lock.js) the designer hides every add/rearrange surface:
 * the customer fills in their text — the layout is not theirs to change.
 *
 * Sidebar tabs are stamped data-psdm-tab by the JS (icon-derived, no :has()).
 * Templates + Text + Product tabs stay: switching template and typing are
 * the two things a fixed template allows.
 */

/* Add-content + rearrange tabs: gone. */
body.psdm-tpl-fixed .nbd-sidebar ul.main-tabs > li.tab[data-psdm-tab="draw"],
body.psdm-tpl-fixed .nbd-sidebar ul.main-tabs > li.tab[data-psdm-tab="cliparts"],
body.psdm-tpl-fixed .nbd-sidebar ul.main-tabs > li.tab[data-psdm-tab="photos"],
body.psdm-tpl-fixed .nbd-sidebar ul.main-tabs > li.tab[data-psdm-tab="elements"],
body.psdm-tpl-fixed .nbd-sidebar ul.main-tabs > li.tab[data-psdm-tab="layers"],
body.psdm-tpl-fixed .nbd-sidebar ul.main-tabs > li.tab.psdm-properties-nav {
	display: none !important;
}

/* Vendor add-text surfaces inside the Text tab: the "Click to add text" head,
   its divider, and the text-art tile gallery (each inserts NEW objects). The
   structured Text-fields form is the fixed-mode editing surface. */
body.psdm-tpl-fixed #tab-typography [ng-click^="addText"],
body.psdm-tpl-fixed #tab-typography [ng-click^="addCurvedText"],
body.psdm-tpl-fixed #tab-typography .typography-head,
body.psdm-tpl-fixed #tab-typography hr.seperate,
body.psdm-tpl-fixed #tab-typography .typography-body {
	display: none !important;
}

/* Toolbar delete/duplicate affordances on the (text) selection. */
body.psdm-tpl-fixed .nbd-toolbar [ng-click*="deleteLayers"],
body.psdm-tpl-fixed .nbd-toolbar [ng-click*="cloneLayer"] {
	display: none !important;
}

/* ------------------------------------------------ role action bar (customer) */
#psdm-tlr-bar {
	position: fixed;
	left: 50%;
	bottom: 84px;
	transform: translateX(-50%);
	display: none;
	align-items: center;
	gap: 10px;
	max-width: min(92vw, 720px);
	padding: 10px 14px;
	background: #fff;
	border: 1px solid var(--ax-gray-300, #d5d7da);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
	z-index: 99991;
	font-size: 13px;
}
#psdm-tlr-bar .psdm-tlr-label { font-weight: 700; white-space: nowrap; }
#psdm-tlr-bar .psdm-tlr-upload {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	background: var(--ax-accent, #0b6623);
	color: #fff;
	border-radius: 8px;
	cursor: pointer;
	white-space: nowrap;
}
#psdm-tlr-bar .psdm-tlr-upload input { display: none; }
#psdm-tlr-bar .psdm-tlr-icons,
#psdm-tlr-bar .psdm-tlr-swatches {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	overflow-x: auto;
}
#psdm-tlr-bar .psdm-tlr-icon {
	width: 40px;
	height: 40px;
	border: 1px solid var(--ax-gray-300, #d5d7da);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
#psdm-tlr-bar .psdm-tlr-icon:hover { border-color: var(--ax-accent, #0b6623); }
#psdm-tlr-bar .psdm-tlr-icon img { max-width: 32px; max-height: 32px; object-fit: contain; }
#psdm-tlr-bar .psdm-tlr-swatch {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .15);
	cursor: pointer;
	padding: 0;
}
#psdm-tlr-bar .psdm-tlr-swatch:hover { outline: 2px solid var(--ax-accent, #0b6623); outline-offset: 1px; }
#psdm-tlr-bar .psdm-tlr-close {
	border: 0;
	background: none;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--ax-gray-600, #6d7076);
	margin-left: 2px;
}

/* Right-click layer menu: every item rearranges/duplicates/deletes. */
body.psdm-tpl-fixed #nbd-context-menu,
body.psdm-tpl-fixed .nbd-main-bar [ng-click*="clearAllStage"],
body.psdm-tpl-fixed .nbd-main-bar [ng-click*="clearStage"] {
	display: none !important;
}
