:root {
	--wcp-bg: #ffffff;
	--wcp-panel: #ffffff;
	--wcp-border: #e8e8e8;
	--wcp-accent: #7c2d2d;
	--wcp-accent-hover: #632525;
	--wcp-text: #1a1a1a;
	--wcp-muted: #6b6b6b;
	--wcp-input-bg: #f3f3f3;
	--wcp-dim-field-bg: #e8e8e8;
	--wcp-dim-field-bg-hover: #dedede;
	--wcp-dim-field-bg-active: #d4d4d4;
	--wcp-radius: 2px;
	--wcp-font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.wcp-editor-body {
	margin: 0 auto;
	max-width: 1650px;
	width: 100%;
	box-sizing: border-box;
	background: var(--wcp-bg);
	color: var(--wcp-text);
	font-family: var(--wcp-font-family);
	font-size: 16px;
	line-height: 1.45;
}

body.wcp-editor-body,
body.wcp-editor-body #wcp-app-root,
body.wcp-editor-body #wcp-app-root button,
body.wcp-editor-body #wcp-app-root input,
body.wcp-editor-body #wcp-app-root select,
body.wcp-editor-body #wcp-app-root textarea,
.wcp-editor-body.wcp-editor--embed,
.wcp-editor-body.wcp-editor--embed #wcp-app-root,
.wcp-editor-body.wcp-editor--embed #wcp-app-root button,
.wcp-editor-body.wcp-editor--embed #wcp-app-root input,
.wcp-editor-body.wcp-editor--embed #wcp-app-root select,
.wcp-editor-body.wcp-editor--embed #wcp-app-root textarea {
	font-family: var(--wcp-font-family);
}

#wcp-app-root button:not(.wcp-add-to-cart-btn):not(.wcp-pdf-btn):not(.wcp-rot-btn):not(.wcp-shape-btn):not(.wcp-dim-btn),
#wcp-app-root input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='hidden']):not(#wcp-w-cm):not(#wcp-h-cm),
#wcp-app-root select,
#wcp-app-root textarea,
#wcp-app-root a.wcp-back-to-product-btn {
	border-radius: 2px !important;
}

#wcp-app-root {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	/* `hidden` tworzy scrollport i psuje `position: sticky` wewnątrz — `clip` obcina poziomo bez tego efektu. */
	overflow-x: clip;
}

@supports not (overflow: clip) {
	#wcp-app-root {
		overflow-x: hidden;
	}
}

.wcp-editor-body.wcp-editor--embed #wcp-app-root {
	min-height: 0;
}

/* Blok shortcode — konfigurator w treści strony, pod ewentualną treścią „before”. */
.wcp-wallpaper-cropper-shortcode {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: clip;
}

@supports not (overflow: clip) {
	.wcp-wallpaper-cropper-shortcode {
		overflow-x: hidden;
	}
}

.wcp-wallpaper-cropper-before {
	margin: 0 0 1.25em;
	box-sizing: border-box;
}

.wcp-shortcode-error {
	margin: 0.75em 0;
	padding: 0.75em 1em;
	font-size: 0.9rem;
	color: var(--wcp-text);
	background: #fff3f3;
	border: 1px solid #e8c8c8;
	box-sizing: border-box;
}

.wcp-image-load-error {
	margin: 0;
	padding: 24px;
	font-size: 0.95rem;
	color: var(--wcp-text);
}

/* Topbar: cienki, tylko nazwa — można ukryć w CSS sklepu */
.wcp-topbar {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 24px;
	background: var(--wcp-bg);
	border-bottom: 1px solid var(--wcp-border);
}

.wcp-editor--order-edit .wcp-topbar {
	display: flex;
}

#wcp-app-root.wcp-editor--order-edit .wcp-add-to-cart-btn {
	display: none !important;
}

#wcp-app-root.wcp-editor--order-edit .wcp-cart-block {
	display: none !important;
}

.wcp-dims--locked .wcp-dim-btn,
.wcp-dims--locked .wcp-dim-input-wrap input {
	pointer-events: none;
	cursor: not-allowed;
}

.wcp-dims--locked .wcp-dim-input-wrap input {
	opacity: 0.85;
	background: var(--wcp-dim-field-bg, #e8e8e8);
}

.wcp-bleed-row--locked .wcp-bleed-line {
	pointer-events: none;
	cursor: not-allowed;
	opacity: 0.85;
}

.wcp-bleed-row--locked .wcp-toolbar-toggle {
	cursor: not-allowed;
}

.wcp-topbar-title {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	flex: 1;
	min-width: 0;
}

.wcp-topbar-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

/* Edycja kadru z zamówienia — przycisk „Zapisz zmiany” (#111, bez stylu WC .button.alt). */
#wcp-app-root.wcp-editor--order-edit .wcp-order-save-btn,
#wcp-app-root.wcp-editor--order-edit button.wcp-order-save-btn,
#wcp-app-root.wcp-editor--order-edit .button.wcp-order-save-btn,
#wcp-app-root.wcp-editor--order-edit .button.alt.wcp-order-save-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 12px 20px;
	box-sizing: border-box;
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 400;
	line-height: 14px;
	white-space: nowrap;
	cursor: pointer;
	border: 1px solid #111 !important;
	border-radius: 2px;
	background: #111 !important;
	background-color: #111 !important;
	color: #fff !important;
	box-shadow: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#wcp-app-root.wcp-editor--order-edit .wcp-order-save-btn:hover:not(:disabled),
#wcp-app-root.wcp-editor--order-edit .wcp-order-save-btn:focus:not(:disabled),
#wcp-app-root.wcp-editor--order-edit button.wcp-order-save-btn:hover:not(:disabled),
#wcp-app-root.wcp-editor--order-edit .button.alt.wcp-order-save-btn:hover:not(:disabled) {
	background: #000 !important;
	background-color: #000 !important;
	border-color: #000 !important;
	color: #fff !important;
}

#wcp-app-root.wcp-editor--order-edit .wcp-order-save-btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

#wcp-app-root.wcp-editor--order-edit .wcp-order-save-btn:disabled,
#wcp-app-root.wcp-editor--order-edit button.wcp-order-save-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	background: #111 !important;
	background-color: #111 !important;
	border-color: #111 !important;
	color: #fff !important;
}

.wcp-order-saved-at {
	font-size: 0.85rem;
	color: var(--wcp-muted);
	white-space: nowrap;
}

