/*
 * Visuele stijl geïnspireerd op whereithappened.nl/product/delfts-blauw-tegeltje:
 * split-screen editor (canvas-preview + accordion-sidebar), groen accent, kaart-stijl
 * keuzeopties met vinkje-badge, mobiele stappenbalk met voortgangsindicator.
 */

#wih-tegel-configurator {
	--wih-green-light: #078a6c;
	--wih-green-dark: #405952;
	--wih-blue-50: #eff6ff;
	--wih-blue-100: #dbeafe;
	--wih-blue-400: #60a5fa;
	--wih-blue-500: #3b82f6;
	--wih-blue-600: #2563eb;
	--wih-stone-100: #f5f5f4;
	--wih-stone-200: #e7e5e4;
	--wih-gray-50: #f9fafb;
	--wih-gray-100: #f3f4f6;
	--wih-gray-200: #e5e7eb;
	--wih-gray-300: #d1d5db;
	--wih-gray-400: #9ca3af;
	--wih-gray-500: #6b7280;
	--wih-gray-600: #4b5563;
	--wih-gray-700: #374151;
	--wih-gray-900: #111827;
	--wih-radius-sm: 4px;
	--wih-radius-md: 8px;
	--wih-radius-lg: 12px;
	--wih-radius-xl: 16px;

	font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--wih-gray-900);
	background: #fff;
}

.wih-tegel-form {
	margin: 0;
}

#wih-tegel-configurator * {
	box-sizing: border-box;
}

/* ---------- Mobiele tab-balk (onder de canvas, boven de panelen) ---------- */

.wih-tegel-mobile-steps {
	display: flex;
	background: #fff;
	border-top: 1px solid var(--wih-gray-200);
	border-bottom: 1px solid var(--wih-gray-200);
}

#wih-tegel-configurator .wih-tegel-mobile-step {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 10px 4px;
	min-height: 52px;
	/* Reset thema-stijlen die rode randen/achtergronden geven */
	background: #fff !important;
	border: none !important;
	border-bottom: 3px solid transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	color: var(--wih-gray-400) !important;
	font-family: inherit;
	transition: color 0.15s, border-color 0.15s, background-color 0.15s;
	-webkit-tap-highlight-color: transparent;
}

#wih-tegel-configurator .wih-tegel-mobile-step:focus-visible {
	outline: 2px solid var(--wih-gray-400);
	outline-offset: -2px;
}

#wih-tegel-configurator .wih-tegel-mobile-step.active {
	color: var(--wih-gray-700) !important;
	background: var(--wih-gray-100) !important;
	border-bottom-color: var(--wih-gray-400) !important;
}

.wih-tegel-mobile-step-icon {
	display: block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.wih-tegel-mobile-step.active .wih-tegel-mobile-step-icon {
	background-color: var(--wih-gray-700);
}

.wih-tegel-mobile-step-label {
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: inherit;
}

/* ---------- Layout ---------- */

.wih-tegel-editor {
	display: flex;
	flex-direction: column;
}

@media (min-width: 768px) {
	.wih-tegel-editor {
		flex-direction: row;
		align-items: flex-start;
		min-height: 600px;
	}
	.wih-tegel-mobile-steps {
		display: none;
	}
}

/* ---------- Mobiele slide-panelen ---------- */

@media (max-width: 767.98px) {
	.wih-tegel-sidebar-sections {
		overflow: hidden;
	}

	.wih-tegel-sections-track {
		display: flex;
		transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
		will-change: transform;
	}

	.wih-tegel-sections-track > .wih-tegel-section {
		flex: 0 0 100%;
		width: 100%;
		min-width: 0;
	}

	/* Accordion-header niet nodig op mobiel: navigatie via tab-balk */
	#wih-tegel-configurator .wih-tegel-section-toggle {
		display: none !important;
	}

	/* Altijd paneel tonen op mobiel — zichtbaarheid geregeld via track-positie */
	#wih-tegel-configurator .wih-tegel-section[data-open="false"] .wih-tegel-section-panel {
		display: block !important;
	}
}

.wih-tegel-canvas-col {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(to bottom right, var(--wih-stone-100), rgba(231, 229, 228, 0.8), var(--wih-stone-100));
}

