/* CSP Product Mockup — front end (copied from CSP Mockup Studio). Scoped to .csp-pm; matches the site's Roboto / teal / orange styling. */
.csp-pm {
	--pm-accent: #04756f;
	--pm-accent-soft: #e6f3f2;
	--pm-action: #e85d33;
	--pm-action-dark: #c94a24;
	--pm-ink: #1f1f1f;
	--pm-muted: #5f6368;
	--pm-line: #d9d9d9;
	--pm-panel: #ffffff;
	--pm-stage: #ffffff;
	--pm-radius: 10px;
	color: var(--pm-ink);
	font-size: 16px;
	line-height: 1.45;
	max-width: 1280px;
	margin: 0 auto 32px;
	box-sizing: border-box;
}
.csp-pm *, .csp-pm *::before, .csp-pm *::after { box-sizing: border-box; }
.csp-pm [hidden] { display: none !important; }

.csp-pm__layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }

/* Preview */
.csp-pm__stage { position: sticky; top: calc(16px + var(--wp-admin--admin-bar--height, 0px)); min-width: 0; }
.csp-pm__preview {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	min-height: 320px;
	background: var(--pm-stage);
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius);
	overflow: hidden;
}
.csp-pm__canvas { display: block; max-width: 100%; }
.csp-pm__canvas.has-art { touch-action: none; }
.csp-pm__canvas.is-dragging { cursor: grabbing !important; }
.csp-pm__loading, .csp-pm__empty {
	position: absolute; inset: auto; padding: 10px 16px; border-radius: 999px;
	background: rgba(255, 255, 255, 0.92); color: var(--pm-muted); font-size: 15px;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.csp-pm__under { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.csp-pm__views { display: inline-flex; flex-wrap: wrap; gap: 6px; background: #ececec; padding: 4px; border-radius: 999px; }
.csp-pm__view {
	appearance: none; border: 0; background: transparent; color: var(--pm-ink);
	font: inherit; font-weight: 600; font-size: 15px;
	padding: 8px 18px; min-height: 40px; border-radius: 999px; cursor: pointer;
}
.csp-pm__view.is-active { background: #fff; color: var(--pm-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.csp-pm__downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.csp-pm__note { margin: 10px 0 0; font-size: 14px; color: var(--pm-muted); }

/* Controls */
.csp-pm__controls { display: flex; flex-direction: column; gap: 16px; }
.csp-pm__field { display: flex; flex-direction: column; gap: 6px; }
.csp-pm__label { font-family: Roboto, "Helvetica Neue", Arial, sans-serif; font-weight: 700; font-size: 15px; color: var(--pm-ink); }
.csp-pm__select {
	width: 100%; min-height: 46px; padding: 8px 12px;
	font: inherit; font-size: 16px; color: var(--pm-ink);
	background: #fff; border: 1px solid #bdbdbd; border-radius: 8px;
}
.csp-pm__select:focus { outline: 2px solid var(--pm-accent); outline-offset: 1px; border-color: var(--pm-accent); }

.csp-pm__swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.csp-pm__swatch {
	width: 40px; height: 40px; border-radius: 50%; cursor: pointer; padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 3px #fff;
}
.csp-pm__swatch.is-active { outline: 3px solid var(--pm-accent); outline-offset: 2px; }

.csp-pm__panel {
	background: var(--pm-panel);
	border: 1px solid var(--pm-line);
	border-top: 4px solid var(--pm-accent);
	border-radius: var(--pm-radius);
	padding: 14px 16px 16px;
}
.csp-pm__panel-title { margin: 0 0 10px; font-family: Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 18px; font-weight: 700; color: var(--pm-ink); }
.csp-pm__file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.csp-pm__hint { margin: 8px 0 0; font-size: 14px; color: var(--pm-muted); }
.csp-pm__filename { margin: 0 0 10px; font-weight: 600; word-break: break-all; font-size: 15px; }
.csp-pm__group { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #eee; }
.csp-pm__sublabel { font-weight: 600; font-size: 15px; color: var(--pm-ink); }

.csp-pm__pad { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); gap: 6px; }
.csp-pm__pad-up { grid-column: 2; grid-row: 1; }
.csp-pm__pad-left { grid-column: 1; grid-row: 2; }
.csp-pm__pad-down { grid-column: 2; grid-row: 2; }
.csp-pm__pad-right { grid-column: 3; grid-row: 2; }
.csp-pm__size { display: flex; align-items: center; gap: 10px; }
.csp-pm__size-value { min-width: 9.5em; text-align: center; font-size: 14px; color: var(--pm-muted); }

.csp-pm__icon {
	width: 46px; height: 46px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 18px; line-height: 1; font-weight: 700; color: var(--pm-accent);
	background: var(--pm-accent-soft); border: 1px solid #b9dcd9; border-radius: 8px;
	cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.csp-pm__icon:hover { background: #d4ebe9; }
.csp-pm__icon:active { background: var(--pm-accent); color: #fff; }

.csp-pm__check { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #eee; font-size: 15px; cursor: pointer; }
.csp-pm__check input { width: 22px; height: 22px; accent-color: var(--pm-accent); margin: 0; }
.csp-pm__row { display: flex; gap: 10px; padding-top: 10px; border-top: 1px solid #eee; }
.csp-pm__row .csp-pm__btn { flex: 1; }

.csp-pm__btn {
	appearance: none; display: inline-flex; align-items: center; justify-content: center;
	min-height: 46px; padding: 10px 18px;
	font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none;
	border-radius: 8px; border: 1px solid transparent; cursor: pointer; touch-action: manipulation;
}
.csp-pm__btn:disabled { opacity: 0.6; cursor: progress; }
.csp-pm__btn--primary, .csp-pm__btn--upload { background: var(--pm-action); color: #fff; }
.csp-pm__btn--primary:hover, .csp-pm__btn--upload:hover { background: var(--pm-action-dark); color: #fff; }
.csp-pm__btn--upload { width: 100%; }
.csp-pm__btn--secondary { background: #fff; color: var(--pm-accent); border-color: var(--pm-accent); }
.csp-pm__btn--secondary:hover { background: var(--pm-accent-soft); color: var(--pm-accent); }
.csp-pm__btn--ghost { background: #fff; color: #b3261e; border-color: #e3b3ae; }
.csp-pm__btn--ghost:hover { background: #fdf0ef; color: #b3261e; }
.csp-pm__btn:focus-visible, .csp-pm__icon:focus-visible, .csp-pm__view:focus-visible, .csp-pm__swatch:focus-visible, .csp-pm__reuse-btn:focus-visible { outline: 3px solid var(--pm-accent); outline-offset: 2px; }

.csp-pm__reuse { margin-top: 6px; }
.csp-pm__reuse-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.csp-pm__reuse-btn {
	display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 10px;
	font: inherit; font-size: 15px; text-align: left; word-break: break-all; color: var(--pm-ink);
	background: #fafafa; border: 1px dashed #b9b9b9; border-radius: 8px; cursor: pointer;
}
.csp-pm__reuse-btn:hover { border-color: var(--pm-accent); background: var(--pm-accent-soft); }
.csp-pm__reuse-btn img { width: 32px; height: 32px; object-fit: contain; flex: none; background: repeating-conic-gradient(#e6e6e6 0 25%, #fff 0 50%) 0 0 / 10px 10px; border-radius: 4px; }

.csp-pm__msg { margin: 10px 0 0; padding: 10px 12px; font-size: 14px; background: #fff7e6; border: 1px solid #f2d59b; border-radius: 8px; color: #6b4c00; }

/* Text panels ("One logo + text" products) */
.csp-pm__panel--text .csp-pm__sublabel { display: block; }
.csp-pm__textarea {
	width: 100%; margin-top: 6px; padding: 10px 12px; resize: vertical; min-height: 54px;
	font: inherit; font-size: 16px; line-height: 1.4; color: var(--pm-ink);
	background: #fff; border: 1px solid #bdbdbd; border-radius: 8px;
}
.csp-pm__textarea:focus { outline: 2px solid var(--pm-accent); outline-offset: 1px; border-color: var(--pm-accent); }
.csp-pm__panel--text .csp-pm__hint { margin: 4px 0 10px; }
.csp-pm__text-style { display: flex; gap: 12px; align-items: flex-end; padding: 8px 0; border-top: 1px solid #eee; }
.csp-pm__mini { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; flex: 1; min-width: 0; }
.csp-pm__mini--colour { flex: none; }
.csp-pm__select--small { min-height: 44px; }
.csp-pm__colour { width: 56px; height: 44px; padding: 2px; border: 1px solid #bdbdbd; border-radius: 8px; background: #fff; cursor: pointer; }
.csp-pm__toggles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.csp-pm__toggle {
	min-width: 46px; height: 44px; padding: 0 10px;
	font: inherit; font-size: 14px; font-weight: 600; color: var(--pm-accent);
	background: #fff; border: 1px solid #b9dcd9; border-radius: 8px; cursor: pointer; touch-action: manipulation;
}
.csp-pm__toggle[aria-pressed="true"] { background: var(--pm-accent); border-color: var(--pm-accent); color: #fff; }
.csp-pm__toggle--bold { font-weight: 800; font-size: 17px; font-family: Georgia, serif; }
.csp-pm__toggle:focus-visible { outline: 3px solid var(--pm-accent); outline-offset: 2px; }
.csp-pm__downloads + .csp-pm__msg, .csp-pm__stage > .csp-pm__msg { margin-top: 10px; }

/* Restricted message */
.csp-pm-locked { max-width: 560px; margin: 24px auto; padding: 24px; text-align: center; background: #fff; border: 1px solid #d9d9d9; border-radius: 10px; }
.csp-pm-locked__btn { display: inline-block; padding: 12px 22px; background: #e85d33; color: #fff !important; border-radius: 8px; font-weight: 600; text-decoration: none; }

/* Phones and small tablets: preview on top, controls below */
@media (max-width: 860px) {
	.csp-pm__layout { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-bottom: 30vh; }
	/* The preview stays pinned at the top while the controls scroll underneath it. */
	.csp-pm__stage { display: contents; }
	.csp-pm__preview {
		position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 5;
		min-height: 200px; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.35);
	}
	.csp-pm__note { margin: 0; }
	.csp-pm__under { flex-direction: column; align-items: stretch; }
	.csp-pm__views { align-self: center; }
	.csp-pm__downloads { margin-left: 0; }
	.csp-pm__downloads .csp-pm__btn { flex: 1 1 100%; }
	.csp-pm__pad { grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(2, 52px); }
	.csp-pm__icon { width: 52px; height: 52px; }
}
@media (max-width: 600px) {
	/* WordPress unpins its admin bar on phones, so pin the preview to the very top. */
	.csp-pm__preview { top: 0; }
	.csp-pm__toggles { flex-wrap: nowrap; gap: 5px; }
	.csp-pm__toggle { min-width: 40px; padding: 0 8px; font-size: 14px; }
}

/* Order / quote buttons and the "not available" notice */
.csp-pm__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.csp-pm__actions .csp-pm__btn { flex: 1 1 200px; }
.csp-pm__btn--teal { background: var(--pm-accent); color: #fff !important; }
.csp-pm__btn--teal:hover { background: #035c57; color: #fff; }
.csp-pm__notice { margin: 0 0 14px; padding: 10px 14px; background: #fff7e6; border: 1px solid #f2d59b; border-radius: 8px; color: #6b4c00; }

/* Quote dialog (from the Trade Show Kit tool) */
.csp-pm__modal {
	position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, 0.55);
	display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto;
}
html.csp-pm-modal-open { overflow: hidden; }
.csp-pm__dialog { position: relative; width: 100%; max-width: 640px; background: #fff; border-radius: 12px; padding: 22px 22px 24px; margin: auto 0; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.csp-pm__dialog h3 { margin: 0 34px 4px 0; font-size: 22px; }
.csp-pm .csp-pm__close { position: absolute; z-index: 2; top: 10px; right: 12px; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 30px; line-height: 44px; text-align: center; cursor: pointer; color: var(--pm-muted); }
.csp-pm .csp-pm__close:hover { background: #f1f1f1; color: var(--pm-ink); }
.csp-pm__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 16px; }
.csp-pm__dialog label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: 14px; }
.csp-pm__dialog input[type="text"], .csp-pm__dialog input[type="email"], .csp-pm__dialog input[type="tel"], .csp-pm__dialog textarea {
	width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; font-weight: 400; border: 1px solid #bdbdbd; border-radius: 8px;
}
.csp-pm__dialog input[type="file"] { font-weight: 400; font-size: 14px; }
.csp-pm__full { margin-top: 12px; }
.csp-pm__opt { font-weight: 400; font-size: 13px; color: var(--pm-muted); }
.csp-pm__hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.csp-pm__progress { height: 6px; border-radius: 999px; background: #eee; margin: 14px 0 0; overflow: hidden; }
.csp-pm__progress span { display: block; height: 100%; width: 0; background: var(--pm-accent); transition: width 0.2s; }
.csp-pm__dialog form .csp-pm__btn { margin-top: 16px; width: 100%; }
.csp-pm__msg--error { background: #fdecea; border-color: #f1b8b2; color: #b3261e; }
.csp-pm__done p { font-size: 17px; margin: 18px 0; }
@media (max-width: 640px) {
	.csp-pm__grid { grid-template-columns: 1fr; }
	.csp-pm__dialog { padding: 18px 16px 20px; }
}