.wcp-order-price-diff {
	margin: 10px 0 0;
	padding: 10px 12px;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--wcp-text);
	background: #fff8e5;
	border: 1px solid #e6c200;
	border-radius: var(--wcp-radius);
}

.wcp-layout {
	display: grid;
	grid-template-columns: minmax(0, 13fr) minmax(0, 7fr);
	gap: 10px 50px;
	padding-top: 20px;
	padding-bottom: 20px;
	padding-left: 2%;
	padding-right: 2%;
	flex: 1;
	box-sizing: border-box;
	align-items: start;
	max-width: 1650px;
	margin: 0 auto;
	width: 100%;
	min-width: 0;
	overflow-x: clip;
}

@supports not (overflow: clip) {
	.wcp-layout {
		overflow-x: hidden;
	}
}

.wcp-preview-col {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	gap: 0;
	overflow-x: clip;
	position: sticky;
	top: calc(env(safe-area-inset-top, 0px) + var(--wcp-preview-sticky-delta, 10px));
	align-self: start;
	z-index: 10;
}

@supports not (overflow: clip) {
	.wcp-preview-col {
		overflow-x: hidden;
	}
}

/* Obszar podglądu/kadru: szerokość kolumny z równym odstępem od boków (np. przy 500 cm ściany). */
.wcp-preview-col > .wcp-crop-main {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	width: 100%;
	min-width: 0;
	flex: 1 1 auto;
	box-sizing: border-box;
	overflow: visible;
}

.wcp-preview-col > .wcp-crop-main > .wcp-workspace {
	align-self: stretch;
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
	box-sizing: border-box;
	flex: 1 1 auto;
	min-width: 0;
}

.wcp-preview-col .wcp-stage-outer,
.wcp-preview-col .wcp-stage-column,
.wcp-preview-col .wcp-canvas-cluster,
.wcp-preview-col .wcp-stage-wrap {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
}

.wcp-preview-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 30px;
	padding-top: 2px;
	padding-bottom: 15px;
	margin-bottom: 25px;
	border-bottom: 1px solid var(--wcp-border);
}

.wcp-preview-toolbar__grow {
	flex: 1 1 40px;
	min-width: 8px;
}

/* Nad całym układem kadrowania (obie kolumny), nie w pasku obok „Dopasuj tapetę…”. */
.wcp-back-to-product-bar {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-start;
	gap: 10px;
	flex: 0 0 auto;
	width: 100%;
	max-width: 1650px;
	margin: 0 auto;
	padding-top: 10px;
	padding-bottom: 10px;
	padding-left: 2%;
	padding-right: 2%;
	box-sizing: border-box;
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 20;
	background: var(--wcp-bg);
}

#wcp-app-root .wcp-back-to-product-btn,
#wcp-app-root .wcp-back-to-product-btn:link,
#wcp-app-root .wcp-back-to-product-btn:visited {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	box-sizing: border-box;
	min-height: 38px;
	padding: 10px 14px;
	margin: 0;
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	text-align: left;
	color: var(--wcp-text);
	background: var(--wcp-dim-field-bg);
	border: none;
	border-radius: 0;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		color 0.15s ease;
}

#wcp-app-root .wcp-back-to-product-btn__ico {
	display: block;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	object-fit: contain;
}

#wcp-app-root .wcp-back-to-product-btn__label {
	display: inline-block;
}

#wcp-app-root .wcp-back-to-product-btn:hover,
#wcp-app-root .wcp-back-to-product-btn:focus {
	background: var(--wcp-dim-field-bg-hover);
	color: var(--wcp-text);
	text-decoration: none;
}

#wcp-app-root .wcp-back-to-product-btn:active {
	background: var(--wcp-dim-field-bg-active);
}

#wcp-app-root .wcp-back-to-product-btn:focus {
	outline: none;
}

#wcp-app-root .wcp-back-to-product-btn:focus-visible {
	outline: 2px solid rgba(124, 45, 45, 0.35);
	outline-offset: 2px;
}

#wcp-app-root .wcp-back-to-product-btn--account,
#wcp-app-root .wcp-back-to-product-btn--account:link,
#wcp-app-root .wcp-back-to-product-btn--account:visited {
	color: #fff;
	background: #111;
}

#wcp-app-root .wcp-back-to-product-btn--account:hover,
#wcp-app-root .wcp-back-to-product-btn--account:focus {
	color: #fff;
	background: #252525;
	text-decoration: none;
}

#wcp-app-root .wcp-back-to-product-btn--account:active {
	background: #000;
}

#wcp-app-root .wcp-back-to-product-btn--account:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.35);
	outline-offset: 2px;
}

.wcp-preview-toolbar__hint {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 42rem;
	font-size: 20px;
	font-weight: 400;
	color: var(--wcp-text);
	line-height: 26px;
	text-align: left;
	padding-right: 10px;
	box-sizing: border-box;
}

.wcp-preview-toolbar__group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wcp-pt-label {
	white-space: nowrap;
}

.wcp-workspace {
	background: transparent;
	border: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	flex: 1 1 auto;
	min-height: 0;
	/* Żadnego przesuwania całego podglądu w poziomie (tylko pionowy scroll przy wysokim kadrowaniu). */
	overflow-x: hidden;
}

.wcp-stage-outer {
	position: relative;
	flex: 1 1 auto;
	min-height: min(520px, 62vh);
	min-width: 0;
	width: 100%;
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
	padding: 0;
	box-sizing: border-box;
	background: transparent;
	/* Bez poziomego scrolla / „szarpania” całej grafiki z miarkami. */
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior-x: none;
	touch-action: pan-y;
}

/* Filc: przesuwanie kadru — bez przechwytywania gestów scrolla przez kontener. */
#wcp-app-root.wcp-editor--filc .wcp-stage-outer,
#wcp-app-root.wcp-editor--filc .wcp-workspace,
#wcp-app-root.wcp-editor--filc .wcp-preview-col {
	touch-action: none;
}

/* Filc: zapas włączony w edytorze (jak tapety), bez wiersza w panelu. */
.wcp-bleed-row--filc-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.wcp-image-loading-overlay {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 24px;
	background: var(--wcp-bg);
	pointer-events: none;
}

.wcp-image-loading-overlay__text {
	margin: 0;
	font-family: var(--wcp-font-family);
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--wcp-muted);
	text-align: center;
	line-height: 1.5;
	max-width: 28rem;
}

.wcp-stage-column {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	gap: 8px;
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
}