@media (min-width: 768px) {
	.wih-tegel-canvas-col {
		width: 68%;
		padding: 40px;
		align-self: flex-start;
		/* Sticky canvas: blijft in beeld terwijl de zijbalk scrollt.
		   top houdt rekening met de WP admin-balk (--wp-admin--admin-bar--height)
		   en een optionele thema-sticky-header (--wih-sticky-top, default 0). */
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wih-sticky-top, 0px));
		height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - var(--wih-sticky-top, 0px));
	}
}

.wih-tegel-canvas-shell {
	position: relative;
	/* Square: neemt minimale waarde van 100% breedte en viewport-hoogte min padding */
	width: min(100%, calc(100vh - 80px));
	max-width: 700px;
	aspect-ratio: 1 / 1;
	margin: 0 auto;
	background: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 20px 40px rgba(0, 0, 0, 0.12);
	overflow: visible;
}

/* Fabric.js maakt een .canvas-container div met inline pixel-afmetingen.
   Dit overschrijft die zodat de canvas de shell volledig vult. */
.wih-tegel-canvas-shell .canvas-container {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

.wih-tegel-canvas-shell .canvas-container canvas {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

.wih-tegel-canvas-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
	color: var(--wih-gray-500);
	pointer-events: all;
	cursor: pointer;
	transition: background-color 0.15s;
	border-radius: inherit;
}

.wih-tegel-canvas-placeholder:hover {
	background: rgba(0, 0, 0, 0.03);
}

.wih-tegel-canvas-placeholder-icon {
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	background: var(--wih-blue-100);
}

.wih-tegel-canvas-placeholder p {
	font-size: 14px;
	font-weight: 500;
	margin: 0;
	max-width: 220px;
	color: var(--wih-gray-700);
}

.wih-tegel-canvas-placeholder-hint {
	font-size: 12px;
	color: var(--wih-gray-400);
}

.wih-tegel-canvas-status,
.wih-tegel-canvas-error {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
	background: rgba(255, 255, 255, 0.92);
}

.wih-tegel-progress-bar-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 80%;
	max-width: 260px;
}

.wih-tegel-progress-bar {
	flex: 1;
	height: 8px;
	background: var(--wih-gray-100);
	border-radius: 4px;
	overflow: hidden;
}

.wih-tegel-progress-bar-fill {
	width: 0%;
	height: 100%;
	background: var(--wih-green-light);
	border-radius: 4px;
	transition: width 0.15s ease-out;
}

.wih-tegel-progress-pct {
	flex-shrink: 0;
	min-width: 36px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wih-gray-700);
	text-align: right;
}

.wih-tegel-progress-text {
	font-size: 13px;
	color: var(--wih-gray-600);
	margin: 0;
}

.wih-tegel-error-text {
	font-size: 13px;
	color: #b91c1c;
	margin: 0 0 4px;
}

/* ---------- Sidebar ---------- */

.wih-tegel-sidebar-col {
	display: flex;
	flex-direction: column;
	background: #fff;
}

@media (min-width: 768px) {
	.wih-tegel-sidebar-col {
		width: 32%;
		border-left: 1px solid var(--wih-gray-200);
		min-height: 100%;
	}
}

.wih-tegel-sidebar-scroll {
	flex: 1;
	min-height: 0;
}

.wih-tegel-sidebar-intro {
	padding: 16px;
}

