/**
 * Shared storefront builder styles (simple + advance).
 * Canvas toolbar, zoom controls, and toolbar icon backgrounds.
 *
 * @package CustomProductBuilderProWC
 */

/* UI chrome uses Poppins on every builder surface */
.cpbpwc-main-designer-container,
.cpbpwc-advance-builder,
.wrapper-memes-main,
.cpbpwc-textbox-header,
.wrapper-text,
.wrapper-memes-preview-operations,
.cpb-canvas-toolbar,
[data-cpb-tooltip]::after {
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Toolbar icon backgrounds */
.cpbpwc-main-designer-container .moreOption,
.cpbpwc-advance-builder .moreOption {
	background-image: url(../images/gear.svg);
}

.cpbpwc-main-designer-container .delete-box-amm,
.cpbpwc-advance-builder .delete-box-amm {
	background-image: url(../images/x.svg);
}

/* Toolbar row inside preview operations */
.wrapper-memes-preview-operations > .cpb-canvas-toolbar-wrap {
	flex-basis: 100%;
	width: 100%;
}

.cpb-canvas-toolbar-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 8px 10px 4px;
	margin-top: 4px;
	box-sizing: border-box;
	position: relative;
	z-index: 25;
	overflow: visible;
}

.cpb-canvas-toolbar {
	display: inline-flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	overflow: visible;
}

.wrapper-memes-preview-operations .cpb-canvas-toolbar .cpb-tbar-btn {
	width: 38px;
	height: 38px;
	min-width: 38px;
	padding: 0;
	border: none;
	border-radius: 10px;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	font-weight: 600;
	gap: 0;
}

.wrapper-memes-preview-operations .cpb-canvas-toolbar .cpb-tbar-btn::before {
	content: none;
	display: none;
	width: 0;
	height: 0;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: none;
	background-image: none;
}

.cpb-tbar-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 10px;
	background: #ffffff;
	color: #475569;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
	position: relative;
	overflow: visible;
}

.cpb-tbar-btn:hover:not(:disabled) {
	background: #eff6ff;
	color: #1d4ed8;
}

.cpb-tbar-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.cpb-tbar-svg {
	width: 20px;
	height: 20px;
	display: block;
}

.cpb-tbar-zoom {
	font-size: 24px;
	font-weight: 300;
	line-height: 1;
	display: block;
	margin-top: -2px;
}

.cpb-tbar-sep {
	width: 1px;
	height: 24px;
	background: #cbd5e1;
	margin: 0 4px;
	flex-shrink: 0;
}

.cpb-tbar-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cpb-canvas-toolbar-wrap .cpb-side-select-wrap {
	position: static;
	left: auto;
	top: auto;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0;
}

.cpb-side-select-wrap {
	display: none;
	align-items: center;
	gap: 6px;
}

.cpb-side-select-wrap.cpb-side-select-visible,
.cpb-canvas-toolbar-wrap .cpb-side-select-wrap.cpb-side-select-visible {
	display: flex;
}

.cpbpwc-main-designer-container .cpb-side-select-wrap {
	display: flex;
}

.cpb-canvas-zoom-root {
	transform-origin: center center;
	transition: transform 0.15s ease;
	display: inline-block;
}

/* Remove BG */
.wrapper-memes-preview-operations .cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn,
.cpbpwc-canvas-container .cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn,
.cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn {
	display: inline-flex;
	width: auto;
	min-width: auto;
	max-width: none;
	height: 38px;
	padding: 0 12px;
	gap: 6px;
	flex: 0 0 auto;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #ffffff;
	color: #334155;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	white-space: nowrap;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
		sans-serif;
}

.wrapper-memes-preview-operations
	.cpb-canvas-toolbar
	.cpb-remove-bg-btn.cpb-tbar-btn:hover:not(:disabled),
.cpbpwc-canvas-container
	.cpb-canvas-toolbar
	.cpb-remove-bg-btn.cpb-tbar-btn:hover:not(:disabled),
.cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn:hover:not(:disabled) {
	background: #eff6ff;
	color: #1d4ed8;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.cpb-canvas-toolbar .cpb-remove-bg-btn.is-busy {
	opacity: 0.65;
	cursor: wait;
}

.cpb-canvas-toolbar .cpb-remove-bg-btn .cpb-remove-bg-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.cpb-canvas-toolbar .cpb-remove-bg-btn .cpb-remove-bg-label {
	display: inline-block;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
		sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
	color: inherit;
}