/* Ukryte wizualnie — refreshCropOffsetLabels() nadal działa; można przywrócić widok usuwając display. */
.wcp-crop-offsets {
	display: none;
	font-size: 0.875rem;
	color: var(--wcp-muted);
	text-align: center;
	line-height: 1.45;
	max-width: 100%;
	padding: 0 0 4px;
	box-sizing: border-box;
}

.wcp-canvas-cluster {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: visible;
	background: transparent;
}

.wcp-stage-wrap {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.wcp-ruler-corner {
	width: 36px;
	height: 28px;
	flex: 0 0 28px;
	background: transparent;
	border: none;
}

.wcp-ruler-h,
.wcp-ruler-v {
	background: transparent;
	border: none;
	font-size: 10px;
	color: var(--wcp-muted);
	position: relative;
	overflow: visible;
}

.wcp-ruler-h {
	height: 28px;
}

.wcp-ruler-v {
	width: 36px;
}

.wcp-stage-inner {
	position: relative;
	line-height: 0;
	background: transparent;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: min(520px, 62vh);
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
}

.wcp-stage-canvas-slot {
	position: relative;
	flex: 0 0 auto;
	line-height: 0;
	overflow: visible;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	flex-wrap: nowrap;
}

/* Ramka = szerokość canvas + linijki; slot wyśrodkowuje ją poziomo. */
.wcp-stage-canvas-frame {
	position: relative;
	line-height: 0;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.wcp-stage-canvas-frame > .wcp-ruler-h,
.wcp-stage-canvas-frame > .wcp-ruler-v {
	position: absolute;
	pointer-events: none;
	overflow: visible;
}

#wcp-canvas {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	cursor: default;
	touch-action: none;
	flex: 0 0 auto;
}

/* Linia i odstępy jak nad kadrem (.wcp-preview-toolbar: border-bottom + padding/margin). */
.wcp-preview-foot {
	margin-top: 16px;
	padding-top: 18px;
	border-top: 1px solid var(--wcp-border);
}

.wcp-price-summary {
	font-size: 0.95rem;
	margin-bottom: 10px;
	color: var(--wcp-text);
}

.wcp-price-summary strong {
	font-weight: 600;
}

/* Reset domyślnych: zwykły tekst (link), kreska rozdzielająca pod spodem. */
.wcp-rotate-panel-section .wcp-reset-row--under-panels {
	display: block;
	text-align: right;
	margin: 0;
	margin-top: 0;
	margin-bottom: 0;
	padding: 15px 0 15px;
	border-bottom: 1px solid var(--wcp-border);
	width: 100%;
	box-sizing: border-box;
}

.wcp-reset-text {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--wcp-font-family);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--wcp-text);
	text-decoration: none;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	box-shadow: none;
	vertical-align: middle;
}

.wcp-reset-text__ico {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
	align-items: center;
	justify-content: center;
}

.wcp-reset-text__img {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.wcp-reset-text__label {
	display: inline;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
}

.wcp-reset-text:visited {
	color: var(--wcp-text);
}

.wcp-reset-text:hover {
	text-decoration: underline;
	color: inherit;
}

.wcp-reset-text:focus {
	outline: none;
}

.wcp-reset-text:focus-visible {
	outline: 2px solid var(--wcp-accent);
	outline-offset: 2px;
}

.wcp-panel {
	background: var(--wcp-panel);
	border: none;
	border-radius: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 0;
	align-self: stretch;
	box-shadow: none;
}

.wcp-meta-block {
	display: flex;
	flex-direction: column;
	border-bottom: 1px solid var(--wcp-border);
	padding-bottom: 10px;
	margin-bottom: 16px;
}

.wcp-meta-row {
	display: grid;
	grid-template-columns: minmax(0, 34%) 1fr auto;
	align-items: start;
	gap: 8px 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--wcp-border);
	font-size: 1rem;
}

.wcp-meta-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wcp-meta-label,
.wcp-pt-label {
	font-size: 1rem;
	line-height: 1.45;
	color: var(--wcp-text);
	font-weight: 500;
}

.wcp-meta-value {
	color: var(--wcp-text);
	text-align: left;
	line-height: 1.45;
}

#wcp-meta-texture-value {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
}

.wcp-meta-texture-desc {
	font-size: 0.875rem;
	line-height: 1.35;
	color: var(--wcp-muted);
	white-space: pre-wrap;
}

.wcp-meta-action {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	font-family: var(--wcp-font-family);
	color: var(--wcp-accent);
	text-decoration: none;
	font-size: 14px;
	font-weight: 400;
	white-space: nowrap;
	line-height: 1.45;
}

.wcp-meta-action-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
	color: inherit;
}

.wcp-meta-action-ico svg {
	width: 20px;
	height: 20px;
	display: block;
}

.wcp-meta-action:hover {
	color: var(--wcp-accent-hover);
	text-decoration: underline;
}

/*
 * Motywy często ustawiają globalnie a, a:link (duży rozmiar, niebieski).
 * ID #wcp-app-root podnosi specyficzność ponad typowe reguły motywu.
 */
#wcp-app-root a.wcp-meta-action,
#wcp-app-root a.wcp-meta-action:link {
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--wcp-accent);
	text-decoration: none;
}

#wcp-app-root a.wcp-meta-action:visited {
	color: var(--wcp-accent);
}

#wcp-app-root a.wcp-meta-action:hover {
	color: var(--wcp-accent-hover);
	text-decoration: underline;
}

#wcp-app-root a.wcp-meta-action .wcp-meta-action-ico svg,
#wcp-app-root .wcp-meta-action--texture .wcp-meta-action-ico svg {
	width: 20px;
	height: 20px;
	max-width: 20px;
	max-height: 20px;
	flex-shrink: 0;
	display: block;
}

#wcp-app-root a.wcp-reset-text,
#wcp-app-root a.wcp-reset-text:link {
	font-family: var(--wcp-font-family);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--wcp-text);
	text-decoration: none;
}

#wcp-app-root a.wcp-reset-text:visited {
	color: var(--wcp-text);
}

#wcp-app-root a.wcp-reset-text:hover {
	color: var(--wcp-text);
	text-decoration: underline;
}

#wcp-app-root a.wcp-reset-text .wcp-reset-text__label {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.wcp-panel-section {
	border-bottom: 1px solid var(--wcp-border);
	padding-bottom: 15px;
	margin-bottom: 0;
}

.wcp-panel-section:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.wcp-section-head {
	font-size: 16px;
	font-weight: 600;
	color: var(--wcp-text);
	margin-bottom: 12px;
}