@media (max-width: 767.98px) {
	/* Op mobiel houdt de referentie-layout het strak: canvas + tabs direct onder elkaar. */
	.wih-tegel-sidebar-intro {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

.wih-tegel-sidebar-intro h1 {
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 8px;
	color: var(--wih-gray-900);
	line-height: 1.3;
}

.wih-tegel-sidebar-intro p {
	font-size: 13px;
	color: var(--wih-gray-500);
	line-height: 1.5;
	margin: 0;
}

.wih-tegel-sidebar-sections {
	display: flex;
	flex-direction: column;
}

.wih-tegel-section {
	border-top: 1px solid var(--wih-gray-200);
}

#wih-tegel-configurator .wih-tegel-section-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px !important;
	margin: 0 !important;
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-transform: none !important;
	cursor: pointer;
	font-family: inherit !important;
	text-align: left;
}

.wih-tegel-section-toggle:hover {
	background: rgba(249, 250, 251, 0.8);
}

.wih-tegel-section-icon {
	width: 36px;
	height: 22px;
	flex-shrink: 0;
	background: var(--wih-gray-400);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.wih-tegel-section-title {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
	color: var(--wih-gray-700);
}

.wih-tegel-section-chevron {
	width: 16px;
	height: 16px;
	border-right: 2px solid var(--wih-gray-400);
	border-bottom: 2px solid var(--wih-gray-400);
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	margin-top: -4px;
}

.wih-tegel-section[data-open="true"] .wih-tegel-section-chevron {
	transform: rotate(-135deg);
	margin-top: 4px;
}

.wih-tegel-section-panel {
	padding: 0 16px 20px;
}

.wih-tegel-section[data-open="false"] .wih-tegel-section-panel {
	display: none;
}

.wih-tegel-field-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px;
}

.wih-tegel-field-hint {
	font-size: 12px;
	color: var(--wih-gray-500);
	margin: 0 0 10px;
}

/* ---------- Dropzone ---------- */

.wih-tegel-dropzone {
	position: relative;
	border: 2px dashed var(--wih-gray-300);
	border-radius: var(--wih-radius-md);
	padding: 24px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.wih-tegel-dropzone:hover,
.wih-tegel-dropzone.is-dragover {
	border-color: var(--wih-blue-400);
	background: var(--wih-gray-50);
}

.wih-tegel-dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.wih-tegel-dropzone-icon {
	display: block;
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	border-radius: 999px;
	background: var(--wih-blue-100);
}

.wih-tegel-dropzone-title {
	font-size: 13px;
	font-weight: 500;
	color: var(--wih-gray-700);
	margin: 0 0 4px;
}

.wih-tegel-dropzone-hint {
	font-size: 12px;
	color: var(--wih-gray-500);
	margin: 0;
}

.wih-tegel-dropzone.is-done {
	cursor: default;
	padding: 12px 16px;
}

.wih-tegel-dropzone.is-done .wih-tegel-dropzone-icon {
	display: none;
}

/* ---------- Schaal-control ---------- */

.wih-tegel-scale-control {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--wih-gray-200);
}

.wih-tegel-scale-control h4 {
	font-size: 13px;
	font-weight: 500;
	margin: 0 0 2px;
	color: var(--wih-gray-900);
}

.wih-tegel-scale-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

#wih-tegel-configurator .wih-tegel-scale-btn {
	flex: 0 0 auto !important;
	width: 32px !important;
	height: 32px !important;
	border: none !important;
	border-radius: var(--wih-radius-md) !important;
	background: rgb(112, 204, 10) !important;
	color: #fff !important;
	cursor: pointer !important;
	font-size: 16px !important;
	line-height: 1 !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	outline: none !important;
}

#wih-tegel-configurator .wih-tegel-scale-btn:hover {
	background: rgb(96, 176, 8) !important;
	color: #fff !important;
	border: none !important;
}

#wih-tegel-configurator .wih-tegel-scale-btn:focus {
	outline: 2px solid rgba(112, 204, 10, 0.4) !important;
	outline-offset: 2px !important;
}

.wih-tegel-scale-row input[type="range"] {
	flex: 1;
}

.wih-tegel-scale-value {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--wih-gray-700);
}

/* Draaien-control (zelfde stijl als scale-control) */
.wih-tegel-rotate-control {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--wih-gray-200);
}

.wih-tegel-rotate-control h4 {
	font-size: 13px;
	font-weight: 500;
	margin: 0 0 2px;
	color: var(--wih-gray-900);
}

/* ---------- Tekst-sectie ---------- */

#wih-tegel-configurator .wih-tegel-btn-secondary {
	display: inline-block;
	padding: 8px 16px !important;
	margin: 0 !important;
	border: 1px solid var(--wih-gray-300) !important;
	border-radius: var(--wih-radius-md) !important;
	background: #fff !important;
	color: var(--wih-gray-700) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer;
	font-family: inherit !important;
}

.wih-tegel-btn-secondary:hover {
	background: var(--wih-gray-50);
}