.cpb-canvas-toolbar .cpb-remove-bg-sep {
	display: inline-block;
	flex-shrink: 0;
}

/* Mobile: keep a single compact toolbar row, like desktop */
@media (max-width: 900px) {
	.cpb-canvas-toolbar-wrap,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar-wrap,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar-wrap {
		justify-content: flex-start;
		width: 100%;
		max-width: 100%;
		padding: 6px 0 8px;
		box-sizing: border-box;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		scrollbar-width: thin;
		scrollbar-color: #94a3b8 transparent;
	}

	.cpb-canvas-toolbar-wrap::-webkit-scrollbar,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar-wrap::-webkit-scrollbar,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar-wrap::-webkit-scrollbar {
		height: 4px;
	}

	.cpb-canvas-toolbar-wrap::-webkit-scrollbar-thumb,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar-wrap::-webkit-scrollbar-thumb,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar-wrap::-webkit-scrollbar-thumb {
		background: #94a3b8;
		border-radius: 4px;
	}

	.cpb-canvas-toolbar,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar {
		display: inline-flex;
		flex-wrap: nowrap;
		justify-content: center;
		align-items: center;
		flex: 0 0 auto;
		width: max-content;
		max-width: none;
		margin: 0 auto;
		padding: 4px 6px;
		gap: 3px;
		box-sizing: border-box;
	}

	.wrapper-memes-preview-operations .cpb-canvas-toolbar .cpb-tbar-btn,
	.cpb-canvas-toolbar .cpb-tbar-btn,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-tbar-btn,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-tbar-btn {
		width: 34px;
		min-width: 34px;
		max-width: 34px;
		height: 34px;
	}

	.wrapper-memes-preview-operations .cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn,
	.cpbpwc-canvas-container .cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn,
	.cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-remove-bg-btn.cpb-tbar-btn {
		width: 34px;
		min-width: 34px;
		max-width: 34px;
		height: 34px;
		padding: 0;
		gap: 0;
		flex: 0 0 34px;
		margin: 0;
	}

	.cpb-canvas-toolbar .cpb-remove-bg-sep,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-remove-bg-sep,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-remove-bg-sep {
		flex-basis: auto;
		width: 1px;
		height: 18px;
		margin: 0 2px;
		background: #cbd5e1;
	}

	.cpb-canvas-toolbar .cpb-remove-bg-btn .cpb-remove-bg-label,
	html.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-remove-bg-btn .cpb-remove-bg-label,
	body.cpbpwc-mobile-layout .cpb-canvas-toolbar .cpb-remove-bg-btn .cpb-remove-bg-label {
		display: none;
	}

	.cpb-tbar-select,
	.cpb-side-select-wrap .cpb-tbar-select,
	.cpb-side-select.cpb-tbar-select,
	html.cpbpwc-mobile-layout .cpb-tbar-select,
	body.cpbpwc-mobile-layout .cpb-tbar-select {
		min-width: 68px;
		width: 76px;
		max-width: 76px;
		flex: 0 0 76px;
		height: 34px;
		padding: 0 22px 0 8px;
		font-size: 12px;
		background-position: right 7px center;
		background-size: 10px 7px;
	}

	.cpb-side-select-wrap,
	html.cpbpwc-mobile-layout .cpb-side-select-wrap,
	body.cpbpwc-mobile-layout .cpb-side-select-wrap {
		min-width: 0;
		flex: 0 0 auto;
		max-width: none;
	}

	.cpb-side-select-ui,
	.cpb-side-select-trigger,
	html.cpbpwc-mobile-layout .cpb-side-select-trigger,
	body.cpbpwc-mobile-layout .cpb-side-select-trigger {
		min-width: 88px;
		max-width: 140px;
		height: 34px;
		font-size: 13px;
		padding: 0 10px;
		touch-action: manipulation;
	}

	.cpb-tbar-sep,
	html.cpbpwc-mobile-layout .cpb-tbar-sep,
	body.cpbpwc-mobile-layout .cpb-tbar-sep {
		height: 18px;
		margin: 0 2px;
	}

	.cpb-tbar-svg,
	html.cpbpwc-mobile-layout .cpb-tbar-svg,
	body.cpbpwc-mobile-layout .cpb-tbar-svg {
		width: 18px;
		height: 18px;
	}

	.cpb-tbar-zoom,
	html.cpbpwc-mobile-layout .cpb-tbar-zoom,
	body.cpbpwc-mobile-layout .cpb-tbar-zoom {
		font-size: 20px;
		margin-top: -1px;
	}
}