.wcp-dims-head-row {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: flex-start;
	gap: 8px 14px;
	margin-bottom: 12px;
}

.wcp-dims-head-row--no-toggle {
	gap: 0;
}

.wcp-section-head.wcp-section-head--dims {
	margin-bottom: 0;
	flex: 0 1 auto;
	min-width: 0;
}

#wcp-app-root .wcp-full-source-dims-btn {
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	box-shadow: none;
	font-family: var(--wcp-font-family);
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.35;
	color: #b0b0b0;
	text-decoration: none;
	cursor: pointer;
	white-space: normal;
	text-align: left;
	flex: 0 1 auto;
	max-width: 100%;
	text-transform: lowercase;
	transition: color 0.15s ease;
}

#wcp-app-root .wcp-full-source-dims-btn:hover {
	color: #8c8c8c;
	text-decoration: none;
}

#wcp-app-root .wcp-full-source-dims-btn:focus {
	outline: none;
}

#wcp-app-root .wcp-full-source-dims-btn:focus-visible {
	outline: 2px solid rgba(124, 45, 45, 0.35);
	outline-offset: 2px;
	border-radius: 2px;
}

.wcp-field label:not(.wcp-scale-label) {
	display: block;
	font-size: 0.875rem;
	color: var(--wcp-muted);
	margin-bottom: 6px;
}

.wcp-field input:not([type='range']),
.wcp-field select {
	width: 100%;
	padding: 10px 12px;
	border: none;
	border-radius: var(--wcp-radius);
	font-size: 0.95rem;
	box-sizing: border-box;
	background: var(--wcp-input-bg);
	color: var(--wcp-text);
}

.wcp-field input:not([type='range']):focus,
.wcp-field input:not([type='range']):focus-visible,
.wcp-field select:focus,
.wcp-field select:focus-visible {
	outline: 2px solid rgba(124, 45, 45, 0.25);
	outline-offset: 1px;
}

.wcp-dims-inline {
	display: block;
}

.wcp-dims-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 6px 12px;
	align-items: stretch;
	justify-items: stretch;
}

.wcp-dim-stepper {
	display: flex;
	flex-direction: row;
	align-items: center;
	min-width: 0;
	gap: 5px;
}

/**
 * Przyciski ± przy wymiarach: pełny reset (motyw / Woo / przeglądarka),
 * bez ramki — tylko tło jak pole liczbowe; odstęp od pól = gap na .wcp-dim-stepper.
 */
#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: var(--wcp-font-family);
	font-size: 1.05rem;
	font-weight: 600;
	font-style: normal;
	line-height: 1;
	letter-spacing: 0;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	text-shadow: none;
	color: var(--wcp-text);
	background-color: var(--wcp-dim-field-bg);
	background-image: none;
	border: 0;
	border-style: none;
	border-width: 0;
	border-radius: 5px;
	box-shadow: none;
	outline: 0;
	outline-offset: 0;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.12s ease, color 0.12s ease;
}

#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn:hover,
#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn:focus:hover {
	color: var(--wcp-text);
	background-color: var(--wcp-dim-field-bg-hover);
	background-image: none;
	box-shadow: none;
	border: 0;
}

#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn:focus {
	outline: 0;
	box-shadow: none;
	border: 0;
}

#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn:focus-visible {
	outline: 2px solid rgba(124, 45, 45, 0.35);
	outline-offset: -2px;
	box-shadow: none;
	border: 0;
	z-index: 1;
}

#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn:active {
	color: var(--wcp-text);
	background-color: var(--wcp-dim-field-bg-active);
	background-image: none;
	box-shadow: none;
	border: 0;
}

#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn--minus,
#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn--plus {
	font-size: 0;
	line-height: 0;
}

#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn .wcp-dim-btn-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

#wcp-app-root .wcp-dim-stepper button.wcp-dim-btn .wcp-dim-btn-icon svg {
	width: 16px;
	height: 16px;
	display: block;
	flex-shrink: 0;
}

.wcp-dim-input-wrap {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 40px;
	display: flex;
	align-items: stretch;
	border-radius: 5px;
	overflow: hidden;
}

#wcp-app-root .wcp-dim-stepper .wcp-dim-input-wrap input[type='number'],
#wcp-app-root #wcp-w-cm,
#wcp-app-root #wcp-h-cm {
	-moz-appearance: textfield;
	-webkit-appearance: none;
	appearance: textfield;
	width: 100%;
	margin: 0;
	padding: 0 8px;
	height: 40px;
	min-height: 40px;
	box-sizing: border-box;
	border: none;
	border-radius: 5px !important;
	background: var(--wcp-dim-field-bg);
	color: var(--wcp-text);
	font-size: 16px;
	line-height: 40px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.12s ease;
}

#wcp-app-root .wcp-dim-stepper .wcp-dim-input-wrap input[type='number']::-webkit-outer-spin-button,
#wcp-app-root .wcp-dim-stepper .wcp-dim-input-wrap input[type='number']::-webkit-inner-spin-button,
#wcp-app-root #wcp-w-cm::-webkit-outer-spin-button,
#wcp-app-root #wcp-w-cm::-webkit-inner-spin-button,
#wcp-app-root #wcp-h-cm::-webkit-outer-spin-button,
#wcp-app-root #wcp-h-cm::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

#wcp-app-root .wcp-dim-stepper .wcp-dim-input-wrap input[type='number']:focus,
#wcp-app-root .wcp-dim-stepper .wcp-dim-input-wrap input[type='number']:focus-visible,
#wcp-app-root #wcp-w-cm:focus,
#wcp-app-root #wcp-w-cm:focus-visible,
#wcp-app-root #wcp-h-cm:focus,
#wcp-app-root #wcp-h-cm:focus-visible {
	outline: none;
	box-shadow: none;
	border-radius: 5px !important;
	background-color: var(--wcp-dim-field-bg-active);
}

.wcp-dim-sublabel {
	font-size: 12px;
	color: var(--wcp-muted);
	text-align: center;
}

.wcp-dims-sub-spacer {
	display: block;
	min-height: 0;
	pointer-events: none;
}

.wcp-dims-x {
	justify-self: center;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	line-height: 0;
	color: var(--wcp-muted);
}

#wcp-app-root .wcp-dims-x-img {
	display: inline-block;
	vertical-align: middle;
	width: 1.125em;
	height: 1.125em;
	max-width: 22px;
	max-height: 22px;
	margin: 0 2px;
	object-fit: contain;
	flex-shrink: 0;
}