.wih-tegel-text-input {
	width: 100%;
	min-height: 72px;
	padding: 10px 12px;
	border: 1px solid var(--wih-gray-200);
	border-radius: var(--wih-radius-md);
	font-family: inherit;
	font-size: 14px;
	color: var(--wih-gray-900);
	background: #fff;
	resize: vertical;
	line-height: 1.5;
	transition: border-color 0.15s;
}

.wih-tegel-text-input:focus {
	outline: none;
	border-color: var(--wih-green-light);
	box-shadow: 0 0 0 3px rgba(7, 138, 108, 0.1);
}

.wih-tegel-text-controls {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 14px;
}

.wih-tegel-text-color-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wih-tegel-text-controls label {
	font-size: 12px;
	font-weight: 500;
	color: var(--wih-gray-600);
}

.wih-tegel-text-size-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}

.wih-tegel-text-size-val {
	font-size: 12px;
	font-weight: 600;
	color: var(--wih-green-light);
}

.wih-tegel-text-size-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wih-tegel-text-size-limit {
	flex-shrink: 0;
	font-size: 11px;
	color: var(--wih-gray-400);
	min-width: 28px;
}

.wih-tegel-text-size-limit:last-child {
	text-align: right;
}

.wih-tegel-text-size-row input[type="range"] {
	flex: 1;
}

/* ---------- Hoekornamenten ---------- */

.wih-tegel-ornament-corner {
	margin-bottom: 16px;
}

.wih-tegel-ornament-corner-label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: var(--wih-gray-600);
	margin-bottom: 8px;
}

.wih-tegel-ornament-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

#wih-tegel-configurator .wih-tegel-ornament-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 6px !important;
	margin: 0 !important;
	border: 2px solid var(--wih-gray-200) !important;
	border-radius: var(--wih-radius-md) !important;
	background: #fff !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer;
	font-family: inherit !important;
}

.wih-tegel-ornament-option:hover {
	border-color: var(--wih-gray-300);
}

#wih-tegel-configurator .wih-tegel-ornament-option.active {
	border-color: var(--wih-blue-500) !important;
	background: var(--wih-blue-50) !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.wih-tegel-ornament-thumb {
	width: 44px;
	height: 44px;
	border-radius: var(--wih-radius-sm);
	background: var(--wih-gray-100);
	display: flex;
	align-items: center;
	justify-content: center;
	object-fit: contain;
}

.wih-tegel-ornament-thumb--none {
	color: var(--wih-gray-400);
	font-size: 12px;
}

img.wih-tegel-ornament-thumb {
	object-fit: contain;
	padding: 6px;
}

.wih-tegel-ornament-option-label {
	font-size: 11px;
	font-weight: 500;
	color: var(--wih-gray-600);
	text-align: center;
}

.wih-tegel-ornament-option.active .wih-tegel-ornament-option-label {
	color: var(--wih-blue-600);
}

/* ---------- Houten standaard ---------- */

.wih-tegel-stand-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

#wih-tegel-configurator .wih-tegel-stand-option {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 6.5em;
	padding: 8px !important;
	margin: 0 !important;
	border: 2px solid var(--wih-gray-200) !important;
	border-radius: var(--wih-radius-sm) !important;
	background: var(--wih-gray-50) !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer;
	font-family: inherit !important;
}

#wih-tegel-configurator .wih-tegel-stand-option.active {
	border-color: var(--wih-green-light) !important;
}

.wih-tegel-stand-check {
	display: none;
	position: absolute;
	top: -0.5em;
	right: -0.25em;
	width: 1.5em;
	height: 1.5em;
	border-radius: 999px;
	border: 2px solid var(--wih-green-light);
	background: #fff;
}

.wih-tegel-stand-option.active .wih-tegel-stand-check {
	display: block;
}

.wih-tegel-stand-check::after {
	content: "";
	position: absolute;
	left: 0.42em;
	top: 0.28em;
	width: 0.4em;
	height: 0.7em;
	border-right: 2px solid var(--wih-green-light);
	border-bottom: 2px solid var(--wih-green-light);
	transform: rotate(45deg);
}

.wih-tegel-stand-icon {
	width: 24px;
	height: 24px;
	font-weight: 600;
	color: var(--wih-gray-400);
}

.wih-tegel-stand-label {
	font-size: 12px;
	font-weight: 500;
	color: var(--wih-gray-700);
}