#wrapper_canvas_background,
.wrapper_canvas {
	position: relative;
}

.cpb-remove-bg-overlay {
	position: absolute;
	inset: 0;
	z-index: 80;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}

.cpb-remove-bg-overlay-dim {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.42);
	transition: opacity 0.25s ease;
}

.cpb-remove-bg-overlay.is-revealing .cpb-remove-bg-overlay-dim {
	opacity: 0;
}

.cpb-remove-bg-sparkles {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.cpb-remove-bg-sparkles span {
	position: absolute;
	width: 14px;
	height: 14px;
	background: transparent;
	opacity: 0;
	animation: cpb-remove-bg-sparkle 1.8s ease-in-out infinite;
}

.cpb-remove-bg-sparkles span::before,
.cpb-remove-bg-sparkles span::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	background: #fde047;
	border-radius: 1px;
	transform: translate(-50%, -50%);
	box-shadow: 0 0 8px rgba(253, 224, 71, 0.85);
}

.cpb-remove-bg-sparkles span::before {
	width: 2px;
	height: 100%;
}

.cpb-remove-bg-sparkles span::after {
	width: 100%;
	height: 2px;
}

.cpb-remove-bg-sparkles span:nth-child(1) {
	left: 18%;
	top: 22%;
	animation-delay: 0s;
}
.cpb-remove-bg-sparkles span:nth-child(2) {
	left: 72%;
	top: 18%;
	animation-delay: 0.25s;
}
.cpb-remove-bg-sparkles span:nth-child(3) {
	left: 40%;
	top: 48%;
	animation-delay: 0.45s;
}
.cpb-remove-bg-sparkles span:nth-child(4) {
	left: 80%;
	top: 58%;
	animation-delay: 0.65s;
}
.cpb-remove-bg-sparkles span:nth-child(5) {
	left: 28%;
	top: 72%;
	animation-delay: 0.85s;
}
.cpb-remove-bg-sparkles span:nth-child(6) {
	left: 58%;
	top: 34%;
	animation-delay: 1.05s;
}

@keyframes cpb-remove-bg-sparkle {
	0%,
	100% {
		opacity: 0;
		transform: scale(0.55) rotate(0deg);
	}
	40% {
		opacity: 1;
		transform: scale(1) rotate(20deg);
	}
	70% {
		opacity: 0.35;
		transform: scale(0.8) rotate(40deg);
	}
}

.cpb-remove-bg-overlay-copy {
	display: none !important;
}