.wcp-bleed-dims-num .wcp-dims-x-img {
	vertical-align: -0.12em;
}

.wcp-bleed-row {
	margin: 0;
	padding: 15px 0;
	border-bottom: 1px solid var(--wcp-border);
	box-sizing: border-box;
}

.wcp-bleed-line {
	display: flex;
	align-items: center;
	gap: 14px;
}

.wcp-bleed-line > .wcp-toolbar-toggle {
	flex-shrink: 0;
	margin-top: 0;
}

/* Jak etykiety przełączników „Pokaż podział na bryty” / siatka (.wcp-rotate-panel-section .wcp-pt-label). */
.wcp-bleed-copy {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	flex: 1 1 auto;
	flex-wrap: wrap;
	min-width: 0;
	min-height: 24px;
	margin: 0;
	padding: 0;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.25;
	color: var(--wcp-text);
	cursor: pointer;
	box-sizing: border-box;
}

.wcp-bleed-lead {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

/* Wymiary w nawiasie — większa czcionka niż podpisy pól wymiarów. */
.wcp-bleed-dims-num {
	display: inline;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.25;
	color: var(--wcp-muted);
}

.wcp-scale-row {
	display: block;
	margin: 0;
	padding: 15px 0;
	border-bottom: 1px solid var(--wcp-border);
	box-sizing: border-box;
}

/*
 * Suwak „Skala” — `.wcp-editor-body #wcp-app-root` podbija specyficzność nad Woo / motyw (min-height, padding na input).
 * WebKit: `::-webkit-slider-container` + sztywna wysokość inputu; motywy często dają inputom min-height 40px+ — `!important`.
 */
.wcp-editor-body #wcp-app-root .wcp-scale-row.wcp-field .wcp-scale-line {
	--wcp-scale-ui-h: 36px;
	--wcp-scale-range-box-h: 22px;
	--wcp-scale-track-h: 2px;
	--wcp-scale-thumb-h: 18px;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.wcp-editor-body #wcp-app-root .wcp-scale-row.wcp-field .wcp-scale-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	column-gap: 14px;
	flex: 1 1 auto;
	min-width: 0;
	min-height: var(--wcp-scale-ui-h);
	box-sizing: border-box;
}

.wcp-editor-body #wcp-app-root .wcp-scale-row.wcp-field label.wcp-scale-label {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	box-sizing: border-box;
	height: var(--wcp-scale-ui-h);
	margin: 0;
	padding: 0;
	white-space: nowrap;
	font-size: 16px;
	line-height: var(--wcp-scale-ui-h);
	font-weight: 500;
	color: var(--wcp-text);
	flex: 0 0 auto;
}

.wcp-editor-body #wcp-app-root .wcp-scale-row.wcp-field .wcp-scale-range-slot {
	flex: 1 1 auto;
	min-width: 0;
	height: var(--wcp-scale-ui-h);
	min-height: var(--wcp-scale-ui-h);
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: stretch;
	box-sizing: border-box;
	line-height: 0;
	overflow: visible;
}

.wcp-editor-body #wcp-app-root .wcp-scale-row.wcp-field .wcp-scale-range-slot input[type='range'] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	/* Motywy (np. Woo storefront): min-height / padding na wszystkich input — wypycha suwak w dół względem „Skala”. */
	height: var(--wcp-scale-range-box-h) !important;
	min-height: var(--wcp-scale-range-box-h) !important;
	max-height: var(--wcp-scale-range-box-h) !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	font-size: 0 !important;
	line-height: 0 !important;
	font-family: inherit;
	color: inherit;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background: transparent !important;
	border-radius: 0;
	outline: none;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
	overflow: visible;
	align-self: center;
	/* Optyczne wyrównanie toru/kółka do środka wysokości etykiety (WebKit maluje nieco nisko). */
	transform: translateY(-5px);
}

.wcp-editor-body
	#wcp-app-root
	.wcp-scale-row.wcp-field
	.wcp-scale-range-slot
	input[type='range']::-webkit-slider-container {
	height: var(--wcp-scale-range-box-h);
	min-height: var(--wcp-scale-range-box-h);
}

.wcp-editor-body
	#wcp-app-root
	.wcp-scale-row.wcp-field
	.wcp-scale-range-slot
	input[type='range']:focus,
.wcp-editor-body
	#wcp-app-root
	.wcp-scale-row.wcp-field
	.wcp-scale-range-slot
	input[type='range']:focus-visible {
	outline: none;
	box-shadow: none;
}

.wcp-editor-body
	#wcp-app-root
	.wcp-scale-row.wcp-field
	.wcp-scale-range-slot
	input[type='range']::-webkit-slider-runnable-track {
	height: var(--wcp-scale-track-h);
	margin-top: calc(
		(var(--wcp-scale-range-box-h) - var(--wcp-scale-track-h)) / 2
	);
	background: #dcdcdc;
	border-radius: 10px;
}

.wcp-editor-body
	#wcp-app-root
	.wcp-scale-row.wcp-field
	.wcp-scale-range-slot
	input[type='range']::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: var(--wcp-scale-thumb-h);
	height: var(--wcp-scale-thumb-h);
	margin-top: calc(
		-1 * (var(--wcp-scale-thumb-h) - var(--wcp-scale-track-h)) / 2
	);
	background: var(--wcp-accent);
	border: 1px solid var(--wcp-accent-hover);
	border-radius: 50%;
	cursor: pointer;
	box-sizing: border-box;
}

.wcp-editor-body
	#wcp-app-root
	.wcp-scale-row.wcp-field
	.wcp-scale-range-slot
	input[type='range']::-moz-range-track {
	height: var(--wcp-scale-track-h);
	margin-block: calc(
		(var(--wcp-scale-range-box-h) - var(--wcp-scale-track-h)) / 2
	);
	background: #dcdcdc;
	border-radius: 10px;
}

.wcp-editor-body
	#wcp-app-root
	.wcp-scale-row.wcp-field
	.wcp-scale-range-slot
	input[type='range']::-moz-range-thumb {
	width: var(--wcp-scale-thumb-h);
	height: var(--wcp-scale-thumb-h);
	border: 1px solid var(--wcp-accent-hover);
	border-radius: 50%;
	cursor: pointer;
	background: var(--wcp-accent);
	box-sizing: border-box;
}

