/**
 * PSDM Designer Summary Bar — mockup layout: [stock tile + two-line
 * selection + Change] | Quantity | Subtotal | [− % +] [Fit to Canvas].
 * body.psdm-sbar-on also HIDES the vendor's corner zoomer so there is one
 * zoom control on screen (the fullscreen-mode variant stays, so exiting
 * fullscreen keeps working).
 */

#psdm-sbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 880;
	display: flex;
	align-items: center;
	gap: 22px;
	height: 64px;
	padding: 0 18px;
	background: #fff;
	border-top: 1px solid var(--ax-gray-200, #e8eaee);
	box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
	font-size: 13px;
	color: var(--ax-gray-900, #17181d);
}

/* Left: media tile + two-line selection */
.psdm-sbar-left {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
}

.psdm-sbar-media { flex: 0 0 auto; display: inline-flex; }
.psdm-sbar-media.is-empty { display: none; }
.psdm-sbar-media .psdm-oc-media { width: 40px; height: 40px; border-radius: 9px; }

.psdm-sbar-lines {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.psdm-sbar-line1 {
	font-size: 14px;
	font-weight: 800;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#psdm-sbar.is-empty .psdm-sbar-line1 { font-weight: 600; color: var(--ax-gray-500, #8b909e); }

.psdm-sbar-line2 {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.psdm-sbar-summary {
	font-size: 12.5px;
	color: var(--ax-gray-500, #8b909e);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.psdm-sbar-change {
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ax-accent, #0b6623);
	cursor: pointer;
}

.psdm-sbar-change:hover { text-decoration: underline; }

/* Middle: captioned stats with dividers */
.psdm-sbar-stat {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding-left: 22px;
	border-left: 1px solid var(--ax-gray-200, #e8eaee);
	flex: 0 0 auto;
}

.psdm-sbar-stat.is-hidden { display: none; }

.psdm-sbar-cap {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ax-gray-500, #8b909e);
}

.psdm-sbar-qty { font-size: 15px; font-weight: 700; }

.psdm-sbar-price { font-size: 17px; font-weight: 800; white-space: nowrap; }
.psdm-sbar-price .woocommerce-Price-amount { font-size: 17px; }
.psdm-sbar-price del { display: none; }

/* Right: zoom pill group + Fit button */
.psdm-sbar-zoom {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	padding-left: 22px;
	border-left: 1px solid var(--ax-gray-200, #e8eaee);
}

.psdm-sbar-zgroup {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--ax-gray-300, #d5d8de);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.psdm-sbar-zbtn {
	width: 34px;
	border: 0;
	background: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: var(--ax-gray-900, #17181d);
	padding: 8px 0;
}

.psdm-sbar-zbtn:hover { background: var(--ax-gray-100, #f2f3f6); }

.psdm-sbar-pct {
	min-width: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	border-left: 1px solid var(--ax-gray-200, #e8eaee);
	border-right: 1px solid var(--ax-gray-200, #e8eaee);
	padding: 0 6px;
}

.psdm-sbar-fit {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border: 1px solid var(--ax-gray-300, #d5d8de);
	border-radius: 10px;
	background: #fff;
	padding: 8px 14px;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	color: var(--ax-gray-900, #17181d);
	white-space: nowrap;
}

.psdm-sbar-fit:hover { background: var(--ax-gray-100, #f2f3f6); }
.psdm-sbar-fit svg { width: 15px; height: 15px; }

/* Reserve space + retire the vendor's corner zoomer (one zoom control). */
body.psdm-sbar-on .nbd-guidelines-notice { bottom: 74px; }

/* Guide-legend dock — the bleed/cut/safe chips live IN the bar (chrome, never
   over the canvas). Flatten the floating-pill look the notice host uses. */
#psdm-sbar .psdm-sbar-legend { display: flex; align-items: center; min-width: 0; }
#psdm-sbar .psdm-sbar-legend .psdm-guide-legend {
	margin: 0;
	padding: 0 14px;
	background: none;
	border: 0;
	border-left: 1px solid var(--ax-gray-200, #e9eaec);
	border-radius: 0;
	box-shadow: none;
	flex-wrap: nowrap;
	gap: 6px 12px;
	font-size: 11px;
	color: var(--ax-gray-600, #6d7076);
	white-space: nowrap;
}
/* Tight bars first: the legend is informational — drop it before anything else. */
@media (max-width: 1180px) {
	#psdm-sbar .psdm-sbar-legend { display: none; }
}

body.psdm-sbar-on .nbd-workspace .main,
body.psdm-sbar-on .nbd-sidebar {
	padding-bottom: 64px;
	box-sizing: border-box;
}

body.psdm-sbar-on .nbd-toolbar-zoom:not(.fullscreen-stage-nav) {
	display: none !important;
}

/* Narrow viewports: drop the summary text, keep stats + zoom. */
@media (max-width: 900px) {
	.psdm-sbar-left { display: none; }
	#psdm-sbar { justify-content: flex-end; }
}