.wih-tegel-stand-price {
	font-size: 11px;
	color: var(--wih-gray-500);
}

/* ---------- Add to cart ---------- */

.wih-tegel-cta-bar {
	flex-shrink: 0;
	padding: 12px 16px 16px;
	border-top: 1px solid var(--wih-gray-200);
	background: #fff;
}

@media (max-width: 767.98px) {
	.wih-tegel-cta-bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
	}

	/* Ruimte onderaan zodat content niet achter de fixed CTA-balk verdwijnt. */
	.wih-tegel-sidebar-sections {
		padding-bottom: 92px;
	}
}

.wih-tegel-cta-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wih-tegel-cta-price {
	flex-shrink: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--wih-gray-900);
}

.wih-tegel-trust-text {
	margin: 8px 0 0;
	font-size: 11px;
	color: var(--wih-gray-500);
	text-align: center;
}

/*
 * !important op de kernvisuals: veel thema's/plugins resetten `button`/`.button` globaal
 * (soms met !important), en zonder dit worden deze knoppen daardoor overschreven.
 */
#wih-tegel-configurator .wih-tegel-cta {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 20px !important;
	margin: 0 !important;
	border: none !important;
	border-radius: var(--wih-radius-lg) !important;
	background: #f97316 !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: normal !important;
	text-transform: uppercase !important;
	letter-spacing: 0.02em;
	cursor: pointer;
	font-family: inherit !important;
	box-shadow: none !important;
	transition: transform 0.15s ease, background 0.15s ease;
}

#wih-tegel-configurator .wih-tegel-cta:hover {
	background: #ea580c !important;
	color: #fff !important;
}

.wih-tegel-cta:active {
	transform: scale(0.99);
}

.wih-tegel-cta:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.wih-tegel-cta-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.wih-tegel-cta-label {
	flex: 1;
	text-align: left;
}

.wih-tegel-cta-arrow {
	font-size: 16px;
}

/* ---------- Iconen (mask-image, kleur via background-color) ---------- */

.wih-tegel-section-icon,
.wih-tegel-mobile-step-icon,
.wih-tegel-canvas-placeholder-icon,
.wih-tegel-dropzone-icon,
.wih-tegel-stand-icon[data-icon] {
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 60%;
	mask-size: 60%;
}

.wih-tegel-canvas-placeholder-icon,
.wih-tegel-dropzone-icon {
	-webkit-mask-size: 44%;
	mask-size: 44%;
}

.wih-tegel-mobile-step-icon {
	-webkit-mask-size: 100%;
	mask-size: 100%;
}

.wih-tegel-canvas-placeholder-icon,
.wih-tegel-dropzone-icon {
	background-color: var(--wih-blue-600);
}

.wih-tegel-mobile-step-icon {
	background-color: var(--wih-gray-400);
}

.wih-tegel-mobile-step.active .wih-tegel-mobile-step-icon {
	background-color: var(--wih-gray-700);
}

.wih-tegel-stand-icon[data-icon] {
	background-color: var(--wih-gray-400);
	-webkit-mask-size: 70%;
	mask-size: 70%;
}

.wih-tegel-stand-option.active .wih-tegel-stand-icon[data-icon] {
	background-color: var(--wih-green-light);
}

/* Upload / afbeelding icoon */
.wih-tegel-section-icon[data-icon="upload"],
.wih-tegel-mobile-step-icon[data-icon="upload"],
.wih-tegel-canvas-placeholder-icon,
.wih-tegel-dropzone-icon {
	-webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
}

/* Tekst icoon */
.wih-tegel-section-icon[data-icon="text"],
.wih-tegel-mobile-step-icon[data-icon="text"] {
	-webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 6.1H3'/%3E%3Cpath d='M21 12.1H3'/%3E%3Cpath d='M15.1 18H3'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 6.1H3'/%3E%3Cpath d='M21 12.1H3'/%3E%3Cpath d='M15.1 18H3'/%3E%3C/svg%3E");
}

/* Hoekornament icoon */
.wih-tegel-section-icon[data-icon="ornaments"],
.wih-tegel-mobile-step-icon[data-icon="ornaments"] {
	-webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9.06 11.9 8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08'/%3E%3Cpath d='M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9.06 11.9 8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08'/%3E%3Cpath d='M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z'/%3E%3C/svg%3E");
}