.wcp-editor-body #wcp-app-root .wcp-scale-row.wcp-field .wcp-scale-value {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	box-sizing: border-box;
	height: var(--wcp-scale-ui-h);
	min-height: var(--wcp-scale-ui-h);
	flex: 0 0 auto;
	min-width: 3rem;
	padding: 0;
	margin: 0;
	font-size: 16px;
	line-height: var(--wcp-scale-ui-h);
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	color: var(--wcp-text);
	text-align: right;
}

.wcp-rotate-panel-section {
	display: flex;
	flex-direction: column;
}

/* Obrót / siatka / dzielenie: linie między wierszami, bez zewnętrznej kreski sekcji (robią ją wiersze) */
.wcp-rotate-panel-section.wcp-panel-section {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 18px;
}

.wcp-rotate-panel-section > .wcp-preview-toolbar__group {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 15px 0;
	border-top: none;
	border-bottom: 1px solid var(--wcp-border);
}

.wcp-rotate-panel-section label.wcp-pt-label {
	cursor: pointer;
	margin: 0;
}

.wcp-rotate-panel-section > .wcp-preview-toolbar__group .wcp-grid-toggle-slot,
.wcp-rotate-panel-section > .wcp-preview-toolbar__group .wcp-panel-toggle-slot {
	display: inline-flex;
	align-items: center;
	align-self: center;
	line-height: 0;
}

.wcp-rotate-panel-section > .wcp-preview-toolbar__group .wcp-toolbar-toggle {
	flex-shrink: 0;
	margin-top: 0;
	vertical-align: middle;
}

.wcp-rotate-panel-section > .wcp-preview-toolbar__group .wcp-pt-label {
	display: inline-flex;
	align-items: center;
	line-height: 1.25;
	margin-top: 0;
	margin-bottom: 0;
}

.wcp-rotate-panel-section > .wcp-preview-toolbar__toggle label.wcp-pt-label {
	min-height: 24px;
}

.wcp-shape-tools,
.wcp-rot-tools {
	--wcp-shape-btn-size: 40px;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 6px;
	width: max-content;
	min-width: 0;
	max-width: 100%;
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	align-self: center;
	overflow: visible;
}

.wcp-toolbar.wcp-toolbar-rotate {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 6px;
	width: max-content;
	min-width: 0;
}

#wcp-app-root .wcp-shape-btn,
.wcp-toolbar.wcp-toolbar-rotate .wcp-rot-btn {
	width: var(--wcp-shape-btn-size);
	height: var(--wcp-shape-btn-size);
	min-width: var(--wcp-shape-btn-size);
	min-height: var(--wcp-shape-btn-size);
	padding: 0;
	text-align: center;
	box-sizing: border-box;
	border: 1px solid #d1d5db;
	background: #ffffff;
	border-radius: 5px;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #111111;
	transition:
		background-color 0.15s ease,
		border-color 0.12s ease,
		color 0.12s ease;
}

#wcp-app-root .wcp-shape-btn:hover,
.wcp-toolbar.wcp-toolbar-rotate .wcp-rot-btn:hover {
	background: #ffffff;
	border-color: #111111;
	color: #111111;
}

#wcp-app-root .wcp-shape-btn:active,
.wcp-toolbar.wcp-toolbar-rotate .wcp-rot-btn:active {
	background: #f3f4f6;
	border-color: #bcc2cb;
	color: #111111;
}

#wcp-app-root .wcp-shape-btn:focus,
.wcp-toolbar.wcp-toolbar-rotate .wcp-rot-btn:focus {
	outline: none;
}

#wcp-app-root .wcp-shape-btn:focus-visible,
.wcp-toolbar.wcp-toolbar-rotate .wcp-rot-btn:focus-visible {
	outline: 2px solid rgba(124, 45, 45, 0.35);
	outline-offset: -2px;
	z-index: 1;
}

.wcp-toolbar.wcp-toolbar-rotate .wcp-rot-ico,
#wcp-app-root .wcp-shape-btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.wcp-toolbar.wcp-toolbar-rotate .wcp-rot-ico-img,
#wcp-app-root .wcp-shape-btn__icon .wcp-rot-ico-img {
	display: block;
	width: 20px;
	height: 20px;
	object-fit: contain;
}

.wcp-toolbar-toggle {
	width: 44px;
	height: 24px;
	min-width: 44px;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
	background: #d8d8d8;
	border: none;
	border-radius: 100px;
	position: relative;
	cursor: pointer;
	transition: background 0.2s ease;
	box-sizing: border-box;
}

.wcp-toolbar-toggle::before {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	left: 2px;
	top: 2px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
	transition: transform 0.2s ease;
}

.wcp-toolbar-toggle:checked {
	background: var(--wcp-accent);
}

.wcp-toolbar-toggle:checked::before {
	transform: translateX(20px);
}

.wcp-toolbar-toggle:focus-visible {
	outline: 2px solid var(--wcp-accent);
	outline-offset: 2px;
}

.wcp-reset-row {
	text-align: left;
	margin-top: 8px;
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--wcp-border);
}

.wcp-glue-row {
	padding: 15px 0 15px;
	border-bottom: 1px solid var(--wcp-border);
	box-sizing: border-box;
}

