.wpp-personalizer {
	margin: 1.5em 0;
}

/* Modal shell: no layout space until opened (content is position:fixed). */
.wpp-personalizer--modal {
	margin: 0;
	padding: 0;
	height: 0;
	overflow: visible;
	z-index: 999999999 !important; 
	position: relative; 
}

.wpp-open-personalizer-wrap {
	margin: 1em 0;
}

.wpp-open-personalizer {
	margin: 0;
}

.wpp-open-personalizer .wpp-btn-inner {
	display: inline-flex;
	align-items: center;
	gap: 0px;
}

.wpp-btn-icon--check {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

.wpp-btn-icon--check svg {
	display: block;
}

.wpp-required {
	color: #e53935;
	font-weight: 700;
	margin-left: 2px;
	line-height: 1;
}

.wpp-image-field__label,
.wpp-text-field > label {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2px;
}

body.wpp-modal-open {
	overflow: hidden;
}

.wpp-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.wpp-modal.is-open {
	display: block;
}

.wpp-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.wpp-modal__dialog {
	position: relative;
	z-index: 2;
	max-width: 1100px;
	width: calc(100% - 32px);
	max-height: calc(95vh - 32px);
	margin: 16px auto;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	top: 50%;
	transform: translateY(-50%);
}

.wpp-modal__close {
	position: absolute;
    top: 0px;
    right: 8px;
	z-index: 3;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.wpp-modal__body {
	overflow: auto;
	padding: 24px;
}

.wpp-modal__footer {
	padding: 16px 24px;
	border-top: 1px solid #e5e5e5;
	display: flex;
    justify-content: flex-end;
	gap: 12px;
}

.wpp-modal__footer .wpp-transform-toolbar {
	margin: 0;
	margin-right: auto;
	min-width: 0;
}

.wpp-modal__footer .wpp-save-personalization {
	margin-left: auto;
	flex-shrink: 0;
	padding: .618em 1.5em;
}
@media (min-width: 992px) {
	.wpp-modal__footer .wpp-save-personalization {
		min-width: 320px;
	}
}

.wpp-editor__preview {
	min-width: 0;
	width: 100%;
}

.wpp-editor {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 24px;
}

@media (max-width: 900px) {
	.wpp-editor {
		grid-template-columns: 1fr;
	}
}

.wpp-canvas-container {
	width: 100%;
	max-width: 100%;
	border: 1px solid #ddd;
	background: #f7f7f7;
	border-radius: 6px;
	overflow: hidden;
	position: sticky;
    top: 0;
}

.wpp-canvas-container canvas {
	display: block;
	image-rendering: auto;
}

.wpp-field {
	margin-bottom: 16px;
}
.wpp-font-family-select{
	margin-bottom: 0px;
}
.wpp-field label {
	display: flex;
	font-weight: 600;
	margin-bottom: 0px;
}

.wpp-field textarea {
	width: 100%;
	min-height: 80px;
	border: none !important;
	padding: 8px;
}

.wpp-char-counter {
	font-size: 12px;
	color: #666;
	margin-top: 4px;
}

.wpp-transform-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
}

.wpp-toolbar-group {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.wpp-toolbar-group label {
margin-bottom: 0;
}
.wpp-toolbar-group[hidden] {
	display: none !important;
}

.wpp-font-family-select {
	min-width: 140px;
	max-width: 220px;
	height: 36px;
	padding: 4px 8px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
}

.wpp-field-error {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #d63638;
}

.wpp-field-error[hidden] {
	display: none !important;
}

.wpp-text-field,
.wpp-image-field {
	padding: 12px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fafafa;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.wpp-image-field {
	position: relative;
	cursor: pointer;
}

.wpp-image-field.has-file {
	cursor: default;
}

.wpp-text-field.has-error,
.wpp-image-field.has-error,
.wpp-acceptance.has-error {
	border-color: #d63638;
}

.wpp-text-field.is-active {
	border-color: #000;
	background: #fff;
}

.wpp-text-field.is-active.has-error {
	border-color: #d63638;
}

.wpp-personalizer--modal .wpp-editor__controls .wpp-transform-toolbar {
	display: none;
	z-index: 999999999 !important; 
	position: relative;
}
.wpp-crop-modal__dialog{
	position: absolute;
	bottom: 0;
}

.wpp-image-field.is-active {
	border-color: #000;
	background: #fff;
}

.wpp-image-field__label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #1e1e1e;
	transition: color 0.15s ease;
}

.wpp-image-field__remove {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	color: #000;
	text-decoration: underline;
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
	text-transform: uppercase;
	transition: color 0.15s ease;
}
.wpp-image-field__remove:hover {
	color: red;
}

.wpp-image-field__remove[hidden] {
	display: none !important;
}



.wpp-image-upload-wrap {
	position: relative;
}

.wpp-image-upload-spinner {
	position: absolute;
	right: 10px;
	top: 50%;
	z-index: 2;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	border: 2px solid rgba(0, 0, 0, 0.12);
	border-top-color: #000;
	border-radius: 50%;
	animation: wpp-spin 0.7s linear infinite;
	pointer-events: none;
}

.wpp-image-upload-spinner[hidden] {
	display: none !important;
}

.wpp-image-field.is-uploading .wpp-image-upload-btn {
	opacity: 0.65;
	pointer-events: none;
}

@keyframes wpp-spin {
	to {
		transform: rotate(360deg);
	}
}

.wpp-image-upload {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wpp-image-upload-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	cursor: pointer;
	margin: 0;
}

.wpp-image-field.has-file .wpp-image-upload-btn {
	background: #efefef;
    border-color: #000000;
    color: #000000;
}

.product button.button.wpp-save-personalization, .product button.button.wpp-open-personalizer{
    background: #000;
    border-radius: 0;
}

.product button.button.wpp-save-personalization:focus,
.product button.button.wpp-save-personalization:active,
.product button.button.wpp-save-personalization:hover,
.product button.button.wpp-open-personalizer:focus,
.product button.button.wpp-open-personalizer:active,
.product button.button.wpp-open-personalizer:hover {
    background: rgba(0, 0, 0, 0.61);
}


.wpp-acceptance {
	display: block;
	margin: 16px 0;
	padding: 12px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fafafa;
}

.wpp-acceptance__label {
	display: flex !important;
	gap: 8px;
	align-items: flex-start;
	align-items: center;
}
.wpp-acceptance__label p{
	font-size: 12px;
}

.wpp-personalizer.is-valid .wpp-validation-hint {
	color: #2e7d32;
}

.wpp-validation-hint {
	font-size: 13px;
	color: #b71c1c;
	margin-top: 8px;
}

body.wpp-block-atc .single_add_to_cart_button {
	opacity: 0.5;
	pointer-events: none;
}

.wpp-save-personalization:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Image crop modal (layout personalization mode 2). */
body.wpp-crop-modal-open {
	overflow: hidden;
}

.wpp-crop-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100010;
}

.wpp-crop-modal.is-open {
	display: block;
}

.wpp-crop-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.wpp-crop-modal__dialog {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	width: min(96vw, 1080px);
	height: min(92vh, 860px);
	margin: 4vh auto;
	padding: 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.wpp-crop-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.wpp-crop-modal__stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	overflow: hidden;
	background: #f0f0f0;
}

.wpp-crop-modal__crop-area {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.wpp-crop-modal__crop-area .cropper-container {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	overflow: hidden !important;
}

.wpp-crop-modal__crop-area .cropper-wrap-box,
.wpp-crop-modal__crop-area .cropper-canvas,
.wpp-crop-modal__crop-area .cropper-drag-box {
	max-width: 100%;
	max-height: 100%;
}

.wpp-crop-modal__image {
	display: block;
	max-width: 100%;
	max-height: 100%;
}

/* Crop frame shaped like slot mask (layout option: crop_mask_shape). */
.wpp-crop--mask-shape .cropper-view-box {
	outline: none;
	box-shadow: none;
	border: 2px solid rgba(51, 153, 255, 0.85);
	overflow: hidden;
}

.wpp-crop--mask-shape .cropper-view-box,
.wpp-crop--mask-shape .cropper-face {
	-webkit-mask-image: var(--wpp-crop-mask-url);
	mask-image: var(--wpp-crop-mask-url);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.wpp-crop--mask-shape .cropper-face {
	background-color: rgba(51, 153, 255, 0.12);
	opacity: 1;
}

.wpp-crop--mask-shape .cropper-line,
.wpp-crop--mask-shape .cropper-point {
	display: none;
}

.wpp-crop--mask-shape .cropper-dashed {
	opacity: 0;
}

.wpp-crop-modal__footer {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-top: 1px solid #e5e5e5;
	background: #fff;
}

@media (max-width: 640px) {
	.wpp-crop-modal__dialog {
		width: 100vw;
		height: 100vh;
		max-height: 100vh;
		margin: 0;
		border-radius: 0;
	}
}

.wpp-crop-modal__zoom {
	display: flex;
	gap: 8px;
}

.wpp-crop-modal__zoom-btn {
	width: 40px;
	height: 40px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.wpp-crop-modal__zoom-btn:hover {
	border-color: #999;
}

.wpp-crop-modal__actions {
	display: flex;
	gap: 10px;
	margin-left: auto;
}

.wpp-crop-modal__cancel {
	min-width: 100px;
}

.wpp-crop-modal__select {
	min-width: 120px;
}
@media (max-width: 374px) {
    .wpp-crop-modal__footer .wpp-crop-modal__actions .btn {
        font-size: 13px;
        min-width: auto;
    }
}
.wpp-modal__footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
@media (max-width: 992px) {
.wpp-save-personalization{
min-width: 100%;
	
}
	.wpp-modal__footer{display: flex; flex-direction: row; flex-wrap: wrap;}
}
