.wc-pip-upload{ text-align:center; max-width:100%; }
.wc-pip-tabs{ margin-bottom:8px; display:flex; gap:6px; justify-content:flex-start; flex-wrap:wrap; }
/* Tabs: inactive and active colors per spec */
.wc-pip-tab{ margin:0; padding:4px 8px; border:1px solid #ccc; background:#988278; color:#fff; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.wc-pip-tab.empty{ background:#988278; }
.wc-pip-tab.active{ background:#605951; color:#fff; }
.wc-pip-tab::after{ content:'\2705'; display:inline-block; width:1.2em; margin-left:4px; opacity:0; }
.wc-pip-tab.ok::after{ opacity:1; } /* ✅ visible when image added */
.wc-pip-tab.err{ background:#dc3232; color:#fff; }
.wc-pip-stage{ position:relative; margin:0 auto; background:#f7f7f7; overflow:hidden; border:1px solid #ddd; }
.wc-pip-stage{ min-height:40px; }
.wc-pip-overlay{ position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; pointer-events:none; z-index:5; }
.wc-pip-canvas-wrap{ position:absolute; top:0; left:0; right:0; bottom:0; z-index:1; overflow:hidden; width:100%; height:100%; display:none; }
.wc-pip-canvas-wrap{ touch-action:none; }
/* Cropper.js expects the image to be a normal block element */
.wc-pip-image{ display:none; max-width:100%; width:100%; height:auto; z-index:1; }
.cropper-container{ position:absolute !important; top:0; left:0; right:0; bottom:0; width:100% !important; height:100% !important; z-index:1; }
/* Hide crop box UI so the stage feels like the fixed crop area */
.cropper-dashed, .cropper-line, .cropper-point, .cropper-view-box{ display:none !important; }
.wc-pip-controls{
	display:flex;
	align-items:center;
	justify-content:flex-start; /* input + filename left, remove right */
	flex-wrap:wrap;
	gap:8px;
	margin-top:8px;
	/* center to match stage width so left edge aligns */
	margin-left:auto;
	margin-right:auto;
	/* increase vertical spacing to add-to-cart row */
	margin-bottom:4%;
}
.wc-pip-warning{border:1px solid #e0a800;background:#fff8e1;color:#7a5a00;border-radius:4px}
.wc-pip-file-info{display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:50%; align-self:center; order:1;}
.single_add_to_cart_button.disabled{ opacity:0.5; cursor:not-allowed; }

/* Ensure meta blocks wrap under the buttons in the controls row */
.wc-pip-controls .wc-pip-warning{ flex-basis:100%; }

/* Keep input first, filename next to it, remove button on the far right */
.wc-pip-controls .wc-pip-file{ order:0; }
.wc-pip-controls .wc-pip-remove{ order:2; margin-left:auto; }

/* Optional: tame Cropper UI visuals */
.cropper-view-box, .cropper-face{ outline: none; }
.cropper-bg{ background: transparent; }
.cropper-modal{ background: transparent; }