.wcp-resin-stack:has(+ .wcp-express-row) {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.wcp-express-row {
	border-bottom: none;
	border-top: 1px solid var(--wcp-border);
}

.wcp-glue-line {
	display: flex;
	align-items: center;
	gap: 14px;
}

.wcp-glue-line > .wcp-toolbar-toggle {
	flex-shrink: 0;
	margin-top: 0;
}

.wcp-glue-copy {
	display: inline-flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 24px;
	margin: 0;
	padding: 0;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.25;
	color: var(--wcp-text);
	cursor: pointer;
	box-sizing: border-box;
}

.wcp-glue-lead {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

/* Dwie pozycje żywicy (jak klej): przełączniki .wcp-toolbar-toggle w ramach jednej sekcji. */
.wcp-resin-stack {
	margin: 0 0 20px;
	padding: 15px 0 0;
	border-bottom: 1px solid var(--wcp-border);
	box-sizing: border-box;
}

.wcp-resin-stack .wcp-resin-variant-row {
	margin: 0 0 14px;
	padding: 0;
	border-bottom: none;
}

.wcp-resin-stack .wcp-resin-variant-row:last-child {
	margin-bottom: 14px;
}

.wcp-reset-link {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	margin: 0;
	padding: 10px 18px;
	box-sizing: border-box;
	font-family: var(--wcp-font-family);
	font-size: 16px;
	font-weight: 500;
	font-style: normal;
	line-height: 1.35;
	letter-spacing: 0;
	text-align: left;
	text-decoration: none;
	color: #fff;
	background: #404040;
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		color 0.15s ease;
	gap: 6px;
}

.wcp-reset-link:hover {
	color: #fff;
	background: #525252;
	text-decoration: none;
}

.wcp-reset-link:active {
	background: #333;
	color: #fff;
}

.wcp-reset-link:focus {
	outline: none;
}

.wcp-reset-link:focus-visible {
	outline: 2px solid rgba(124, 45, 45, 0.35);
	outline-offset: 2px;
}

/* Pod obszarem kadrowania — kreska jak pod „Dopasuj tapetę…”, potem wyśrodkowany PDF. */
.wcp-crop-note {
	margin: 14px 0 0;
	font-size: 13px;
	line-height: 1.55;
	color: #6b7280;
}

.wcp-crop-note.wcp-crop-note--bottom {
	width: 100%;
	margin: 40px 0 0;
	box-sizing: border-box;
}

.wcp-crop-note.wcp-crop-note--above-pdf {
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

#wcp-app-root .wcp-shape-btn {
	position: relative;
	margin: 0;
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 500;
	line-height: 16px;
	overflow: visible;
	-webkit-appearance: none;
	appearance: none;
}

#wcp-app-root .wcp-shape-btn:focus-visible {
	outline-offset: 2px;
}

#wcp-app-root .wcp-shape-btn:disabled {
	cursor: default;
	opacity: 0.55;
}

#wcp-app-root .wcp-shape-btn__icon {
	flex-shrink: 0;
}

#wcp-app-root .wcp-shape-btn__label {
	position: absolute;
	left: calc(100% + 8px);
	top: 50%;
	z-index: 12;
	display: block;
	margin: 0;
	padding: 5px 10px;
	font-size: 13px;
	font-weight: 500;
	line-height: 16px;
	color: #111111;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	background: #ffffff;
	border: 1px solid #d1d5db;
	box-shadow: none;
	transform: translateY(-50%);
	transition:
		opacity 0.15s ease,
		visibility 0.15s ease;
}

#wcp-app-root .wcp-shape-btn:hover .wcp-shape-btn__label,
#wcp-app-root .wcp-shape-btn:focus-visible .wcp-shape-btn__label {
	opacity: 1;
	visibility: visible;
}

.wcp-preview-col > .wcp-pdf-wrap {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 10px 0 0;
	border-top: 1px solid var(--wcp-border);
	box-sizing: border-box;
}

.wcp-pdf-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
}

.wcp-pdf-btn-row {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	width: 100%;
}

#wcp-app-root .wcp-pdf-btn {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	max-width: 100%;
	margin: 0;
	padding: 10px 14px;
	box-sizing: border-box;
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 500;
	line-height: 16px;
	text-align: left;
	white-space: nowrap;
	color: var(--wcp-text);
	background: transparent !important;
	background-color: transparent !important;
	border: 1px solid #111;
	border-radius: 100px !important;
	min-height: 36px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none !important;
	transition:
		background-color 0.15s ease,
		color 0.15s ease,
		border-color 0.15s ease;
}

#wcp-app-root .wcp-pdf-btn:hover {
	background: #111 !important;
	background-color: #111 !important;
	color: #ffffff !important;
	border-color: #111 !important;
}

#wcp-app-root .wcp-pdf-btn:hover .wcp-pdf-btn-icon {
	color: #ffffff;
}

#wcp-app-root .wcp-pdf-btn--save-crop {
	color: var(--wcp-text);
	background: transparent !important;
	background-color: transparent !important;
	border: 1px solid #111;
}

#wcp-app-root .wcp-pdf-btn:active {
	background: #252525 !important;
	background-color: #252525 !important;
	color: #ffffff !important;
	border-color: #252525 !important;
}

#wcp-app-root .wcp-pdf-btn:focus {
	outline: none;
}

#wcp-app-root .wcp-pdf-btn:focus-visible {
	outline: 2px solid rgba(124, 45, 45, 0.35);
	outline-offset: 2px;
}

#wcp-app-root .wcp-pdf-btn-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
	color: var(--wcp-text);
}

#wcp-app-root .wcp-pdf-btn-icon svg,
#wcp-app-root .wcp-pdf-btn-icon img {
	width: 18px;
	height: 18px;
	display: block;
}

#wcp-app-root .wcp-pdf-btn-text {
	min-width: 0;
	font-weight: 400;
	text-align: left;
	white-space: nowrap;
}

.wcp-pdf-email-slot {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
	width: 100%;
}

.wcp-pdf-or {
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--wcp-muted);
	text-align: left;
}

.wcp-pdf-email-form {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 8px;
	max-width: 100%;
	width: auto;
}

#wcp-app-root .wcp-pdf-email-input {
	width: 100%;
	min-width: 0;
	max-width: none;
	margin: 0;
	padding: 10px 14px;
	box-sizing: border-box;
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 400;
	line-height: 16px;
	color: var(--wcp-text);
	background: var(--wcp-dim-field-bg);
	border: none;
	border-radius: 0;
	min-height: 36px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

#wcp-app-root .wcp-pdf-btn.wcp-pdf-btn--email-send {
	width: 100%;
	justify-content: center;
	text-align: center;
	border-radius: 100px !important;
}

#wcp-app-root .wcp-pdf-btn.wcp-pdf-btn--email-send .wcp-pdf-btn-text {
	width: 100%;
	text-align: center;
}

#wcp-app-root .wcp-pdf-email-input::placeholder {
	color: var(--wcp-muted);
}

#wcp-app-root .wcp-pdf-email-input:focus {
	outline: none;
	box-shadow: none;
}

#wcp-app-root .wcp-pdf-email-input:focus-visible {
	outline: none;
	box-shadow: none;
}

.wcp-cart-block {
	margin-top: 25px;
	padding: 20px;
	background: #f9f9f9;
	border: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	max-width: 100%;
}

.wcp-cart-block__line {
	font-family: var(--wcp-font-family);
	font-size: 0.95rem;
	line-height: 20px;
	color: var(--wcp-text);
}

.wcp-cart-block__price-lines {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 5px;
	width: 100%;
	box-sizing: border-box;
}

.wcp-cart-block__price-line {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	box-sizing: border-box;
	font-family: var(--wcp-font-family);
	color: var(--wcp-text);
}