/* Houten standaard icoon */
.wih-tegel-section-icon[data-icon="stand"],
.wih-tegel-mobile-step-icon[data-icon="stand"],
.wih-tegel-stand-icon[data-icon="stand"] {
	-webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E");
}

/* ---------- Custom range slider ---------- */

#wih-tegel-configurator input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 20px;
	background: transparent;
	outline: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
}

/* Track – Chrome / Safari / Edge */
#wih-tegel-configurator input[type="range"]::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 2px;
	background: var(--wih-gray-200);
}

/* Track – Firefox */
#wih-tegel-configurator input[type="range"]::-moz-range-track {
	height: 4px;
	border-radius: 2px;
	background: var(--wih-gray-200);
	border: none;
}

/* Filled part – Firefox */
#wih-tegel-configurator input[type="range"]::-moz-range-progress {
	height: 4px;
	border-radius: 2px;
	background: var(--wih-blue-600);
}

/* Thumb – Chrome / Safari / Edge */
#wih-tegel-configurator input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	margin-top: -7px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--wih-green-light);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#wih-tegel-configurator input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.15);
	box-shadow: 0 0 0 4px rgba(7, 138, 108, 0.15);
}

/* Thumb – Firefox */
#wih-tegel-configurator input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--wih-green-light);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transition: transform 0.1s ease;
}

#wih-tegel-configurator input[type="range"]::-moz-range-thumb:hover {
	transform: scale(1.15);
}

/* Winkelwagen icoon (CTA) */
.wih-tegel-cta-icon {
	width: 18px;
	height: 18px;
	-webkit-mask: none;
	mask: none;
	background: none;
}

.wih-tegel-cta-icon::before {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	background-color: #fff;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100%;
	mask-size: 100%;
	-webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
}

/* ---------- Recente uploads ---------- */

.wih-tegel-recent-uploads {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--wih-gray-100);
}

.wih-tegel-recent-uploads .wih-tegel-field-label {
	display: block;
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wih-gray-600);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wih-tegel-recent-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 6px;
}

.wih-tegel-recent-item {
	position: relative;
	aspect-ratio: 1 / 1;
	padding: 2px !important;
	border: 1px solid var(--wih-gray-200) !important;
	border-radius: var(--wih-radius-sm) !important;
	box-shadow: none !important;
	overflow: hidden;
	cursor: pointer;
	background: var(--wih-gray-50) !important;
	transition: background-color 0.15s, border-color 0.15s;
}

.wih-tegel-recent-item:hover {
	background: var(--wih-gray-100) !important;
	border-color: var(--wih-gray-300) !important;
	transform: none !important;
}

.wih-tegel-recent-item:focus-visible {
	outline: 2px solid var(--wih-green-light);
	outline-offset: 2px;
}

.wih-tegel-recent-delete {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 16px;
	height: 16px;
	background: #dc2626;
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
	pointer-events: auto;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	font-style: normal;
}

.wih-tegel-recent-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 2px;
}

/* ---------- Volledige breedte op de productpagina ---------- */

/*
 * De configurator wordt geïnclude via woocommerce_before_single_product_summary.
 * WooCommerce plaatst deze hook binnen .type-product (container van de pagina).
 * Met de breakout-truc maken we de editor full-viewport-width ongeacht de container.
 */
#wih-tegel-configurator {
	width: 100vw;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
}

/* Voorkom horizontale scrollbar door de 100vw breakout. */
.wih-tegel-product-page body,
.wih-tegel-product-page {
	overflow-x: hidden;
}

/* Verberg lege WC-structuur, breadcrumb, thema-specifieke elementen. */
.wih-tegel-product-page .woocommerce-breadcrumb,
.wih-tegel-product-page .woocommerce div.product div.summary.entry-summary,
.wih-tegel-product-page .woocommerce-tabs.wc-tabs-wrapper,
.wih-tegel-product-page .woocommerce div.product .woocommerce-tabs,
.wih-tegel-product-page .up-sells,
.wih-tegel-product-page .related.products,
.wih-tegel-product-page .kiyohrating,
.wih-tegel-product-page .product-usps,
.wih-tegel-product-page .euroknaller-box,
.wih-tegel-product-page .product-faq {
	display: none !important;
}