.cpb-remove-bg-overlay-title {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.cpb-remove-bg-overlay-sub {
	margin-top: 6px;
	font-size: 12px;
	opacity: 0.9;
}

.cpb-remove-bg-reveal {
	position: absolute;
	inset: 0;
	z-index: 3;
	background-color: #f1f5f9;
	background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
		linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
		linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
	background-size: 18px 18px;
	background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.cpb-remove-bg-reveal-after,
.cpb-remove-bg-reveal-before {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.cpb-remove-bg-reveal-before {
	z-index: 2;
}

.cpb-remove-bg-reveal-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 3px;
	margin-left: -1px;
	background: #ffffff;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15),
		0 4px 12px rgba(15, 23, 42, 0.25);
	z-index: 4;
}

.cpb-remove-bg-reveal-handle::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	transform: translate(-50%, -50%);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.cpb-tbar-select,
.cpb-side-select-wrap .cpb-tbar-select,
.cpb-side-select,
.cpb-side-select.cpb-tbar-select {
	min-width: 120px;
	max-width: 220px;
	height: 38px;
	padding: 0 36px 0 12px;
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	background-color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	color: #334155;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
}

.cpb-tbar-select option,
.cpb-side-select option {
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-weight: 500;
}

.imageBoxDR,
.boxDR {
	transform-origin: center center;
	overflow: visible;
}

/* Clipart Remove BG: dim + sparkles only */
.wrapper_canvas > .cpb-remove-bg-overlay {
	border-radius: inherit;
	z-index: 80;
}

.imageBoxDR > .cpb-remove-bg-overlay {
	border-radius: 4px;
	z-index: 20;
}

.imageBoxDR > .cpb-remove-bg-overlay .cpb-remove-bg-sparkles span {
	width: 10px;
	height: 10px;
}

.cpbpwc-main-designer-container .cpb-image-box-tools,
.cpbpwc-advance-builder .cpb-image-box-tools {
	position: absolute;
	left: 50%;
	bottom: -38px;
	display: flex;
	align-items: center;
	gap: 6px;
	transform: translateX(-50%);
	z-index: 6;
	pointer-events: auto;
}

.cpbpwc-main-designer-container .rotate-box-amm,
.cpbpwc-advance-builder .rotate-box-amm,
.cpbpwc-main-designer-container .remove-bg-box-amm,
.cpbpwc-advance-builder .remove-bg-box-amm {
	position: relative;
	left: auto;
	top: auto;
	bottom: auto;
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	background-color: #ffffff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
	transform: none;
	flex: 0 0 auto;
}

.cpbpwc-main-designer-container .rotate-box-amm,
.cpbpwc-advance-builder .rotate-box-amm {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-3.2-6.9'/%3E%3Cpolyline points='21 3 21 9 15 9'/%3E%3C/svg%3E");
	cursor: grab;
}

.cpbpwc-main-designer-container .remove-bg-box-amm,
.cpbpwc-advance-builder .remove-bg-box-amm {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f172a'%3E%3Cpath d='M19.36 2.72a1 1 0 0 1 1.41 0l.51.51a1 1 0 0 1 0 1.41l-1.2 1.2-1.92-1.92 1.2-1.2zM3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zm14.71-9.96.85-.85-1.92-1.92-.85.85 1.92 1.92zM5.92 19H5v-.92l8.06-8.06.92.92L5.92 19zM4 13.5l7.5-7.5 1.06 1.06-1.72 1.72.71.71 1.72-1.72 1.41 1.41L5.41 14.91 4 13.5z'/%3E%3C/svg%3E");
	cursor: pointer;
}

.cpbpwc-main-designer-container .rotate-box-amm:hover,
.cpbpwc-advance-builder .rotate-box-amm:hover,
.cpbpwc-main-designer-container .rotate-box-amm:active,
.cpbpwc-advance-builder .rotate-box-amm:active,
.cpbpwc-main-designer-container .imageBoxDR.is-rotating .rotate-box-amm,
.cpbpwc-advance-builder .imageBoxDR.is-rotating .rotate-box-amm,
.cpbpwc-main-designer-container .remove-bg-box-amm:hover,
.cpbpwc-advance-builder .remove-bg-box-amm:hover {
	cursor: grabbing;
	background-color: #f8fafc;
	border-color: #cbd5e1;
}

.cpbpwc-main-designer-container .remove-bg-box-amm:hover,
.cpbpwc-advance-builder .remove-bg-box-amm:hover {
	cursor: pointer;
	background-color: #eff6ff;
	border-color: #93c5fd;
}

.cpbpwc-main-designer-container .remove-bg-box-amm.is-busy,
.cpbpwc-advance-builder .remove-bg-box-amm.is-busy {
	opacity: 0.55;
	cursor: wait;
	pointer-events: none;
}

@media (max-width: 900px) {
	.cpbpwc-main-designer-container .cpb-image-box-tools,
	.cpbpwc-advance-builder .cpb-image-box-tools,
	html.cpbpwc-mobile-layout .cpb-image-box-tools,
	body.cpbpwc-mobile-layout .cpb-image-box-tools {
		bottom: -42px;
		z-index: 40;
	}

	.cpbpwc-main-designer-container .rotate-box-amm,
	.cpbpwc-advance-builder .rotate-box-amm,
	.cpbpwc-main-designer-container .remove-bg-box-amm,
	.cpbpwc-advance-builder .remove-bg-box-amm,
	html.cpbpwc-mobile-layout .rotate-box-amm,
	html.cpbpwc-mobile-layout .remove-bg-box-amm,
	body.cpbpwc-mobile-layout .rotate-box-amm,
	body.cpbpwc-mobile-layout .remove-bg-box-amm {
		width: 32px;
		height: 32px;
		background-size: 16px 16px;
		touch-action: manipulation;
		-webkit-tap-highlight-color: transparent;
	}
}

.cpbpwc-main-designer-container .imageBoxDR.is-rotating,
.cpbpwc-advance-builder .imageBoxDR.is-rotating {
	z-index: 30;
}

/* Shared hover tooltips (toolbar + textbox controls) */
[data-cpb-tooltip] {
	position: relative;
	overflow: visible;
}

[data-cpb-tooltip]:hover,
[data-cpb-tooltip]:focus-visible {
	z-index: 10050;
}

[data-cpb-tooltip]::after {
	content: attr(data-cpb-tooltip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	padding: 6px 10px;
	background: #1e293b;
	color: #ffffff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 10051;
}

[data-cpb-tooltip]:hover::after,
[data-cpb-tooltip]:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.wrapper-text .cpb-textbox-tip,
.wrapper-text .moreOption,
.wrapper-text .cpb-color-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
	flex-shrink: 0;
}

/* Color swatch controls (textbox / brush) */
.cpb-color-swatch-group {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.cpb-color-swatch {
	width: 28px;
	height: 28px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	padding: 0;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.cpb-color-swatch.is-active {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.cpb-color-swatch-hidden {
	display: none;
	visibility: hidden;
	width: 0;
	height: 0;
	padding: 0;
	margin: 0;
	border: none;
	position: absolute;
	pointer-events: none;
}

/* Top icon row: tooltips below so overflow:auto chrome does not clip them */
.wrapper-memes-preview-operations [data-cpb-tooltip]::after {
	bottom: auto;
	top: calc(100% + 8px);
	transform: translateX(-50%) translateY(-4px);
}

.wrapper-memes-preview-operations [data-cpb-tooltip]:hover::after,
.wrapper-memes-preview-operations [data-cpb-tooltip]:focus-visible::after {
	transform: translateX(-50%) translateY(0);
}

/* Touch devices: never show sticky hover tooltips over the toolbar */
@media (hover: none), (pointer: coarse) {
	.wrapper-memes-preview-operations [data-cpb-tooltip]::after {
		content: none;
		display: none;
	}

	.cpbpwc-main-designer-container .remove-bg-box-amm,
	.cpbpwc-advance-builder .remove-bg-box-amm,
	.cpbpwc-main-designer-container .rotate-box-amm,
	.cpbpwc-advance-builder .rotate-box-amm {
		width: 32px;
		height: 32px;
		background-size: 16px 16px;
		touch-action: manipulation;
	}
}

/* Empty designer state (simple + advance) */
#product-designer.cpbwc-empty-designer {
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	box-sizing: border-box;
	padding: 24px;
}

.cpbwc-empty-designer-inner {
	max-width: 420px;
	text-align: center;
}

.cpbwc-empty-designer-text {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #475569;
}

/* AI-generated clipart badge */
.ai-star-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	background: transparent;
	border: 0;
	width: auto;
	height: auto;
	color: #cfff13;
	font-size: 18px;
	line-height: 1;
	pointer-events: none;
	z-index: 11;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Product background fill color */
.cpb-product-fill-panel {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	width: 100%;
	margin: 10px 0 4px;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	box-sizing: border-box;
}

.cpb-product-fill-label {
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.2;
}

.cpb-product-fill-controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.cpb-product-fill-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.cpb-product-fill-swatch {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	border: 2px solid #e2e8f0;
	padding: 0;
	cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.cpb-product-fill-swatch:hover {
	transform: scale(1.06);
}

.cpb-product-fill-swatch.is-active {
	border-color: #334155;
	box-shadow: 0 0 0 2px rgba(51, 65, 85, 0.18);
}

.cpb-product-fill-picker {
	width: 40px;
	height: 32px;
	padding: 2px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}

.cpbpwc-canvas-container > .cpb-product-fill-panel {
	margin-top: 12px;
}

.wrapper-memes-operations > .cpb-product-fill-panel {
	margin: 12px 0;
}

/* Advance builder: show transparent shape masks in variation thumbs */
.cpbpwc-advance-builder.cpbpwc-has-product-fill .wrapper_select_image_amm,
.cpbpwc-advance-builder.cpbpwc-has-product-fill .cpbpwc-section-1 .wrapper_select_image_amm {
	background-color: #dbe3ee;
	background-image:
		linear-gradient(45deg, #c5d0de 25%, transparent 25%),
		linear-gradient(-45deg, #c5d0de 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #c5d0de 75%),
		linear-gradient(-45deg, transparent 75%, #c5d0de 75%);
	background-size: 10px 10px;
	background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	overflow: hidden;
}