.wcp-cart-block__price-label {
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.35;
	flex: 0 1 auto;
	min-width: 0;
}

.wcp-cart-block__price-value {
	font-size: 16px;
	font-weight: 400;
	line-height: 16px;
	text-align: right;
	flex: 0 0 auto;
}

.wcp-cart-block__total-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 16px;
	width: 100%;
	box-sizing: border-box;
	margin-top: 4px;
	padding-top: 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.wcp-cart-block__total-main {
	display: inline-flex;
	flex-direction: row;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px 12px;
	flex: 1 1 auto;
	min-width: min(100%, 220px);
	font-family: var(--wcp-font-family);
	color: var(--wcp-text);
}

.wcp-cart-block__total-label {
	font-size: 20px;
	font-weight: 500;
	line-height: 20px;
}

.wcp-cart-block__total-value {
	font-size: 20px;
	font-weight: 500;
	line-height: 20px;
}

#wcp-app-root .wcp-cart-block__total-row .wcp-add-to-cart-btn {
	width: auto;
	max-width: min(100%, 320px);
	flex: 0 0 auto;
	margin-top: 0;
	white-space: nowrap;
}

#wcp-app-root .wcp-add-to-cart-btn,
#wcp-app-root button.button.wcp-add-to-cart-btn,
#wcp-app-root .button.alt.wcp-add-to-cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
	margin-top: 0;
	padding: 15px 35px;
	box-sizing: border-box;
	font-family: var(--wcp-font-family);
	font-size: 16px;
	font-weight: 400;
	line-height: 16px;
	cursor: pointer;
	border: none;
	border-radius: 100px !important;
	background: #111 !important;
	color: #fff !important;
	transition: background-color 0.15s ease;
}

#wcp-app-root .wcp-add-to-cart-btn:hover:not(:disabled) {
	background: #252525 !important;
	color: #fff !important;
}

#wcp-app-root .wcp-add-to-cart-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.wcp-hint {
	font-size: 0.8rem;
	color: var(--wcp-muted);
}

.wcp-toast {
	position: fixed;
	right: 16px;
	bottom: 16px;
	background: #1a1a1a;
	color: #fff;
	padding: 10px 14px;
	border-radius: var(--wcp-radius);
	font-size: 0.9rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 50;
}

.wcp-toast.wcp-show {
	opacity: 1;
}

@media (max-width: 960px) {
	.wcp-layout {
		grid-template-columns: 1fr;
		gap: 8px 24px;
		padding-top: 8px;
		padding-bottom: 8px;
		padding-left: 2%;
		padding-right: 2%;
		/* Bez rozciągania wierszy na całą wysokość viewportu (flex:1 na layoucie) — inaczej rośnie pusta przestrzeń nad/pod podglądem. */
		align-content: start;
	}

	.wcp-preview-col {
		order: 1;
		position: static;
		top: auto;
		z-index: auto;
		align-self: stretch;
		flex: 0 1 auto;
	}

	.wcp-panel {
		order: 2;
	}

	.wcp-preview-col > .wcp-crop-main {
		flex-direction: column;
		align-items: stretch;
	}

	.wcp-shape-tools,
	.wcp-rot-tools {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: flex-start;
		width: 100%;
		min-width: 0;
		max-width: none;
		gap: 8px;
	}

	.wcp-toolbar.wcp-toolbar-rotate {
		flex-direction: row;
		flex-wrap: wrap;
		width: 100%;
	}

	#wcp-app-root .wcp-shape-btn__label {
		left: 50%;
		top: calc(100% + 8px);
		transform: translateX(-50%);
	}

	.wcp-preview-col > .wcp-crop-main > .wcp-workspace {
		flex: 0 1 auto;
		min-height: 0;
	}

	/* Desktop: min(520px, 62vh) utrzymuje slot — na mobile daje ogromną pustkę wokół małego canvasu. */
	.wcp-preview-col .wcp-stage-outer {
		min-height: 0;
		flex: 0 1 auto;
	}

	.wcp-preview-col .wcp-stage-outer.wcp-stage-outer--loading {
		min-height: min(200px, 36vh);
	}

	.wcp-preview-col .wcp-stage-inner {
		min-height: 0;
	}

	.wcp-preview-toolbar {
		gap: 10px 30px;
		padding-top: 2px;
		padding-bottom: 15px;
		margin-bottom: 8px;
	}

	.wcp-preview-col > .wcp-pdf-wrap {
		margin: 0;
		padding: 10px 0 0;
	}

	.wcp-preview-foot {
		margin-top: 6px;
		padding-top: 8px;
	}

	.wcp-preview-col .wcp-stage-column {
		gap: 4px;
	}

	.wcp-meta-row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.wcp-meta-action {
		justify-self: start;
	}
}

.wcp-texture-replace-region {
	display: flex;
	flex-direction: column;
	gap: 0;
}

#wcp-app-root .wcp-meta-action.wcp-meta-action--texture {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	padding: 0;
	border: none;
	background: transparent;
	font-family: var(--wcp-font-family);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	white-space: nowrap;
	color: var(--wcp-accent);
	cursor: pointer;
	text-decoration: none;
}

#wcp-app-root .wcp-meta-action.wcp-meta-action--texture:hover {
	color: var(--wcp-accent-hover);
	text-decoration: underline;
}

/* Stary wbudowany picker tekstur — wyłączony (wybór w popupie). */
#wcp-app-root .wcp-texture-picker {
	display: none !important;
}

body.wcp-crop-view-body {
	margin: 0;
	background: var(--wcp-bg, #fff);
}

.wcp-crop-view-toolbar {
	margin: 0;
	padding: 12px 16px;
	border-bottom: 1px solid var(--wcp-border, #e8e8e8);
}

.wcp-crop-view-wrap {
	max-width: 1650px;
	margin: 0 auto;
}

#wcp-app-root.wcp-editor--readonly .wcp-panel,
#wcp-app-root.wcp-editor--readonly .wcp-pdf-wrap,
#wcp-app-root.wcp-editor--readonly .wcp-preview-toolbar,
#wcp-app-root.wcp-editor--readonly .wcp-back-to-product-bar {
	display: none !important;
}

#wcp-app-root.wcp-editor--readonly .wcp-layout {
	grid-template-columns: minmax(0, 1fr) !important;
}

#wcp-app-root.wcp-editor--readonly .wcp-stage-outer,
#wcp-app-root.wcp-editor--readonly .wcp-workspace {
	pointer-events: none;
}
